Hide Forgot
Description of problem: The vendor_id attribute should be disabled when the cpu mode is 'host-model'. If keep it , the vendor_id will be not identical between guest os and domain'xml. Version-Release number of selected component (if applicable): libvirt-0.10.1-2.el6.x86_64 qemu-kvm-0.12.1.2-2.307.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1. # virsh start rhel6.2 Domain rhel6.2 started 2.Login guest .check cpu vendor id # cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 42 model name : Intel(R) Xeon(R) CPU E31225 @ 3.10GHz stepping : 7 ...snipped... 3. # virsh dumpxml rhel6.2 <domain type='kvm' id='73'> ...... <cpu mode='host-model'> <model fallback='forbid' vendor_id='AuthenticAMD'/> </cpu> ...... </domain> Actual results: The vendor_id attribute isn't disabled. Expected results: The vendor_id attribute should be disabled. Additional info:
According to the following patch,there is one important scenario - Migrating guest from one host to another with different cpu vendors is a problem. Using a windows 7 or 8 image on different cpus could for example require a (re-)activation. The vendor_id can solve it. http://www.redhat.com/archives/libvir-list/2012-July/msg00439.html Maybe the vendor_id attribute should be effective when the cpu mode is 'host-model'. So please ignore the above expected results .
I believe this is behavior by design, so I am closing as NOTABUG, but feel free to comment/reopen if you disagree.
I don't think it's by design. We should either fail to define such domain or obey vendor_id. We shouldn't just silently ignore it.
(In reply to comment #4) > I don't think it's by design. We should either fail to define such domain or > obey vendor_id. We shouldn't just silently ignore it. Ok, that wasn't clear to me.
This bug was not selected to be addressed in Red Hat Enterprise Linux 6. We will look at it again within the Red Hat Enterprise Linux 7 product.
Patch sent upstream for review: https://www.redhat.com/archives/libvir-list/2015-April/msg01540.html
Pushed upstream as v1.2.15-rc1-31-g01ecee2: commit 01ecee247a4b172d89c90e13c433e47d89bb2283 Author: Jiri Denemark <jdenemar> Date: Thu Apr 30 11:10:16 2015 +0200 cpu: Honor vendor_id override in host-model https://bugzilla.redhat.com/show_bug.cgi?id=858147 Signed-off-by: Jiri Denemark <jdenemar>
I can reproduce this issue with libvirt-1.2.14-1.el7.x86_64: 1. prepare a vm have xml like this: <cpu mode='host-model'> <model fallback='forbid' vendor_id='GenuineIntel'/> <numa> <cell id='0' cpus='0' memory='512000' unit='KiB'/> <cell id='1' cpus='1' memory='512000' unit='KiB'/> </numa> </cpu> 2. check qemu command line there is no vendor_id and login guest check the cpu vendor is not changed: #ps aux|grep qemu -cpu Opteron_G5,+bmi1,+perfctr_nb,+perfctr_core,+topoext,+nodeid_msr,+tce,+lwp,+wdt,+skinit,+ibs,+osvw,+cr8legacy,+extapic,+cmp_legacy,+fxsr_opt,+mmxext,+osxsave,+monitor,+ht,+vme And verify this bug with libvirt-1.2.16-1.el7.x86_64: 1. prepare a vm have xml like this: <cpu mode='host-model'> <model fallback='forbid' vendor_id='GenuineIntel'/> <numa> <cell id='0' cpus='0' memory='512000' unit='KiB'/> <cell id='1' cpus='1' memory='512000' unit='KiB'/> </numa> </cpu> 2. check qemu command line and login guest check the cpu vendor_id: # ps aux|grep qemu -cpu Opteron_G5,vendor=GenuineIntel,+bmi1,+perfctr_nb,+perfctr_core,+topoext,+nodeid_msr,+tce,+lwp,+wdt,+skinit,+ibs,+osvw,+cr8legacy,+extapic,+cmp_legacy,+fxsr_opt,+mmxext,+osxsave,+monitor,+ht,+vme
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/RHBA-2015-2202.html