|Summary:||Video device can not be removed from guest|
|Product:||Red Hat Enterprise Linux 6||Reporter:||Min Zhan <mzhan>|
|Component:||libvirt||Assignee:||Osier Yang <jyang>|
|Status:||CLOSED ERRATA||QA Contact:||Virtualization Bugs <virt-bugs>|
|Version:||6.2||CC:||dallan, dyuan, llim, mshao, mzhan, yupzhang|
|Fixed In Version:||libvirt-0.9.3-1.el6||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2011-12-06 11:11:17 UTC||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Cloudforms Team:||---||Target Upstream Version:|
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