From: Luca Boccassi Date: Sat, 27 Sep 2025 15:46:12 +0000 (+0100) Subject: vmspawn: enable qemu guest agent with --console=gui X-Git-Tag: v259-rc1~403 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=054e542c54743c2ed119f18a371858e79be22afe;p=thirdparty%2Fsystemd.git vmspawn: enable qemu guest agent with --console=gui For auto resolution scaling, etc --- diff --git a/src/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c index 6ea203752ec..f471e1bde52 100644 --- a/src/vmspawn/vmspawn.c +++ b/src/vmspawn/vmspawn.c @@ -2020,10 +2020,14 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) { } case CONSOLE_GUI: + /* Enable support for the qemu guest agent for clipboard sharing, resolution scaling, etc. */ r = strv_extend_many( &cmdline, "-vga", - "virtio"); + "virtio", + "-device", "virtio-serial", + "-chardev", "spicevmc,id=vdagent,debug=0,name=vdagent", + "-device", "virtserialport,chardev=vdagent,name=org.qemu.guest_agent.0"); break; case CONSOLE_NATIVE: