| Summary: | virt-image: cannot attach graphic console to guest from default xml desc | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Nan Zhang <nzhang> |
| Component: | python-virtinst | Assignee: | Cole Robinson <crobinso> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.1 | CC: | dyuan, llim, mzhan, rwu, zpeng |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
No description necessary
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-12-06 16:16:29 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
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. I can't reproduce. Please show the results of virt-image image.xml --print --debug and virsh dumpxml $vmname after running the original command virt-manager image.xml Okay, the outputs as follows.
# virt-image image.xml --print --debug
Fri, 08 Apr 2011 12:53:59 DEBUG Launched with command line:
/usr/bin/virt-image image.xml --print --debug
Fri, 08 Apr 2011 12:53:59 DEBUG Requesting libvirt URI default
Fri, 08 Apr 2011 12:53:59 DEBUG Received libvirt URI qemu:///system
Fri, 08 Apr 2011 12:54:00 DEBUG DISPLAY is not set: defaulting to nographics.
Fri, 08 Apr 2011 12:54:00 DEBUG Generated install XML: None required
Fri, 08 Apr 2011 12:54:00 DEBUG Generated boot XML:
<domain type='kvm'>
<name>vm1</name>
<currentMemory>524288</currentMemory>
<memory>524288</memory>
<uuid>54ef4c92-1a58-fb25-18c6-d16d9c540915</uuid>
<os>
<type arch='i686'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/><apic/><pae/>
</features>
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<vcpu>1</vcpu>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none' io='threads'/>
<source file='/var/lib/libvirt/images/vm1.img'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='network'>
<source network='default'/>
<mac address='52:54:00:75:31:84'/>
</interface>
<input type='mouse' bus='ps2'/>
<console type='pty'/>
</devices>
</domain>
<domain type='kvm'>
<name>vm1</name>
<currentMemory>524288</currentMemory>
<memory>524288</memory>
<uuid>54ef4c92-1a58-fb25-18c6-d16d9c540915</uuid>
<os>
<type arch='i686'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/><apic/><pae/>
</features>
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<vcpu>1</vcpu>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none' io='threads'/>
<source file='/var/lib/libvirt/images/vm1.img'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='network'>
<source network='default'/>
<mac address='52:54:00:75:31:84'/>
</interface>
<input type='mouse' bus='ps2'/>
<console type='pty'/>
</devices>
</domain>
# virt-image image.xml
Creating guest vm1...
Creating domain... | 0 B 00:00
# virsh dumpxml vm1
<domain type='kvm' id='35'>
<name>vm1</name>
<uuid>966a3ecb-7614-50c8-dd29-da651e877b84</uuid>
<memory>524288</memory>
<currentMemory>524288</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='rhel6.1.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none' io='threads'/>
<source file='/var/lib/libvirt/images/vm1.img'/>
<target dev='hda' bus='ide'/>
<alias name='ide0-0-0'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<controller type='ide' index='0'>
<alias name='ide0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='network'>
<mac address='52:54:00:64:b2:cf'/>
<source network='default'/>
<target dev='vnet0'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/3'/>
<target port='0'/>
<alias name='serial0'/>
</serial>
<console type='pty' tty='/dev/pts/3'>
<source path='/dev/pts/3'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
<memballoon model='virtio'>
<alias name='balloon0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</memballoon>
</devices>
<seclabel type='dynamic' model='selinux'>
<label>system_u:system_r:svirt_t:s0:c532,c831</label>
<imagelabel>system_u:object_r:svirt_image_t:s0:c532,c831</imagelabel>
</seclabel>
</domain>
Fixed upstream: http://git.fedorahosted.org/git?p=python-virtinst.git;a=commit;h=4721ee558d568c0a864d19a01e7125aee627f1e5 Fixed in python-virtinst-0.600.0-1.el6 Verify with :
python-virtinst-0.600.0-1.el6
libvirt-0.9.4-0rc1.el6
qemu-kvm-0.12.1.2-2.172.el6
step:
1:remove os key,run command:
#unset DISPLAY
2:#cat test_image.xml
<image>
<name>vm1</name>
<domain>
<boot type="hvm">
<guest>
<arch>i386</arch>
</guest>
<os>
<loader dev="hd"/>
</os>
<drive disk="mydisk" target="hda"/>
</boot>
<devices>
<vcpu>1</vcpu>
<memory>524288</memory>
<interface/>
<graphics type="vnc" port="-1"/>
</devices>
</domain>
<storage>
<disk id="mydisk" file="/tmp/test/ESX3.5-RHEL6-x64-20100807.0-flat.raw" use="system" format="raw"/>
</storage>
</image>
3:virt-image test_image --debug
Tue, 02 Aug 2011 03:55:28 DEBUG Launched with command line:
/usr/bin/virt-image test_image.xml --debug
Tue, 02 Aug 2011 03:55:28 DEBUG Requesting libvirt URI default
Tue, 02 Aug 2011 03:55:28 DEBUG Received libvirt URI qemu:///system
Tue, 02 Aug 2011 03:55:28 DEBUG --graphics compat generated: vnc
Creating guest vm1...
Tue, 02 Aug 2011 03:55:28 DEBUG Generated install XML: None required
Tue, 02 Aug 2011 03:55:28 DEBUG Generated boot XML:
<domain type='kvm'>
<name>vm1</name>
<uuid>1301a091-594a-0477-31c3-b5b3876e95ca</uuid>
<memory>524288</memory>
<currentMemory>524288</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/><apic/><pae/>
</features>
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/tmp/test/ESX3.5-RHEL6-x64-20100807.0-flat.raw'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='network'>
<source network='default'/>
<mac address='52:54:00:e3:37:b4'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1'/>
<console type='pty'/>
<video>
<model type='cirrus'/>
</video>
</devices>
</domain>
Creating domain... | 0 B 00:00
Tue, 02 Aug 2011 03:55:29 DEBUG Started guest, connecting to console if requested
Tue, 02 Aug 2011 03:55:29 DEBUG XML fetched from libvirt object:
<domain type='kvm' id='47'>
<name>vm1</name>
<uuid>1301a091-594a-0477-31c3-b5b3876e95ca</uuid>
<memory>524288</memory>
<currentMemory>524288</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='rhel6.2.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/tmp/test/ESX3.5-RHEL6-x64-20100807.0-flat.raw'/>
<target dev='hda' bus='ide'/>
<alias name='ide0-0-0'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<controller type='ide' index='0'>
<alias name='ide0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='network'>
<mac address='52:54:00:e3:37:b4'/>
<source network='default'/>
<target dev='vnet0'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/2'/>
<target port='0'/>
<alias name='serial0'/>
</serial>
<console type='pty' tty='/dev/pts/2'>
<source path='/dev/pts/2'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5900' autoport='yes'/>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<alias name='video0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<alias name='balloon0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</memballoon>
</devices>
<seclabel type='dynamic' model='selinux' relabel='yes'>
<label>system_u:system_r:svirt_t:s0:c358,c719</label>
<imagelabel>system_u:object_r:svirt_image_t:s0:c358,c719</imagelabel>
</seclabel>
</domain>
Verification passed.
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:
No description necessary
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. http://rhn.redhat.com/errata/RHBA-2011-1643.html |
Description of problem: as subject. Version-Release number of selected component (if applicable): python-virtinst-0.500.5-3.el6.noarch How reproducible: Always Steps to Reproduce: # cat image.xml <image> <name>vm1</name> <domain> <boot type="hvm"> <guest> <arch>i386</arch> </guest> <os> <loader dev="hd"/> </os> <drive disk="mydisk" target="hda"/> </boot> <devices> <vcpu>1</vcpu> <memory>524288</memory> <interface/> <graphics type="vnc" port="-1"/> </devices> </domain> <storage> <disk id="mydisk" file="/var/lib/libvirt/images/vm1.img" use="system" format="raw"/> </storage> </image> # virt-image image.xml Actual results: With no graphic console defined in guest. Expected results: With graphic console defined in guest. Additional info: Specifying with --graphics or --vnc can workaround this problem.