[Bug 1262641] [NEW] virsh save and virsh managedsave failed with cpu mode = host-passthrough

sirswa sirswa at gmail.com
Thu Dec 19 12:21:26 UTC 2013


Public bug reported:

Environment:
libvirt_cpu = host-passthrough
libvirt0, libvirt-bin 1.1.1-0ubuntu8~cloud2
qemu-kvm, qemu-utils, qemu-common 1.0+noroms-0ubuntu14.12
kvm 1:84+dfsg-0ubuntu16+1.0+noroms+0ubuntu14.12
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-ba53a370-259f-4f47-b3e5-c76eddf4ec86'

in libvirtd.log
2013-12-19 12:08:49.169+0000: 27906: error : virCommandWait:2348 : internal error: Child process (/usr/lib/libvirt/virt-aa-helper -p 0 -r -u libvirt-ba53a370-259f-4f47-b3e5-c76eddf4ec86) unexpected exit status 1: virt-aa-helper: error: could not parse XML
virt-aa-helper: error: could not get VM definition

2013-12-19 12:08:49.169+0000: 27906: error : AppArmorGenSecurityLabel:451 : internal error: cannot load AppArmor profile 'libvirt-ba53a370-259f-4f47-b3e5-c76eddf4ec86'
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-0000b600" uuid=ba53a370-259f-4f47-b3e5-c76eddf4ec86 old-disk="?" new-disk="/var/lib/nova/instances/ba53a370-259f-4f47-b3e5-c76eddf4ec86/disk": Operation not permitted
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-0000b600" uuid=ba53a370-259f-4f47-b3e5-c76eddf4ec86 old-disk="?" new-disk="/var/lib/nova/instances/ba53a370-259f-4f47-b3e5-c76eddf4ec86/disk.local": Operation not permitted
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-0000b600" uuid=ba53a370-259f-4f47-b3e5-c76eddf4ec86 old-net=? new-net=fa:16:3e:0d:17:12: Operation not permitted
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-0000b600" uuid=ba53a370-259f-4f47-b3e5-c76eddf4ec86 old-mem=0 new-mem=16777216: Operation not permitted
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-0000b600" uuid=ba53a370-259f-4f47-b3e5-c76eddf4ec86 old-vcpu=0 new-vcpu=4: Operation not permitted
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-0000b600" uuid=ba53a370-259f-4f47-b3e5-c76eddf4ec86 vm-pid=-1: Operation not permitted
2013-12-19 12:08:49.170+0000: 27906: warning : qemuDomainSaveImageStartVM:5452 : failed to restore save state label on /var/lib/libvirt/qemu/save/instance-0000b600.save


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 : virCPUDefParseXML:367 : XML error: Non-empty feature list specified without CPU model
2013-12-19 12:05:58.787+0000: 27913: error : virCPUDefParseXML:367 : XML error: Non-empty feature list specified without CPU model
2013-12-19 12:05:58.788+0000: 27913: error : virCPUDefParseXML:367 : XML error: Non-empty feature list specified without CPU model
2013-12-19 12:05:58.789+0000: 27913: error : virCPUDefParseXML:367 : XML error: Non-empty feature list specified without CPU model
2013-12-19 12:05:58.790+0000: 27913: error : virCPUDefParseXML:367 : XML error: Non-empty feature list specified without CPU model


When I check xml of save file, the CPU model information are missing.

#virsh save-image-dumpxml instance-0000b600

 <cpu mode='host-passthrough'>
    <feature policy='require' name='perfctr_nb'/>
    <feature policy='require' name='perfctr_core'/>
    <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-passthrough' match='minimum'>
    <model>Opteron_G4</model>
    <vendor>AMD</vendor>
    <feature policy='require' name='perfctr_nb'/>
    <feature policy='require' name='perfctr_core'/>
    <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://www.redhat.com/archives/libvirt-users/2013-November/msg00043.html


Thanks
regards,

Swe Aung

** Affects: libvirt (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: libvirt snapshot virsh

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in Ubuntu.
https://bugs.launchpad.net/bugs/1262641

Title:
  virsh save and virsh managedsave failed with cpu mode = host-
  passthrough

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1262641/+subscriptions



More information about the Ubuntu-server-bugs mailing list