The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7652

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
This adds two additional named serial ports for interacting with guest
services over SPICE.

With those in place, clipboard sharing, improved cursor/resolution
management and folder sharing are all possible.

Signed-off-by: Stéphane Graber <[email protected]>
From 91afbe37eef1e9aace5d71d57e07a90919d940d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <[email protected]>
Date: Mon, 13 Jul 2020 23:11:48 -0400
Subject: [PATCH] lxd/qemu: Add support for spice agent
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This adds two additional named serial ports for interacting with guest
services over SPICE.

With those in place, clipboard sharing, improved cursor/resolution
management and folder sharing are all possible.

Signed-off-by: Stéphane Graber <[email protected]>
---
 lxd/instance/drivers/driver_qemu_templates.go | 27 +++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/lxd/instance/drivers/driver_qemu_templates.go 
b/lxd/instance/drivers/driver_qemu_templates.go
index c110c66dab..db11794313 100644
--- a/lxd/instance/drivers/driver_qemu_templates.go
+++ b/lxd/instance/drivers/driver_qemu_templates.go
@@ -59,7 +59,7 @@ size = "{{.memSizeBytes}}M"
 `))
 
 var qemuSerial = template.Must(template.New("qemuSerial").Parse(`
-# LXD serial identifier
+# Virtual serial bus
 [device "dev-qemu_serial"]
 {{- if eq .bus "pci" "pcie"}}
 driver = "virtio-serial-pci"
@@ -73,7 +73,8 @@ driver = "virtio-serial-ccw"
 multifunction = "on"
 {{- end }}
 
-[chardev "qemu_serial-chardev"]
+# LXD serial identifier
+[chardev "{{.chardevName}}"]
 backend = "ringbuf"
 size = "{{.ringbufSizeBytes}}B"
 
@@ -82,6 +83,28 @@ driver = "virtserialport"
 name = "org.linuxcontainers.lxd"
 chardev = "{{.chardevName}}"
 bus = "dev-qemu_serial.0"
+
+# Spice agent
+[chardev "qemu_spice-chardev"]
+backend = "spicevmc"
+name = "vdagent"
+
+[device "qemu_spice"]
+driver = "virtserialport"
+name = "com.redhat.spice.0"
+chardev = "qemu_spice-chardev"
+bus = "dev-qemu_serial.0"
+
+# Spice folder
+[chardev "qemu_spicedir-chardev"]
+backend = "spiceport"
+name = "org.spice-space.webdav.0"
+
+[device "qemu_spicedir"]
+driver = "virtserialport"
+name = "org.spice-space.webdav.0"
+chardev = "qemu_spicedir-chardev"
+bus = "dev-qemu_serial.0"
 `))
 
 var qemuPCIe = template.Must(template.New("qemuPCIe").Parse(`
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to