virsh save and virsh managedsave failed with cpu mode = host-passthrough
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Trusty |
Fix Released
|
High
|
Unassigned |
Bug Description
=======
SRU Justification:
1. Impact: virsh save fails when cpu mode is passthrough
2. Test case: create a VM with <cpu mode='host-
virsh managed save <vm domain> --bypass-cache --verbose
3. Regression potential: The patch is minimal and should not affect any VMs which are not cpud mode=passthrough
=======
Environment:
libvirt_cpu = host-passthrough
libvirt0, libvirt-bin 1.1.1-0ubuntu8~
qemu-kvm, qemu-utils, qemu-common 1.0+noroms-
kvm 1:84+dfsg-
apparmor 2.7.102-0ubuntu3.9
Kernel 3.5.0-44-generic
lsb-release Ubuntu 12.04.3 LTS
Problem:
I have a VM created with cpu mode = host-passthrough.
When I do
virsh managed save <vm domain> --bypass-cache --verbose,
the vm was left in shutoff, instead of runing and not able to start up even I do virsh start <vm domain>
#virsh start instance-0000b600
error: Failed to start domain instance-0000b600
error: internal error: cannot load AppArmor profile 'libvirt-
in libvirtd.log
2013-12-19 12:08:49.169+0000: 27906: error : virCommandWait:2348 : internal error: Child process (/usr/lib/
virt-aa-helper: error: could not get VM definition
2013-12-19 12:08:49.169+0000: 27906: error : AppArmorGenSecu
2013-12-19 12:08:49.170+0000: 27906: warning : virAuditSend:135 : Failed to send audit message virt=kvm resrc=disk reason=start vm="instance-
2013-12-19 12:08:49.170+0000: 27906: warning : virAuditSend:135 : Failed to send audit message virt=kvm resrc=disk reason=start vm="instance-
2013-12-19 12:08:49.170+0000: 27906: warning : virAuditSend:135 : Failed to send audit message virt=kvm resrc=net reason=start vm="instance-
2013-12-19 12:08:49.170+0000: 27906: warning : virAuditSend:135 : Failed to send audit message virt=kvm resrc=mem reason=start vm="instance-
2013-12-19 12:08:49.170+0000: 27906: warning : virAuditSend:135 : Failed to send audit message virt=kvm resrc=vcpu reason=start vm="instance-
2013-12-19 12:08:49.170+0000: 27906: warning : virAuditSend:135 : Failed to send audit message virt=kvm op=start reason=restored vm="instance-
2013-12-19 12:08:49.170+0000: 27906: warning : qemuDomainSaveI
If I restart libvirt-bin at this point, the error complains about Non-empty feature list specified without CPU
2013-12-19 12:05:58.786+0000: 27913: info : libvirt version: 1.1.1
2013-12-19 12:05:58.786+0000: 27913: error : virCPUDefParseX
2013-12-19 12:05:58.787+0000: 27913: error : virCPUDefParseX
2013-12-19 12:05:58.788+0000: 27913: error : virCPUDefParseX
2013-12-19 12:05:58.789+0000: 27913: error : virCPUDefParseX
2013-12-19 12:05:58.790+0000: 27913: error : virCPUDefParseX
When I check xml of save file, the CPU model information are missing.
#virsh save-image-dumpxml instance-0000b600
<cpu mode='host-
<feature policy='require' name='perfctr_nb'/>
<feature policy='require' name='perfctr_
<feature policy='require' name='topoext'/>
<feature policy='require' name='nodeid_msr'/>
<feature policy='require' name='lwp'/>
<feature policy='require' name='wdt'/>
<feature policy='require' name='skinit'/>
<feature policy='require' name='ibs'/>
<feature policy='require' name='osvw'/>
<feature policy='require' name='cr8legacy'/>
<feature policy='require' name='extapic'/>
<feature policy='require' name='cmp_legacy'/>
<feature policy='require' name='fxsr_opt'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='osxsave'/>
<feature policy='require' name='monitor'/>
<feature policy='require' name='ht'/>
<feature policy='require' name='vme'/>
</cpu>
xml of the vm
#virsh dumpxml <vm domain> --update-cpu
<cpu mode='host-
<model>
<vendor>
<feature policy='require' name='perfctr_nb'/>
<feature policy='require' name='perfctr_
<feature policy='require' name='topoext'/>
<feature policy='require' name='nodeid_msr'/>
<feature policy='require' name='lwp'/>
<feature policy='require' name='wdt'/>
<feature policy='require' name='skinit'/>
<feature policy='require' name='ibs'/>
<feature policy='require' name='osvw'/>
<feature policy='require' name='cr8legacy'/>
<feature policy='require' name='extapic'/>
<feature policy='require' name='cmp_legacy'/>
<feature policy='require' name='fxsr_opt'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='osxsave'/>
<feature policy='require' name='monitor'/>
<feature policy='require' name='ht'/>
<feature policy='require' name='vme'/>
</cpu>
I did not have the problem with libvirt 0.9.8 earlier, before upgrade libvirt to 1.1.1
PS. I found the similar report here also https:/
Thanks
regards,
Swe Aung
Changed in libvirt (Ubuntu): | |
status: | Fix Released → Triaged |
Changed in libvirt (Ubuntu): | |
status: | Triaged → Fix Released |
Changed in libvirt (Ubuntu Trusty): | |
importance: | Undecided → High |
description: | updated |
Status changed to 'Confirmed' because the bug affects multiple users.