<div dir="ltr">It seems to be working now, what I needed was libvirt built with libcap support and also securityfs patch. Thanks!</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 9, 2013 at 1:08 PM, Jaka Hudoklin <span dir="ltr"><<a href="mailto:jakahudoklin@gmail.com" target="_blank">jakahudoklin@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I applied your patch, but no success. What bothers me is that connection gets reseted. By the way, i'm using systemd, with process started in forking mode and as daemon. Could this cause any problems?<div>


<br></div><div>This is my libvirtd.conf, if it helps anything:</div><div><div>unix_sock_group = "libvirtd"</div><div>unix_sock_rw_perms = "0770"</div><div>auth_unix_ro = "none"</div><div>auth_unix_rw = "none"</div>


</div><div><br></div><div>Can you please tell me easy to setup distro with systemd that user namespaces work, so i can compare.</div><div><br></div><div>Thanks!</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">

<br><br><div class="gmail_quote">
On Mon, Sep 9, 2013 at 3:08 AM, Gao feng <span dir="ltr"><<a href="mailto:gaofeng@cn.fujitsu.com" target="_blank">gaofeng@cn.fujitsu.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div>On 09/06/2013 07:32 PM, Jaka Hudoklin wrote:<br>
> Hello!<br>
><br>
> Okay i tried again with only staticly linked busybox:<br>
> offlinehacker:~/ $ /home/offlinehacker/busybox/busybox<br>
> BusyBox v1.17.1 (Debian 1:1.17.1-8) multi-call binary.<br>
> Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko<br>
> and others. Licensed under GPLv2.<br>
> See source distribution for full notice.<br>
> ....<br>
><br>
> Again my id:<br>
> uid=499(offlinehacker) gid=100(users) groups=100(users),1(wheel),57(networkmanager)<br>
><br>
> My rootfs tree(/home/offlinehacker/busybox):<br>
> busybox<br>
> ├── [offlineh users   ]  busybox<br>
> └── [offlineh users   ]  busybox-static_1.17.1-8_amd64.deb<br>
><br>
> It works just fine as root and these folders gets created:<br>
> busybox<br>
> ├── [offlineh users   ]  busybox<br>
> ├── [offlineh users   ]  busybox-static_1.17.1-8_amd64.deb<br>
> ├── [root     root    ]  dev<br>
> ├── [root     root    ]  .oldroot<br>
> ├── [root     root    ]  proc<br>
> └── [root     root    ]  sys<br>
><br>
> When i start it with idmap with clean rootfs(dev proc sys and .oldroot deleted) i get this error, and it is a  little bit different now:<br>
> error: Failed to create domain from helloworld.xml<br>
> error: internal error: guest failed to start: 2013-09-06 11:24:57.088+0000: 5794: debug : virFileC<br>
><br>
> And log is pretty similar:<br>
> sep 06 11:24:56 laptop libvirtd[1542]: EVENT_POLL_UPDATE_HANDLE: watch=241 events=1<br>
> sep 06 11:24:57 laptop libvirtd[1542]: Skip interrupt, 1 140499747788544<br>
> sep 06 11:24:57 laptop libvirtd[1542]: OBJECT_REF: obj=0x7fc878000c90<br>
> sep 06 11:24:57 laptop libvirtd[1542]: OBJECT_REF: obj=0x7fc878000c90<br>
> sep 06 11:24:57 laptop libvirtd[1542]: server=0x7fc8a60ddd60 client=0x7fc8a60e8bb0 msg=0x7fc8a60e6970 rerr=0x7fc89a32cd40 args=0x7fc8880160a0 ret=0x7fc888016030<br>
> sep 06 11:24:57 laptop libvirtd[1542]: priv=0x7fc8a60ea3a0 conn=(nil)<br>
> sep 06 11:24:57 laptop libvirtd[1542]: name=lxc:///<br>
> sep 06 11:24:57 laptop libvirtd[1542]: Cannot recv data: Connection reset by peer<br>
> sep 06 11:24:57 laptop libvirtd[1542]: internal error: guest failed to start: 2013-09-06 11:24:57.088+0000: 5794: debug : virFileC<br>
><br>
> Rootfs after failed creation looks like this:<br>
> busybox<br>
> ├── [offlineh users   ]  busybox<br>
> ├── [offlineh users   ]  busybox-static_1.17.1-8_amd64.deb<br>
> ├── [offlineh users   ]  .oldroot<br>
> ├── [offlineh users   ]  proc<br>
> └── [offlineh users   ]  sys<br>
><br>
> I have debugging enabled, at least LIBVIRT_DEBUG is set to 1 and i get much more messages. If there's any my granular debug please let me know.<br>
><br>
> PS: I forgot to mention my version of libvirt is 1.1.2<br>
><br>
<br>
</div></div>OK, I get it, Maybe you need this patch<br>
<br>
1583dfda7c4e5ad71efe0615c06e5676528d8203<br>
LXC: Don't mount securityfs when user namespace enabled<br>
<br>
Thanks<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>