From 4e78ffb63489071c4100678ed88d3111284555e8 Mon Sep 17 00:00:00 2001
From: Alon Levy main
, display
,
inputs
, cursor
,
- playback
, record
;
- and since
- 0.8.8: smartcard
.
+ playback
, record
+ (all since 0.8.6);
+ smartcard
(since
+ 0.8.8); and usbredir
+ (since 0.9.12).
<graphics type='spice' port='-1' tlsPort='-1' autoport='yes'> diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 8419ccc4e7..77f2f6a80a 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1787,6 +1787,7 @@playback record smartcard +usbredir diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3fce7e5aea..10b023eb7a 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -428,7 +428,8 @@ VIR_ENUM_IMPL(virDomainGraphicsSpiceChannelName, "cursor", "playback", "record", - "smartcard"); + "smartcard", + "usbredir"); VIR_ENUM_IMPL(virDomainGraphicsSpiceChannelMode, VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_LAST, diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 5aa8fc1530..6581feaa43 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1097,6 +1097,7 @@ enum virDomainGraphicsSpiceChannelName { VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_PLAYBACK, VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_RECORD, VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_SMARTCARD, + VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_USBREDIR, VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_LAST }; diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.args new file mode 100644 index 0000000000..35e51a7e87 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.args @@ -0,0 +1,16 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=spice /usr/bin/qemu -S -M pc -m 214 -smp 1 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c \ +-device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x4.0x7 \ +-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x4 \ +-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x4.0x1 \ +-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x4.0x2 \ +-spice port=5903,tls-port=5904,addr=127.0.0.1,\ +x509-dir=/etc/pki/libvirt-spice,tls-channel=main,plaintext-channel=inputs,\ +tls-channel=usbredir,\ +image-compression=auto_glz,jpeg-wan-compression=auto,zlib-glz-wan-compression=auto,\ +playback-compression=on,streaming-video=filter,disable-copy-paste \ +-vga cirrus \ +-chardev socket,id=charredir0,host=localhost,port=4000 \ +-device usb-redir,chardev=charredir0,id=redir0 \ +-chardev spicevmc,id=charredir1,name=usbredir \ +-device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=4 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.xml new file mode 100644 index 0000000000..1dc23bdfd8 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-usb-redir.xml @@ -0,0 +1,53 @@ + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index e47a385787..4d7cf6972c 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -543,6 +543,12 @@ mymain(void) QEMU_CAPS_VGA, QEMU_CAPS_VGA_QXL, QEMU_CAPS_DEVICE, QEMU_CAPS_SPICE, QEMU_CAPS_DEVICE_QXL_VGA); + DO_TEST("graphics-spice-usb-redir", false, + QEMU_CAPS_VGA, QEMU_CAPS_SPICE, + QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_USB_HUB, + QEMU_CAPS_ICH9_USB_EHCI1, QEMU_CAPS_USB_REDIR, + QEMU_CAPS_CHARDEV_SPICEVMC); DO_TEST("input-usbmouse", false, NONE); DO_TEST("input-usbtablet", false, NONE); -- 2.39.5QEMUGuest1 +c7a5fdbd-edaf-9455-926a-d65c16db1809 +219136 +219136 +1 ++ +hvm ++ + destroy +restart +destroy ++ +/usr/bin/qemu ++ ++ + + + + + + + + + + + ++ ++ + + ++ + + ++ + + ++ + + + ++