Hide Forgot
Description of problem: as subject. Version-Release number of selected component (if applicable): libvirt-0.8.7-15.el6.x86_64 python-virtinst-0.500.5-3.el6.noarch virt-manager-0.8.6-3.el6.noarch How reproducible: Always Steps to Reproduce: 1. # virt-install -n demo -r 512 -f /var/lib/libvirt/images/demo.img -s 6 -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/RHEL6.1-20110323.1/6.1/Server/x86_64/os/ -x ks=http://home.englab.nay.redhat.com/~nzhang/kickstart/http/ks-rhel6u1-x86_64.cfg --graphics type=none --noreboot 2. Use virt-manager to add a virtual hardware "Graphics" -> "Type: VNC server" Actual results: Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/addhardware.py", line 932, in add_device self.vm.add_device(self._dev) File "/usr/share/virt-manager/virtManager/domain.py", line 268, in add_device self.redefine_cached() File "/usr/share/virt-manager/virtManager/domain.py", line 258, in redefine_cached self._redefine_xml(xml) File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 152, in _redefine_xml return self._redefine_helper(origxml, newxml) File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 142, in _redefine_helper self._define(newxml) File "/usr/share/virt-manager/virtManager/domain.py", line 957, in _define self.get_connection().define_domain(newxml) File "/usr/share/virt-manager/virtManager/connection.py", line 752, in define_domain self.vmm.defineXML(xml) File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1363, in defineXML if ret is None:raise libvirtError('virDomainDefineXML() failed', conn=self) libvirtError: internal error unable to reserve PCI address 0:0:2 Expected results: The graphics console can be added to guest successfully. Additional info:
# virt-manager --debug 2011-03-31 14:41:10,109 (virt-manager:175): Application startup 2011-03-31 14:41:10,109 (virt-manager:352): Launched as: /usr/share/virt-manager/virt-manager.py --debug 2011-03-31 14:41:10,185 (config:34): Error importing spice: No module named SpiceClientGtk 2011-03-31 14:41:10,287 (engine:335): About to connect to uris ['qemu:///system'] 2011-03-31 14:41:10,326 (engine:461): window counter incremented to 1 2011-03-31 14:41:10,367 (connection:872): Scheduling background open thread for qemu:///system 2011-03-31 14:41:10,368 (connection:1032): Background thread is running 2011-03-31 14:41:10,382 (connection:1060): Background open thread complete, scheduling notify 2011-03-31 14:41:10,406 (connection:1065): Notifying open result 2011-03-31 14:41:10,588 (connection:1072): qemu:///system capabilities: <capabilities> <host> <uuid>44454c4c-3800-104e-8058-c3c04f4b3258</uuid> <cpu> <arch>x86_64</arch> <model>Penryn</model> <vendor>Intel</vendor> <topology sockets='1' cores='2' threads='1'/> <feature name='xtpr'/> <feature name='tm2'/> <feature name='est'/> <feature name='vmx'/> <feature name='ds_cpl'/> <feature name='monitor'/> <feature name='pbe'/> <feature name='tm'/> <feature name='ht'/> <feature name='ss'/> <feature name='acpi'/> <feature name='ds'/> <feature name='vme'/> </cpu> <migration_features> <live/> <uri_transports> <uri_transport>tcp</uri_transport> </uri_transports> </migration_features> <topology> <cells num='1'> <cell id='0'> <cpus num='2'> <cpu id='0'/> <cpu id='1'/> </cpus> </cell> </cells> </topology> <secmodel> <model>selinux</model> <doi>0</doi> </secmodel> </host> <guest> <os_type>hvm</os_type> <arch name='i686'> <wordsize>32</wordsize> <emulator>/usr/libexec/qemu-kvm</emulator> <machine>rhel6.1.0</machine> <machine canonical='rhel6.1.0'>pc</machine> <machine>rhel6.0.0</machine> <machine>rhel5.5.0</machine> <machine>rhel5.4.4</machine> <machine>rhel5.4.0</machine> <domain type='qemu'> </domain> <domain type='kvm'> <emulator>/usr/libexec/qemu-kvm</emulator> </domain> </arch> <features> <cpuselection/> <deviceboot/> <pae/> <nonpae/> <acpi default='on' toggle='yes'/> <apic default='on' toggle='no'/> </features> </guest> <guest> <os_type>hvm</os_type> <arch name='x86_64'> <wordsize>64</wordsize> <emulator>/usr/libexec/qemu-kvm</emulator> <machine>rhel6.1.0</machine> <machine canonical='rhel6.1.0'>pc</machine> <machine>rhel6.0.0</machine> <machine>rhel5.5.0</machine> <machine>rhel5.4.4</machine> <machine>rhel5.4.0</machine> <domain type='qemu'> </domain> <domain type='kvm'> <emulator>/usr/libexec/qemu-kvm</emulator> </domain> </arch> <features> <cpuselection/> <deviceboot/> <acpi default='on' toggle='yes'/> <apic default='on' toggle='no'/> </features> </guest> </capabilities> 2011-03-31 14:41:10,753 (connection:545): Connection managed save support: True 2011-03-31 14:41:10,783 (connection:205): Using libvirt API for netdev enumeration 2011-03-31 14:41:10,784 (connection:244): Using libvirt API for mediadev enumeration 2011-03-31 14:41:20,881 (engine:461): window counter incremented to 2 2011-03-31 14:41:26,683 (addhardware:906): Adding device: <graphics type='vnc' port='-1' listen='127.0.0.1'/> 2011-03-31 14:41:26,694 (libvirtobject:140): Redefining 'demo' with XML diff: --- Original XML +++ New XML @@ -44,5 +44,6 @@ <memballoon model="virtio"> <address type="pci" domain="0x0000" bus="0x00" slot="0x04" function="0x0"/> </memballoon> + <graphics type="vnc" port="-1" listen="127.0.0.1"/> </devices> </domain> 2011-03-31 14:41:26,776 (error:66): dialog message: Error adding device: internal error unable to reserve PCI address 0:0:2 : Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/addhardware.py", line 932, in add_device self.vm.add_device(self._dev) File "/usr/share/virt-manager/virtManager/domain.py", line 268, in add_device self.redefine_cached() File "/usr/share/virt-manager/virtManager/domain.py", line 258, in redefine_cached self._redefine_xml(xml) File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 152, in _redefine_xml return self._redefine_helper(origxml, newxml) File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 142, in _redefine_helper self._define(newxml) File "/usr/share/virt-manager/virtManager/domain.py", line 957, in _define self.get_connection().define_domain(newxml) File "/usr/share/virt-manager/virtManager/connection.py", line 752, in define_domain self.vmm.defineXML(xml) File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1363, in defineXML if ret is None:raise libvirtError('virDomainDefineXML() failed', conn=self) libvirtError: internal error unable to reserve PCI address 0:0:2
Hi, nzhang, what's the domain xml?
# virsh dumpxml demo <domain type='kvm'> <name>demo</name> <uuid>9af0287b-2db5-9bc8-4fd8-bb9cfb1b642d</uuid> <memory>524288</memory> <currentMemory>524288</currentMemory> <vcpu>1</vcpu> <os> <type arch='x86_64' 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/demo.img'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </disk> <interface type='network'> <mac address='52:54:00:87:1a:e8'/> <source network='default'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </interface> <serial type='pty'> <target port='0'/> </serial> <console type='pty'> <target type='serial' port='0'/> </console> <input type='tablet' bus='usb'/> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </memballoon> </devices> </domain>
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.
patch posted to upstream: http://www.redhat.com/archives/libvir-list/2011-April/msg00243.html
This should be fixed by the libvirt-0.9.2-1.el6 rebase
libvirt-0.9.2-1.el6.x86_64 qemu-kvm-0.12.1.2-2.165.el6.x86_64 kernel-2.6.32-156.el6.x86_64 virt-manager-0.8.6-4.el6 Test step: 1) virt-install -n demo -r 512 -f /var/lib/libvirt/images/demo.img -s 6 -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.1/Server/x86_64/os/ -x ks=http://pxe.englab.nay.redhat.com/kickstarts/general/v2v-rhel6u1-64b-autotest.cfg --graphics none --noreboot 2) run virt-manager --debug then add vnc to domain *virt-manager --debug info * 2011-06-23 17:12:27,054 (engine:461): window counter incremented to 2 2011-06-23 17:12:27,056 (console:891): No graphics configured for guest 2011-06-23 17:12:34,557 (addhardware:906): Adding device: <graphics type='vnc' port='-1' listen='127.0.0.1'/> 2011-06-23 17:12:34,560 (addhardware:913): Device could not be hotplugged: unsupported configuration: device type 'graphics' cannot be attached 2011-06-23 17:12:34,562 (error:66): dialog message: Are you sure you want to add this device? : unsupported configuration: device type 'graphics' cannot be attached Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/addhardware.py", line 911, in add_device self.vm.attach_device(self._dev) File "/usr/share/virt-manager/virtManager/domain.py", line 1159, in attach_device self._backend.attachDevice(devxml) File "/usr/lib64/python2.6/site-packages/libvirt.py", line 298, in attachDevice if ret == -1: raise libvirtError ('virDomainAttachDevice() failed', dom=self) libvirtError: unsupported configuration: device type 'graphics' cannot be attached 2011-06-23 17:12:36,756 (libvirtobject:140): Redefining 'demo' with XML diff: --- Original XML ++ New XML @ -41,5 +41,6 @ <memballoon model="virtio"> <address type="pci" domain="0x0000" bus="0x00" slot="0x05" function="0x0"/> </memballoon> <graphics type="vnc" port="-1" listen="127.0.0.1"/> </devices> </domain> 2011-06-23 17:12:36,886 (console:891): No graphics configured for guest 3) There are some error message in virt-manager debug info ,when guest is running virsh dumpxml $domain can find any info about graphics. 4) But when guest finish installation and shutdown , we can find the the VNC will be attached in domain , virsh dumpxml domain will get ... <graphics type='vnc' port='5902' autoport='yes' listen='127.0.0.1'/> ... and virt-manager can via domain's graphics with VNC There are still some error message about graphics when attach VNC in virt-manager debug info : ... libvirtError: unsupported configuration: device type 'graphics' cannot be attached ... Do you think this is a new issue we need create a new bug for it or assigned this one ?
The error "device type 'graphics' cannot be attached" is expected, you might want to verify the bug with: Change following <snip> 2) run virt-manager --debug then add vnc to domain </snip> Into: 2) # virsh edit $domain, to add a graphic card. If you don't see error like "internal error unable to reserve PCI address 0:0:2", then the fix for this bug take effects. But for: <snip> 4) But when guest finish installation and shutdown , we can find the the VNC will be attached in domain , virsh dumpxml domain will get </snip> It's a bug, actually I tried to remove the graphic of a guest, it reports failure, however, the xml of graphics is removed in the domain xml. Please file another bug.
(In reply to comment #8) > The error "device type 'graphics' cannot be attached" is expected, you might > want to verify the bug with: > > Change following > > <snip> > 2) run virt-manager --debug then add vnc to domain > </snip> > > Into: > > 2) # virsh edit $domain, to add a graphic card. > > If you don't see error like "internal error unable to reserve PCI address > 0:0:2", then the fix for this bug take effects. > > But for: > > <snip> > 4) But when guest finish installation and shutdown , we can find the the VNC > will be attached in domain , virsh dumpxml domain will get > </snip> > > It's a bug, actually I tried to remove the graphic of a guest, it reports > failure, however, the xml of graphics is removed in the domain xml. Please file > another bug. I tried to use virsh edit to add a graphic card without any error info #virsh edit demo Domain demo XML configuration edited. this bug verified.
Set it as VERIFIED per comment9
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-1513.html