failed to mount cgroup

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

 



Hi,

I tried to run libvirt-1.0.2 with LXC as below, but it failed to mount cgroup.

1). mount /cgroup
# mkdir /cgroup
# mount -t cgroup cgroup /cgroup

# vi vm1.xml
<domain type='lxc'>
  <name>vm1</name>
  <memory>32768</memory>
  <os>
    <type>exe</type>
    <init>/bin/sh</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/libexec/libvirt_lxc</emulator>
    <console type='pty' tty='/dev/pts/3'>
      <source path='/dev/pts/3'/>
      <target port='0'/>
    </console>
  </devices>
</domain>

# virsh -c lxc:/// define vm1.xml

# virsh -c lxc:/// start vm1
error: Failed to start domain vm1
error: internal error guest failed to start: 2013-03-05 02:13:03.639+0000: 2403: info : libvirt version: 1.0.2
2013-03-05 02:13:03.639+0000: 2403: warning : lxcCapsInit:73 : Failed to get host power management capabilities
PATH=/bin:/sbin TERM=linux container=lxc-libvirt container_uuid=d50aec75-4566-62b3-ed81-adf3e8705efe LIBVIRT_LXC_UUID=d50aec75-4566-62b3-ed81-adf3e8705efe LIBVIRT_LXC_NAME=vm1 /bin/sh
2013-03-05 02:13:03.779+0000: 1: error : lxcContainerIdentifyCGroups:1775 : Unable to read directory : No such file or directory
2013-03-05 02:13:03.779+0000: 2404: error : virLXCControllerRun:1468 : error receiving signal from container: Input/output error



# ps aux | grep libvirtd
root      2314  0.1  0.4 108320  4876 ?        Sl   02:47   0:00 libvirtd -d
root      2383  0.0  0.0   4116   452 ttyS0    S+   02:52   0:00 grep libvirtd

# cat /proc/2314/status
Name:   libvirtd
State:  S (sleeping)
Tgid:   2314
Pid:    2314
PPid:   1
TracerPid:      0
Uid:    0       0       0       0
Gid:    0       0       0       0
FDSize: 32
Groups: 0
VmPeak:   112420 kB
VmSize:   108320 kB
VmLck:         0 kB
VmHWM:      4884 kB
VmRSS:      4876 kB
VmData:    91540 kB
VmStk:       136 kB
VmExe:       348 kB
VmLib:     13092 kB
VmPTE:        96 kB
VmSwap:        0 kB
Threads:        11
SigQ:   0/7760
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000001000
SigCgt: 0000000180004cef
CapInh: 0000000000000000
CapPrm: ffffffffffffffff
CapEff: ffffffffffffffff
CapBnd: ffffffffffffffff
Cpus_allowed:   3
Cpus_allowed_list:      0-1
Mems_allowed:   1
Mems_allowed_list:      0
voluntary_ctxt_switches:        59
nonvoluntary_ctxt_switches:     24

# cat /proc/2314/cgroup
1:freezer,devices,memory,cpuacct,cpuset:/

# mount | grep cgroup
cgroup on /cgroup type cgroup (rw,relatime,freezer,devices,memory,cpuacct,cpuset)


# vi /var/log/libvirt/lxc/vm1.log
2013-03-05 02:48:39.218+0000: starting up
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin LIBVIRT_DEBUG=3 LIBVIRT_LOG_OUTPUTS=3:stderr /usr/libexec/libvirt_lxc --name vm1 --console 17 --security=none --handshake 20 --background
2013-03-05 02:48:39.229+0000: 2365: info : libvirt version: 1.0.2
2013-03-05 02:48:39.229+0000: 2365: warning : lxcCapsInit:73 : Failed to get host power management capabilities
PATH=/bin:/sbin TERM=linux container=lxc-libvirt container_uuid=523492fb-36c8-3662-c61e-91697d5ad0ab LIBVIRT_LXC_UUID=523492fb-36c8-3662-c61e-91697d5ad0ab LIBVIRT_LXC_NAME=vm1 /bin/sh
2013-03-05 02:48:39.299+0000: 1: error : lxcContainerIdentifyCGroups:1775 : Unable to read directory : No such file or directory
2013-03-05 02:48:39.300+0000: 2366: error : virLXCControllerRun:1468 : error receiving signal from container: Input/output error


But if mount cgroup on another poinit, the error message is different.
2). mount /dev/cgroups

# mkdir /dev/cgroups
# mount -t cgroup cgroup /dev/cgroups
# virsh -c lxc:/// start vm1

# vi /var/log/libvirt/lxc/vm1.log
2013-03-05 03:15:49.660+0000: starting up
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin LIBVIRT_DEBUG=3 LIBVIRT_LOG_OUTPUTS=3:stderr /usr/libexec/libvirt_lxc --name vm1 --console
2013-03-05 03:15:49.666+0000: 2430: info : libvirt version: 1.0.2
2013-03-05 03:15:49.666+0000: 2430: warning : lxcCapsInit:73 : Failed to get host power management capabilities
PATH=/bin:/sbin TERM=linux container=lxc-libvirt container_uuid=518d6735-42d5-90b0-3780-d41a651385fc LIBVIRT_LXC_UUID=518d6735-42d5-90b0-3780-d41a651385fc LI
2013-03-05 03:15:49.749+0000: 1: error : lxcContainerMountCGroups:1892 : Failed to mount cgroup on '/dev/cgroups': No such file or directory
2013-03-05 03:15:49.749+0000: 2431: error : virLXCControllerRun:1468 : error receiving signal from container: Input/output error



Best Regards,
Olivia


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]