Bug 702594

Summary: -nodefconfig disable incorrect cpu-x86_64.conf file
Product: Red Hat Enterprise Linux 6 Reporter: Suqin Huang <shuang>
Component: qemu-kvmAssignee: Eduardo Habkost <ehabkost>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: ehabkost, juzhang, mkenneth, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-10 05:00:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Suqin Huang 2011-05-06 09:47:47 UTC
Description of problem:
-nodefconfig disable incorrect config files: /etc/qemu/target-x86_64.conf and /etc/qemu/qemu.conf file, there are no these two files actually, file /usr/share/qemu-kvm/cpu-model/cpu-x86_64.conf should be disabled

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.161.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Change cpu64-rhel6 to cpu64-rhel7 in /root/test.conf file

2.
/usr/libexec/qemu-kvm -nodefconfig -readconfig ? -readconfig /root/test.conf -cpu ?

parsed config file /usr/share/qemu-kvm/cpu-model/cpu-x86_64.conf
parsed config file /root/test.conf
x86       Opteron_G3
x86       Opteron_G2
x86       Opteron_G1
x86         Westmere
x86          Nehalem
x86           Penryn
x86           Conroe
x86      cpu64-rhel5
x86      cpu64-rhel7
x86       Opteron_G3
x86       Opteron_G2
x86       Opteron_G1
x86         Westmere
x86          Nehalem
x86           Penryn
x86           Conroe
x86      cpu64-rhel5
x86      cpu64-rhel6
x86           [n270]
x86         [athlon]
x86       [pentium3]
x86       [pentium2]
x86        [pentium]
x86            [486]
x86        [coreduo]
x86         [qemu32]
x86          [kvm64]
x86       [core2duo]
x86         [phenom]
x86         [qemu64]

3.
/usr/libexec/qemu-kvm  -readconfig ? -readconfig /root/test.conf -cpu ?
can't open config file /etc/qemu/qemu.conf: No such file or directory
can't open config file /etc/qemu/target-x86_64.conf: No such file or directory
parsed config file /usr/share/qemu-kvm/cpu-model/cpu-x86_64.conf
parsed config file /root/test.conf

Actual results:
/usr/share/qemu-kvm/cpu-model/cpu-x86_64.conf is not disabled, cpu models in /usr/share/qemu-kvm/cpu-model/cpu-x86_64.conf, /root/test.conf are displayed

Expected results:
/usr/share/qemu-kvm/cpu-model/cpu-x86_64.conf is disabled with -nodefconfig, only /root/test.conf is used

Additional info:

Comment 2 RHEL Program Management 2011-05-07 06:00:12 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 6 Eduardo Habkost 2011-12-09 12:44:17 UTC
This looks like the expected behavior at a first look (I don't know if libvirt or other code depends on the CPU models being always available, even with -nodefconfig). I will look for past discussions about -nodefconfig upstream to find out.

In the meantime, I'm setting Conditional NAK: Design.

Comment 7 Eduardo Habkost 2012-03-10 05:00:55 UTC
This is by design. See https://bugzilla.redhat.com/show_bug.cgi?id=610805

Also, see current upstream discussion about this:
http://article.gmane.org/gmane.comp.emulators.qemu/140368