[lxc-users] Libvirt inside lxc 1.0

Ivan Borodin magwa.man at yandex.ru
Sat Nov 19 21:38:36 UTC 2016


autodev=1 for systemd and
lxc.mount.entry = /dev/mem /var/lib/lxc/sid/rootfs/dev/mem none
bind,create=file 0 0

This solved the thing.

Excuse me for disturbing you. Your very presence here was a of great
help for me. Thank you.

On 11/19/2016 11:32 PM, Ivan Borodin wrote:
> Greetings, gentlemen.
> I'm trying to launch libvirtd in an lxc-container and have certain
> problems. Looks like, it's my lack of knowledge about linux in general.
> 
> Host system is lmde2 with sysv-init(kernel 3.16.0-4-amd64, lxc 1.0.6-6).
> Guest is Debian Sid in a privileged container.
> 
> As for now, I see, that libvirt requires at least /dev/mem to be
> accessible, so I need /dev/mem pass-through.
> 
> lxc.container.conf(5) doesn't offer any detail about /dev configuration
> beyond lxc.autodev. I had no luck searching in the web, except some
> evidence, that launching bare kvm inside lxc is possible and /dev/mem
> pass-through is possible too.
> 
> The common thing is lxc devices.list containing  'a *:* rwm'.
> With various config combinations of lxc.autodev=0/1, container's
> cgroup's devices.list allowing all or a limited set of devices, trying
> to bind-mount host's /dev to rootfs on the host level or via
> lxc.mount.entry and other stuff, I get exactly two results: tiny,
> minimalistic, on-it's-own /dev in guest's console, or lxc-ls reporting
> guest as running and guest itself hanging with accessible console and no
> login prompt in it.
> 
> This can sum into that I either don't get access to host's dev, with
> minimal dev populated or not, or I do, but, in this case there are some
> problems, access conflicts between host and guest, maybe, which I can't
> imagine.
> 
> I clearly don't get something about lxc and /dev. Could you, please,
> point that out.
> 
> Best regards,
> Ivan.
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
> 


More information about the lxc-users mailing list