Bug 1336134 - Update graphic device with same setting as the running domain failed.
Summary: Update graphic device with same setting as the running domain failed.
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Pavel Hrdina
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-14 16:10 UTC by Fangge Jin
Modified: 2016-05-20 12:18 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-05-20 12:18:57 UTC
Embargoed:


Attachments (Terms of Use)

Description Fangge Jin 2016-05-14 16:10:20 UTC
Description of problem:
When graphic autoport is yes, update graphic device with same setting as running domain failed.

Version-Release number of selected component (if applicable):
# git describe 
v1.3.4-261-ga1ffedc

How reproducible:
100%

Steps to Reproduce:
1.Prepare a domain with graphic autoport=yes:
# virsh dumpxml rhel7
    <graphics type='spice' autoport='yes' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>

2.# virsh start rhel7

3.# virsh dumpxml rhel7
    <graphics type='spice' port='5900' autoport='yes' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>

4. Prepare a file containing same graphic setting as domain rhel7:
# cat /tmp/updategraphic
    <graphics type='spice' port='5900' autoport='yes' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>

5. Try to update graphic:
virsh # update-device rhel7 /tmp/updategraphic
error: Failed to update device from /tmp/updategraphic
error: Operation not supported: cannot change port settings on spice graphics


Actual results:
update device failed

Expected results:
update device successfully

Additional info:
When autoport='no', update can succeed.
    <graphics type='spice' port='5902' autoport='no' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>

Comment 1 Cole Robinson 2016-05-20 12:18:57 UTC
Upstream now:

commit 919d0b368e793d680549186a172ec763dba2df35
Author: Pavel Hrdina <phrdina>
Date:   Mon May 16 12:59:12 2016 +0200

    Revert "qemu_hotplug: fix checking graphics ports"
    
    This reverts commit 1ccc7fbff34ea44e5b0cf01a359d127a4c62a695.
    
    We cannot check ports if autoport is set because we set ports to 0 while
    parsing device XML.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1336134
    
    Signed-off-by: Pavel Hrdina <phrdina>


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