Hide Forgot
Description of problem: guest can not start when setting " vcpu placement='auto' " Version-Release number of selected component (if applicable): libvirt-1.2.8-10.el7.x86_64 qemu-kvm-rhev-2.1.2-14.el7.x86_64 kernel-3.10.0-201.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.[root@localhost songwang]# virsh edit aa Domain aa XML configuration edited. 2.[root@localhost songwang]# virsh dumpxml aa |grep cpu -A4 <vcpu placement='auto' current='2'>4</vcpu> <numatune> <memory mode='strict' placement='auto'/> </numatune> <os> 3.[root@localhost songwang]# virsh start aa error: Failed to start domain aa error: Failed to create controller cpu for group: No such file or directory 4. [root@localhost songwang]# virsh dumpxml aa |grep cpu <vcpu placement='static' current='2'>4</vcpu> 5.[root@localhost songwang]# virsh start aa Domain aa started Actual results: As steps Expected results: It should start guest successfully. Additional info: when I downgrade libvirt to libvirt-1.2.8-9.el7.x86_64 ,I can start guest successfully. [root@localhost Downloads]# rpm -q libvirt libvirt-1.2.8-9.el7.x86_64 [root@localhost Downloads]# virsh edit aa Domain aa XML configuration edited. [root@localhost Downloads]# virsh dumpxml aa |grep cpu -A4 <vcpu placement='auto' current='2'>4</vcpu> <numatune> <memory mode='strict' placement='auto'/> </numatune> <os> [root@localhost Downloads]# virsh start aa Domain aa started
Created attachment 964446 [details] Libvirtd log
I think this is Because bug 1168866 forget this patch commit 411cea638f6ec8503b7142a31e58b1cd85dbeaba Author: Zhou yimin <zhouyimin> Date: Thu Oct 16 22:18:48 2014 +0800 qemu: move setting emulatorpin ahead of monitor showing up If VM is configured with many devices(including passthrough devices) and large memory, libvirtd will take seconds(in the worst case) to wait for monitor. In this period the qemu process may run on any PCPU though I intend to pin emulator to the specified PCPU in xml configuration. Actually qemu process takes high cpu usage during vm startup. So this is not the strict CPU isolation in this case. Signed-off-by: Zhou yimin <zhouyimin> And because qemuSetupCgroupForEmulator haven't been called before qemuSetupCpusetMems in qemuSetupCgroupPostInit, then call virCgroupNewEmulator(priv->cgroup, false, &cgroup_temp) in qemuSetupCpusetMems. Because create is false in this place(virCgroupNewEmulator) and haven't call qemuSetupCgroupForEmulator to create a dir before, so this will get fail in virCgroupMakeGroup this line: if (!virFileExists(path)) { if (!create || mkdir(path, 0755) < 0) {
This problem is fixed in libvirt-1.2.8-11.el7.x86_64: # rpm -q libvirt libvirt-1.2.8-11.el7.x86_64 1. configure a guest as automatic vcpu placement # virsh edit a ... <vcpu placement='auto'>4</vcpu> <numatune> <memory mode='strict' placement='auto'/> </numatune> ... 2. succeed to start guest # virsh start a Domain a started So I change the status to VERIFIED.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-0323.html