]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
Add support for disks with LXC
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 22 Nov 2012 14:33:48 +0000 (14:33 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 17 Dec 2012 17:50:51 +0000 (17:50 +0000)
commit368e341ac13ff9ad7aff71534984e2f59f9cc910
tree264d851e1ba1feecab634d78138a26dd5f83fbac
parenta6cbdd7b81d6724f66f427495d58e0c8e950cd41
Add support for disks with LXC

Currently LXC guests can be given arbitrary pre-mounted
filesystems, however, for some usecases it is more appropriate
to provide block devices which the container can mount itself.
This first impl only allows for <disk type='block'>, in other
words exposing a host disk device to a container. Since LXC
does not have device namespace virtualization, we are cheating
a little bit. If the XML specifies /dev/sdc4 to be given to
the container as /dev/sda1, when we do the mknod /dev/sda1
in the container's /dev, we actually use the major:minor
number of /dev/sdc4, not /dev/sda1.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/lxc/lxc_cgroup.c
src/lxc/lxc_container.c