Bug 1182448
Summary: | cpu features are not formatted in XML for host-model | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Song Wang <sowang> |
Component: | libvirt | Assignee: | Ján Tomko <jtomko> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | CC: | dyuan, jdenemar, jmiao, lmiksik, mzhan, rbalakri |
Target Milestone: | rc | Keywords: | Regression |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.8-14.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-03-05 07:49:10 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Song Wang
2015-01-15 06:37:45 UTC
My commit dd324bb2703b9cf619c521b2a04f186cd9734f0a Do not format CPU features without a model git describe: v1.2.11-rc2-5-g15abebd which was backported for bug 1151885 relied on commit addce06c9221f948072cd222b56ea9c3f70ec066 PowerPC : Add support for launching VM in 'compat' mode. git describe: v1.2.10-40-gaddce06 which wasn't. Without it, the features are only formatted for 'custom' mode CPU. Verify it as follows: 1.[root@localhost songwang]# rpm -q libvirt libvirt-1.2.8-15.el7.x86_64 2.[root@localhost songwang]# virsh list --all Id Name State ---------------------------------------------------- - aa shut off 3.add these to xml. <cpu mode='host-model'> <model fallback='allow'/> <feature policy='require' name='invtsc'/> </cpu> 4.[root@localhost songwang]# virsh start aa Domain aa started 5.[root@localhost songwang]# virsh dumpxml aa |grep cpu -A5 -- <cpu mode='host-model'> <model fallback='allow'/> <feature policy='require' name='invtsc'/> </cpu> 6.[root@localhost songwang]# ps aux |grep qemu qemu 23008 15.7 3.8 1914748 297604 ? Sl 13:50 0:20 /usr/libexec/qemu-kvm -name aa -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -cpu SandyBridge,+invtsc,+erms,+smep,+fsgsbase,+rdrand,+f16c,+osxsave,+pcid,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme -m 1024 -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -uuid 23d19d5a-ee01-4a2b-bec9-948fca512c00 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/aa.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device pci-bridge,chassis_nr=1,id=pci.1,bus=pci.0,addr=0x3 -device nec-usb-xhci,id=usb,bus=pci.0,addr=0x6 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4 -drive file=/var/lib/libvirt/images/r7.qcow2,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -netdev tap,fds=23:24:25:26:27,id=hostnet0,vhost=on,vhostfds=28:29:30:31:32 -device virtio-net-pci,ioeventfd=on,event_idx=on,mq=on,vectors=12,netdev=hostnet0,id=net0,mac=52:54:00:c9:7d:a5,bus=pci.0,addr=0x5 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=8,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x7 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x9 -msg timestamp=on root 23195 0.0 0.0 112640 964 pts/0 S+ 13:52 0:00 grep --color=auto qemu 7.[root@localhost songwang]# virsh destroy aa Domain aa destroyed 8.[root@localhost songwang]# virsh start aa Domain aa started 9.[root@localhost songwang]# virsh dumpxml aa |grep cpu -A5 -- <cpu mode='host-model'> <model fallback='allow'/> <feature policy='require' name='invtsc'/> </cpu> 10.[root@localhost songwang]# ps aux |grep qemu qemu 23317 17.8 3.7 1914748 295708 ? Sl 13:53 0:20 /usr/libexec/qemu-kvm -name aa -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -cpu SandyBridge,+invtsc,+erms,+smep,+fsgsbase,+rdrand,+f16c,+osxsave,+pcid,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme -m 1024 -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -uuid 23d19d5a-ee01-4a2b-bec9-948fca512c00 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/aa.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device pci-bridge,chassis_nr=1,id=pci.1,bus=pci.0,addr=0x3 -device nec-usb-xhci,id=usb,bus=pci.0,addr=0x6 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4 -drive file=/var/lib/libvirt/images/r7.qcow2,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -netdev tap,fds=23:24:25:26:27,id=hostnet0,vhost=on,vhostfds=28:29:30:31:32 -device virtio-net-pci,ioeventfd=on,event_idx=on,mq=on,vectors=12,netdev=hostnet0,id=net0,mac=52:54:00:c9:7d:a5,bus=pci.0,addr=0x5 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=8,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x7 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x9 -msg timestamp=on root 23480 0.0 0.0 112640 964 pts/0 S+ 13:54 0:00 grep --color=auto qemu bug is fixed ,so change the state to VERIFIED additional test: [root@localhost songwang]# virsh start aa Domain aa started [root@localhost songwang]# virsh save aa aa.save error: Failed to save domain aa to aa.save error: Requested operation is not valid: domain has CPU feature: invtsc 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 |