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 707439 - Video device can not be removed from guest
Summary: Video device can not be removed from guest
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Osier Yang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-25 05:05 UTC by Min Zhan
Modified: 2011-12-06 11:11 UTC (History)
6 users (show)

Fixed In Version: libvirt-0.9.3-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 11:11: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:1513 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-12-06 01:23:30 UTC

Description Min Zhan 2011-05-25 05:05:00 UTC
Description of problem:
# virsh edit guest xml, remove video device, found it still exists.

Version-Release number of selected component (if applicable):
# uname -a
Linux mzhan 2.6.32-131.0.5.el6.x86_64 #1 SMP Wed Apr 20 00:16:35 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
qemu-kvm-0.12.1.2-2.159.el6.x86_64
libvirt-0.9.1-1.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. 
# virsh list --all
 Id Name                 State
----------------------------------
  5 rhel6                running
  - rhel61               shut off

# virsh dumpxml <guest>
...
   <video>
      <model type='qxl' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>

...
2.Remove video device from guest

# virsh edit rhel61
Domain rhel61 XML configuration edited.


3.# virsh dumpxml rhel61
...
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>

...

# cat /etc/libvirt/qemu/rhel61.xml 
...
      <video>
      <model type='cirrus' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
...

Actual results:
Video device is not removed from guest xml

Expected results:
Video device can be removed. 

Additional info:

Comment 1 Osier Yang 2011-06-01 13:43:29 UTC
For backwards compatability, if no <video> is set but there is a <graphics> tag, then we add a single <video>, for a guest of type "kvm", the default video for it
is: type="cirrus", vram="9216", and heads="1". 

That's why you removed the <video> tag, but still see it in the domain xml. 

So, this is not a bug, but it might need a tech note if don't have.

By the way, if you can still see the <video> tag after removing both <graphics> and "video", then it's bug, and you don't need to reproduce it by "virsh edit",
"virsh define" on a changed domain xml(keep the domain name and UUID same) will work.

Comment 2 Min Zhan 2011-06-02 02:38:00 UTC
(In reply to comment #1)

I have tried to define the domain xml without <graphics> and <video>, it works well and the guest xml will be without <video> element. 

So it is not a bug. But pls take a tech note for this compatibility by adding a single <video> if there is a <graphics> element for kvm guest. Thanks

Comment 3 Osier Yang 2011-06-07 09:00:19 UTC
patch pushed to upstream:


commit 99c8a5c8afd618cff8da10243fafe2b73f57141b
Author: Osier Yang <jyang>
Date:   Tue Jun 7 16:56:06 2011 +0800

    docs: Add doc for video element
    
    For backwards compatibility, if no <video> is set but there is a
    <graphics> tag, then we add a default <video> according to the
    guest type. Add docs to tell the user about this to not make
    them confused. Especially if they remove the video (such as via
    "virsh edit"), it will be surprised for them to see the video
    element is still in domain XML.

Comment 5 yuping zhang 2011-07-06 07:30:36 UTC
Tech note added in
http://libvirt.org/formatdomain.html#elementsVideo

video
The video element is the a container for describing video devices. For backwards compatability, if no video is set but there is a graphics in domain xml, then libvirt will add a default video according to the guest type. For a guest of type "kvm", the default video for it is: type with value "cirrus", vram with value "9216", and heads with value "1".

So change the status to VERIFIED.

Comment 6 errata-xmlrpc 2011-12-06 11:11:17 UTC
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


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