diff options
author | Jonathon Jongsma <jjongsma@redhat.com> | 2022-05-18 17:03:29 -0500 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2022-06-13 13:49:08 -0400 |
commit | 44355e5ed0d0791675e8113732dde37664d5aa91 (patch) | |
tree | 0e1424a501c087c6697de440fd1c633ad4fdc727 /virtinst | |
parent | 0533bb8189c2d36fc18121bf394be5d35c038066 (diff) | |
download | virt-manager-44355e5ed0d0791675e8113732dde37664d5aa91.tar.gz |
virt-install: add support for qemu-vdagent channel
This allows support for host/guest clipboard sharing when using vnc
guests (and possibly other graphics types in the future). This channel
is similar to the spicevmc channel, but it contains a couple additional
options to enable/disable clipboard sharing and specify the mouse mode.
In the case of spice, these settings are specified on the 'graphics'
element, but for qemu-vdagent, they are specified on the channel. For
example:
--channel=qemu-vdagent,source.clipboard.copypaste=on,source.mouse.mode=client
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Diffstat (limited to 'virtinst')
-rw-r--r-- | virtinst/cli.py | 2 | ||||
-rw-r--r-- | virtinst/devices/char.py | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/virtinst/cli.py b/virtinst/cli.py index c42fc0f0..09dea466 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -3404,6 +3404,8 @@ def _add_char_source_args(cls, prefix=""): _add_arg("protocol.type", "source.protocol") _add_arg("log.file", "source.log_file") _add_arg("log.append", "source.log_append", is_onoff=True) + _add_arg("source.clipboard.copypaste", "source.clipboard_copypaste", is_onoff=True) + _add_arg("source.mouse.mode", "source.mouse_mode") ################## diff --git a/virtinst/devices/char.py b/virtinst/devices/char.py index 9547c649..01fc634b 100644 --- a/virtinst/devices/char.py +++ b/virtinst/devices/char.py @@ -45,6 +45,10 @@ class CharSource(XMLBuilder): slave = XMLProperty("./@slave") mode = XMLProperty("./@mode") + # for qemu-vdagent channel + clipboard_copypaste = XMLProperty("./clipboard/@copypaste", is_yesno=True) + mouse_mode = XMLProperty("./mouse/@mode") + # It's weird to track these properties here, since the XML is set on # the parent, but this is how libvirt does it internally, which means # everything that shares a charsource has these values too. @@ -80,6 +84,7 @@ class _DeviceChar(Device): TYPE_SPICEVMC = "spicevmc" TYPE_SPICEPORT = "spiceport" TYPE_NMDM = "nmdm" + TYPE_QEMUVDAGENT = "qemu-vdagent" CHANNEL_NAME_SPICE = "com.redhat.spice.0" CHANNEL_NAME_QEMUGA = "org.qemu.guest_agent.0" @@ -117,7 +122,8 @@ class _DeviceChar(Device): self.source.mode = "bind" if not self.target_type and self.DEVICE_TYPE == "channel": self.target_type = "virtio" - if not self.target_name and self.type == self.TYPE_SPICEVMC: + if not self.target_name and (self.type == self.TYPE_SPICEVMC or + self.type == self.TYPE_QEMUVDAGENT): self.target_name = self.CHANNEL_NAME_SPICE |