[libvirt-users] Attempt to define unprivileged LXC by libvirt

ales drtik aldrtik at post.cz
Fri Mar 23 13:09:39 UTC 2018


Hi, 
i converted LXC conf to xml by: 

lxcuser at blade1:~/.local/share/lxc/test_deb$ virsh -c lxc:/// domxml-from-
native lxc-tools /home/lxcuser/.local/share/lxc/test_deb/config 

<domain type='lxc'> 
<name>test_deb</name> 
<uuid>cce77799-89fd-41fd-99c1-101e00844e23</uuid> 
<memory unit='KiB'>65536</memory> 
<currentMemory unit='KiB'>65536</currentMemory> 
<vcpu placement='static'>1</vcpu> 
<os> 
<type arch='x86_64'>exe</type> 
<init>/sbin/init</init> 
</os> 
<idmap> 
<uid start='1258512' target='0' count='65536'/> 
<gid start='1258512' target='0' count='65536'/> 
</idmap> 
<features> 
<capabilities policy='allow'> 
</capabilities> 
</features> 
<clock offset='utc'/> 
<on_poweroff>destroy</on_poweroff> 
<on_reboot>restart</on_reboot> 
<on_crash>destroy</on_crash> 
<devices> 
<emulator>/usr/lib/libvirt/libvirt_lxc</emulator> 
<filesystem type='mount' accessmode='passthrough'> 
<source dir='/home/lxcuser/.local/share/lxc/test_deb/rootfs'/> 
<target dir='/'/> 
</filesystem> 
<interface type='bridge'> 
<mac address='00:16:3e:ab:21:1b'/> 
<source bridge='br0'/> 
<link state='up'/> 
</interface> 
</devices> 
</domain> 

Now attempt to define by virsh gives this err: 

lxcuser at blade1:~/.local/share/lxc/test_deb$ virsh -c lxc:/// define tmp/test
_deb.xml 
error: Failed to define domain from /tmp/test_deb.xml 
error: unsupported configuration: You must map the root user of container 

Debian stretch. 
Where am I wrong ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20180323/72e8364f/attachment.htm>


More information about the libvirt-users mailing list