Bug 818996
Summary: | [rfe] allow to disable usb & vga altogether | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Gerd Hoffmann <kraxel> | ||||
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> | ||||
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.3 | CC: | acathrow, ajia, dallan, dyasny, dyuan, juzhang, mzhan, rjones, rwu, weizhan | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | libvirt-0.10.0-0rc1.el6 | Doc Type: | Enhancement | ||||
Doc Text: |
Feature:
This feature allows the user to disable USB and graphics controllers in guest machines. In default configuration those controllers are automatically used.
Reason:
Some users prefer to run minimal configurations for server systems without the need for graphics or USB support.
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-02-21 07:12:42 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Gerd Hoffmann
2012-05-04 14:44:16 UTC
While being at it: There is a simliar issue with the vga, there seems to be no way to configure a vm without <video>. Created attachment 583019 [details]
pseries.xml
Use case: upstream qemu, pseries emulation, install rhel6/ppc64 there.
Gerd, I generally use VMs without video. I have no <video> tag in my xml, and I get -nographic on the qemu command line. If you have a <graphics> tag, though, libvirt will auto create the <video> tag. Is that what you mean? Ah, that sort-of makes sense. You can map the serial console to the vnc display though (-serial vc), in which case the it makes sense to have <graphics> without <video>. What is the general support plan for non-pc machine types? You quickly run into all sorts of issues then as libvirt has '-M pc' assumtions built in all over the place. Is isapc supposted to work? How about ppc / arm emulation? Should I file bugs for all issues I run into when trying to run qemu-system-ppc64 with libvirt? (In reply to comment #6) > Ah, that sort-of makes sense. You can map the serial console to the vnc > display though (-serial vc), in which case the it makes sense to have > <graphics> without <video>. I see; would you mind filing a separate BZ about this behavior? It seems quite different from the original report about USB. > What is the general support plan for non-pc machine types? You quickly run > into all sorts of issues then as libvirt has '-M pc' assumtions built in all > over the place. Is isapc supposted to work? How about ppc / arm emulation? > Should I file bugs for all issues I run into when trying to run > qemu-system-ppc64 with libvirt? Yes, please do. Re #7: Well, it is simliar, both <controller usb> and <video> get added automatically and there is no way to disable this, using via model='none' for example. Fair enough; sounds like we've got a bunch of problems in this area that could use a little attention. Libvirt does support removing video device when you remove the definition from the XML (it's not automaticaly added). On the other hand libvirt automaticaly adds USB bus to the guest. This can be now avoided with usb controller model=none that was added upstream with: commit fbe871263c7050b59accf10bd3517e4cd5758683 Author: Peter Krempa <pkrempa> Date: Tue Jul 3 15:43:13 2012 +0200 qemu: Add support for "none" USB controller commit 317badb213f88da3cf7eb9e65afd55492801d57c Author: Peter Krempa <pkrempa> Date: Tue Jul 3 15:30:25 2012 +0200 domain_conf: Add helpers to verify if device configuration is valid commit 0925189713c5f9479fdfa176b5a47a7a225cebd6 Author: Peter Krempa <pkrempa> Date: Mon Jul 2 17:28:43 2012 +0200 domain_conf: Add USB controler model "none" Moving to POST as this change will be picked up by rebasing. Verify PASS on libvirt-0.10.0-0rc1.el6.x86_64 kernel-2.6.32-289.el6.x86_64 qemu-kvm-0.12.1.2-2.302.el6.x86_64 1. usb hub with controller and model = none # cat usb-hub.xml <domain type='kvm'> <name>QEMUGuest1</name> <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> <memory unit='KiB'>219136</memory> <currentMemory unit='KiB'>219136</currentMemory> <vcpu placement='static'>1</vcpu> <os> <type arch='i686' machine='pc'>hvm</type> <boot dev='hd'/> </os> <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <controller type='usb' model='none' index='0'/> <memballoon model='virtio'/> <hub type='usb'> <address type='usb' bus='0' port='1'/> </hub> </devices> </domain> # virsh define usb-hub.xml error: Failed to define domain from usb-hub.xml error: unsupported configuration: Can't add USB hub: USB is disabled for this domain 2. 2 usb controllers with 1 model = none # cat usb-2.xml <domain type='kvm'> <name>QEMUGuest1</name> <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> <memory unit='KiB'>219136</memory> <currentMemory unit='KiB'>219136</currentMemory> <vcpu placement='static'>1</vcpu> <os> <type arch='i686' machine='pc'>hvm</type> <boot dev='hd'/> </os> <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <controller type='usb' model='none' index='0'/> <controller type='usb' index='0'/> <memballoon model='virtio'/> </devices> </domain> # virsh define usb-2.xml error: Failed to define domain from usb-2.xml error: Can't add another USB controller: USB is disabled for this domain 3. usb tablet with controller and model = none # cat usb-tablet.xml <domain type='kvm'> <name>QEMUGuest1</name> <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> <memory unit='KiB'>219136</memory> <currentMemory unit='KiB'>219136</currentMemory> <vcpu placement='static'>1</vcpu> <os> <type arch='i686' machine='pc'>hvm</type> <boot dev='hd'/> </os> <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <controller type='usb' model='none' index='0'/> <input type='tablet' bus='usb'/> <memballoon model='virtio'/> </devices> </domain> <domain type='kvm'> <name>QEMUGuest1</name> <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> <memory unit='KiB'>219136</memory> <currentMemory unit='KiB'>219136</currentMemory> <vcpu placement='static'>1</vcpu> <os> <type arch='i686' machine='pc'>hvm</type> <boot dev='hd'/> </os> <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <controller type='usb' model='none' index='0'/> <input type='tablet' bus='usb'/> <memballoon model='virtio'/> </devices> </domain> # virsh define usb-tablet.xml error: Failed to define domain from usb-tablet.xml error: unsupported configuration: Can't add USB input device. USB bus is disabled 4. only 1 usb controller with model=none # cat test.xml <domain type='kvm'> <name>test</name> <uuid>73126058-c5a2-846c-428c-5b3ab8f4c2ec</uuid> <memory unit='KiB'>8388608</memory> <currentMemory unit='KiB'>8388608</currentMemory> <vcpu placement='static'>1</vcpu> <os> <type arch='x86_64' machine='rhel6.3.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='/var/lib/libvirt/images/test1.img'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </disk> <controller type='usb' index='0' model='none'> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </controller> <memballoon model='none'/> </devices> </domain> # virsh define test.xml # virsh start test Domain test started # ps aux |grep qemu-kvm /usr/libexec/qemu-kvm -name test -S -M rhel6.3.0 -enable-kvm -m 8192 -smp 1,sockets=1,cores=1,threads=1 -uuid 73126058-c5a2-846c-428c-5b3ab8f4c2ec -nographic -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/test1.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -drive file=/var/lib/libvirt/images/test1.img,if=none,id=drive-virtio-disk0,format=raw,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 without usb controller and vga 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/RHSA-2013-0276.html |