[libvirt] Re: the <filesystem> tag (WAS: simple LXC/libvirt busybox container (Unable to get cgroup))
Daniel P. Berrange
berrange at redhat.com
Fri Dec 11 10:20:30 UTC 2009
On Thu, Dec 10, 2009 at 05:44:30PM -0600, Tony Risinger wrote:
> wow! i was starting to think i would never get past this problem!
>
> [root at PHS-001 ~]# echo $VIRSH_DEFAULT_CONNECT_URI
> lxc:///
>
> [root at PHS-001 ~]# virsh create /vps/def/exec/sys/arch-nano.xml
> Domain arch-nano created from /vps/def/exec/sys/arch-nano.xml
>
> [root at PHS-001 ~]# virsh console arch-nano
> Connected to domain arch-nano
> Escape character is ^]
> #
>
> [root at PHS-001 ~]# grep cgroup /proc/mounts
> none /cgroup cgroup rw,relatime,devices,memory,cpuacct,cpu 0 0
>
> everything seems to be working fine now after disabling "ns" from
> cgroup mount; thank you very much Ryota and Daniel for you time and
> assistance. i must have sunk 40+ hours into this, but i learned a
> tremendous amount, so nothing is lost. :-)
>
> this is somewhat of a digression, and i can submit a new thread if
> need be, but my last remaining question is about the <filesystem>
> tag/root mounting. i have not found any mention of the <filesystem>
> tag in the docs or how to work with it... i want to have libvirt mount
> a specified device (a btrfs subvolume) and use it for the root
> filesystem of the created LXC container. is there a way to do this?
> perhaps <source dev="/dev/sdb" options="subvol....."/>, or do i need
> to use the storage XML? i didnt see a way to use a storage/device
> definition as the rootfs.
The plan is that the <filesystem> tag will eventually support 3 types
of sources, a directory (which gets bind mounted into the root),
a file (loopback device + mounted), or block device (directly mounted).
Currently though we only support the first option. So if you have a
block device, you should first mount it in your host OS, and then let
LXC bind the mount point into the container.
Regards,
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the libvir-list
mailing list