RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 592172 - RFE: Add parameter to set guest machine type
Summary: RFE: Add parameter to set guest machine type
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-virtinst
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Cole Robinson
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 655920
TreeView+ depends on / blocked
 
Reported: 2010-05-14 05:54 UTC by zhanghaiyan
Modified: 2011-05-19 13:45 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
virt-install now includes the --machine option. This is useful for manually choosing the guest machine type to emulate.
Clone Of:
Environment:
Last Closed: 2011-05-19 13:45:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0636 0 normal SHIPPED_LIVE python-virtinst bug fix and enhancement update 2011-05-18 17:55:48 UTC

Description zhanghaiyan 2010-05-14 05:54:35 UTC
Description of problem:
virt-install doesn't provide any parameter to set guest machine type, which causes all guest xml config file use default value 'machine='rhel6.0.0'' 

Version-Release number of selected component (if applicable):
- kernel-2.6.32-25.el6.x86_64
- python-virtinst-0.500.3-2.el6.noarch
- qemu-kvm-0.12.1.2-2.53.el6.x86_64
- qemu-img-0.12.1.2-2.53.el6.x86_64
- libvirt-0.8.1-3.el6.x86_64


How reproducible:
Always

Steps to Reproduce:
1. # virt-install -n rhel55-i386 -r 2048 -l http://download.englab.nay.redhat.com/pub/rhel/released/RHEL-5-Server/U5/i386/os/ -f /var/lib/libvirt/images/rhel55-i386.img
Starting install...
Retrieving file .treeinfo...                                                                                                          |  876 B     00:00 ... 
Retrieving file vmlinuz...                                                                                                            | 3.6 MB     00:00 ... 
Retrieving file initrd.img...                                                                                                         |  14 MB     00:00 ... 
Creating domain...  
2. # virsh dumpxml rhel55-i386
<domain type='kvm' id='2'>
  <name>rhel55-i386</name>
  <uuid>41fdcbb2-f6cf-cb03-e6c8-203e48cc0d9b</uuid>
  <memory>2097152</memory>
  <currentMemory>2097152</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='rhel6.0.0'>hvm</type>
................
  
Actual results:
Because no parameter to set guest machine type, rhel55 guest is defined as machine='rhel6.0.0' defautly. 

Expected results:
Provide parameter to set guest machine types, and give some value example:
# /usr/libexec/qemu-kvm -M ?
Supported machines are:
pc-0.12    Standard PC
pc-0.11    Standard PC, qemu 0.11
pc-0.10    Standard PC, qemu 0.10
isapc      ISA-only PC
pc         RHEL 6.0.0 PC (alias of rhel6.0.0)
rhel6.0.0  RHEL 6.0.0 PC (default)
rhel5.5.0  RHEL 5.5.0 PC
rhel5.4.4  RHEL 5.4.4 PC
rhel5.4.0  RHEL 5.4.0 PC

Additional info:
The same problem also appears when using python-virtinst to import a image to generate a guest

Comment 2 RHEL Program Management 2010-05-14 07:31:15 UTC
This feature request did not get resolved in time for Feature Freeze
for the current Red Hat Enterprise Linux release and has now been
denied. You may re-open your request by requesting your support
representative to propose it for the next release.

Comment 3 Daniel Berrangé 2010-05-14 09:53:36 UTC
Exposing it in virt-install is reasonable, but I think we should be wary of exposing machine type in the UI for virt-manager since I think it will seriously confuse users. With machine types like 'rhel-5.4.0', people will very likely think they should be making this match the OS version of their guest, when in fact this is refering to the host ABI & nothing todo with guest OS.

Comment 5 Cole Robinson 2010-06-22 14:36:46 UTC
Not sure why this is marked as 6.0, it's not hugely important IMO. Moving to 6.1

Comment 7 Cole Robinson 2010-12-07 15:00:59 UTC
--machine options added for virt-install:

http://hg.fedorahosted.org/hg/python-virtinst/rev/6d0e9e6adda1

Maybe for virt-manager we can only expose the machine type if using a non-intel arch.

Comment 8 Cole Robinson 2011-01-14 22:08:46 UTC
Fix built in python-virtinst-0.500.5-1.el6

Comment 10 koka xiong 2011-01-19 03:35:49 UTC
Verified with python-virtinst-0.500.5-1.el6
1.Run virt-install --help
 Virtualization Platform Options:
    --machine=MACHINE   The machine type to emulate
2.Run  virt-install -n rhel55-i386 -r 2048 -l http://download.englab.nay.redhat.com/pub/rhel/released/RHEL-5-Server/U5/i386/os/ --disk path=/var/lib/libvirt/images/rhel55-i386.img,size=6 --machine=rhel5.5.0
3.virsh dump-xml rhel55-i386
<os>
    <type arch='x86_64' machine='rhel5.5.0'>hvm</type>
    <boot dev='hd'/>
  </os>

Verification is passed

Comment 11 zhe peng 2011-04-15 09:58:33 UTC
verified this bug with:
Linux localhost.localdomain 2.6.32-130.el6.x86_64 #1 SMP Tue Apr 5 19:58:31 EDT
2011 x86_64 x86_64 x86_64 GNU/Linux

python-virtinst-0.500.5-3.el6.noarch
libvirt-0.8.7-17.el6.x86_64

passed.

Comment 13 Michael Hideo 2011-05-16 04:28:35 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
* virt-install now includes the --machine option. This is useful for manually choosing the guest machine type to emulate. (BZ#592172)

Comment 14 Michael Hideo 2011-05-16 21:45:48 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-* virt-install now includes the --machine option. This is useful for manually choosing the guest machine type to emulate. (BZ#592172)+virt-install now includes the --machine option. This is useful for manually choosing the guest machine type to emulate.

Comment 15 errata-xmlrpc 2011-05-19 13:45:17 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0636.html


Note You need to log in before you can comment on or make changes to this bug.