libvirt_lxc and sysfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

Is it possible to start container via libvirt_lxc without mounting /sys
inside container?

When I start container via lxc-start and do not add mount point to config, 
then /sys inside container is empty.

When I do it via virsh -c lxc:// container.xml, then 
/sys contains sysfs of the host and /sys on host becomes remounting read-only.

Am I doing something wrong or is this feature of libvirt_lxc? 

Thanks.

root@host:~# uname -a
Linux host 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2+deb7u2 x86_64 GNU/Linux

root@host:~# cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 7.0 (wheezy)"
...

root@host:~# dpkg -l | grep libvirt
ii  libvirt-bin   0.9.12-11 amd64   programs for the libvirt library
ii  libvirt0      0.9.12-11 amd64   library for interfacing with different virtualization systems


container.xml:
<domain type='lxc'>
  <name>ns1</name>
  <memory>524288</memory>
  <os>
    <type>exe</type>
    <init>/sbin/init</init>
  </os>
  <vcpu>1</vcpu>
  <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'>
      <source dir='/var/lxc/ns1/rootfs'/>
      <target dir='/'/>
    </filesystem>
    <interface type='bridge'>
      <source bridge='br0'/>
      <mac address='52:54:00:de:74:06'/>
    </interface>
    <console type='pty' />
  </devices>
</domain>


_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux