[PATCH v2 00/21] Add qemu RDP server support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>

Hi,

This patch series offers an out-of-process Remote Desktop Protocol (RDP)
server solution utilizing QEMU's -display dbus interface, offering improved
modularity and potential security benefits compared to built-in server.

This initiative was spearheaded by Mihnea Buzatu during the QEMU Summer of Code
2023. The project's goal was to develop an out-of-process RDP server using the
-display dbus interface, implemented in Rust. Given that the IronRDP crate
lacked some server support at the time, investments in IronRDP were required.

I finally released an initial v0.1 version of qemu-rdp on crates.io
(https://crates.io/crates/qemu-rdp). That should allow more people to review and
evaluate the state of this work.

On unix systems, with cargo/rust toolchain installed, it should be as easy as
running "cargo install qemu-rdp", apply this patch series for libvirt, set the
"rdp_tls_x509_cert_dir" location for your TLS certificates, and configure a VM
with both dbus & rdp graphics (run "virsh domdisplay DOMAIN" to get the display
connection details).

Thanks for the reviews & feedback!

v2: thanks to Daniel review
- drop extra error report from "qemu: report an error for unsupported graphics"
- replace g_return pre-conditions with ATTRIBUTE_NONNULL
- improve "qemu/dbus: keep a connection to the VM D-Bus" to also reconnect
- use domainLogContext for logging (for virtiofs as well)
- check for qemu-rdp availabilty for setting 'rdp' capability
- make dbus-addr qemu-rdp capability mandatory
- rebased
- add r-b tags

Marc-André Lureau (21):
  build-sys: drop -Winline when optimization=g
  build: fix -Werror=maybe-uninitialized
  qemu-slirp: drop unneeded check for OOM
  util: annotate non-null arguments for virGDBusCallMethod()
  qemu: fall-through for unsupported graphics
  qemu: add rdp state directory
  qemu: add qemu RDP configuration
  conf: parse optional RDP username & password
  conf: generalize virDomainDefHasSpiceGraphics
  qemu: use virDomainDefHasGraphics
  qemu: add RDP ports range allocator
  qemu: limit to one <graphics type='rdp'>
  qemu/virtiofs: use domainLogContext
  qemu/dbus: keep a connection to the VM D-Bus
  qemu/dbus: log daemon stdout/err, use domainLogContext
  qemu: validate RDP configuration
  qemu: add qemu-rdp helper unit
  qemu: pass virQEMUDriverConfig to capabilities
  qemu: add 'rdp' capability if qemu-rdp is available
  qemu: add RDP support
  tests: add qemu <graphics type='rdp'/> test

 docs/formatdomain.rst                         |  25 +-
 meson.build                                   |   7 +-
 po/POTFILES                                   |   1 +
 src/conf/domain_conf.c                        |  28 +-
 src/conf/domain_conf.h                        |   5 +-
 src/conf/schemas/domaincommon.rng             |  10 +
 src/libvirt_private.syms                      |   2 +-
 src/qemu/libvirtd_qemu.aug                    |   7 +
 src/qemu/meson.build                          |   1 +
 src/qemu/qemu.conf.in                         |  31 ++
 src/qemu/qemu_capabilities.c                  |  24 +-
 src/qemu/qemu_capabilities.h                  |  12 +-
 src/qemu/qemu_command.c                       |   9 +-
 src/qemu/qemu_conf.c                          |  56 ++-
 src/qemu/qemu_conf.h                          |  13 +
 src/qemu/qemu_dbus.c                          |  69 ++-
 src/qemu/qemu_dbus.h                          |   3 +
 src/qemu/qemu_domain.c                        |   1 +
 src/qemu/qemu_domain.h                        |   4 +
 src/qemu/qemu_driver.c                        |  20 +
 src/qemu/qemu_extdevice.c                     |  46 +-
 src/qemu/qemu_hotplug.c                       |  49 ++-
 src/qemu/qemu_hotplug.h                       |   1 +
 src/qemu/qemu_process.c                       | 170 ++++++-
 src/qemu/qemu_rdp.c                           | 416 ++++++++++++++++++
 src/qemu/qemu_rdp.h                           |  73 +++
 src/qemu/qemu_slirp.c                         |   6 -
 src/qemu/qemu_validate.c                      |  48 +-
 src/qemu/qemu_virtiofs.c                      |  53 +--
 src/qemu/test_libvirtd_qemu.aug.in            |   5 +
 src/util/virgdbus.h                           |  13 +-
 .../domaincapsdata/qemu_10.0.0-q35.x86_64.xml |   1 +
 .../domaincapsdata/qemu_10.0.0-tcg.x86_64.xml |   1 +
 tests/domaincapsdata/qemu_10.0.0.s390x.xml    |   1 +
 tests/domaincapsdata/qemu_10.0.0.x86_64.xml   |   1 +
 .../domaincapsdata/qemu_7.0.0-q35.x86_64.xml  |   1 +
 .../domaincapsdata/qemu_7.0.0-tcg.x86_64.xml  |   1 +
 tests/domaincapsdata/qemu_7.0.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_7.1.0-q35.x86_64.xml  |   1 +
 .../domaincapsdata/qemu_7.1.0-tcg.x86_64.xml  |   1 +
 tests/domaincapsdata/qemu_7.1.0.x86_64.xml    |   1 +
 .../qemu_7.2.0-hvf.x86_64+hvf.xml             |   1 +
 .../domaincapsdata/qemu_7.2.0-q35.x86_64.xml  |   1 +
 .../qemu_7.2.0-tcg.x86_64+hvf.xml             |   1 +
 .../domaincapsdata/qemu_7.2.0-tcg.x86_64.xml  |   1 +
 tests/domaincapsdata/qemu_7.2.0.ppc.xml       |   1 +
 tests/domaincapsdata/qemu_7.2.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_8.0.0-q35.x86_64.xml  |   1 +
 .../domaincapsdata/qemu_8.0.0-tcg.x86_64.xml  |   1 +
 tests/domaincapsdata/qemu_8.0.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_8.1.0-q35.x86_64.xml  |   1 +
 .../domaincapsdata/qemu_8.1.0-tcg.x86_64.xml  |   1 +
 tests/domaincapsdata/qemu_8.1.0.s390x.xml     |   1 +
 tests/domaincapsdata/qemu_8.1.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_8.2.0-q35.x86_64.xml  |   1 +
 .../qemu_8.2.0-tcg-virt.loongarch64.xml       |   1 +
 .../domaincapsdata/qemu_8.2.0-tcg.x86_64.xml  |   1 +
 .../qemu_8.2.0-virt.aarch64.xml               |   1 +
 .../qemu_8.2.0-virt.loongarch64.xml           |   1 +
 tests/domaincapsdata/qemu_8.2.0.aarch64.xml   |   1 +
 tests/domaincapsdata/qemu_8.2.0.armv7l.xml    |   1 +
 tests/domaincapsdata/qemu_8.2.0.s390x.xml     |   1 +
 tests/domaincapsdata/qemu_8.2.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_9.0.0-q35.x86_64.xml  |   1 +
 .../domaincapsdata/qemu_9.0.0-tcg.x86_64.xml  |   1 +
 tests/domaincapsdata/qemu_9.0.0.sparc.xml     |   1 +
 tests/domaincapsdata/qemu_9.0.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_9.1.0-q35.x86_64.xml  |   1 +
 .../qemu_9.1.0-tcg-virt.riscv64.xml           |   1 +
 .../domaincapsdata/qemu_9.1.0-tcg.x86_64.xml  |   1 +
 .../qemu_9.1.0-virt.riscv64.xml               |   1 +
 tests/domaincapsdata/qemu_9.1.0.s390x.xml     |   1 +
 tests/domaincapsdata/qemu_9.1.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_9.2.0-q35.x86_64.xml  |   1 +
 .../domaincapsdata/qemu_9.2.0-tcg.x86_64.xml  |   1 +
 tests/domaincapsdata/qemu_9.2.0.s390x.xml     |   1 +
 tests/domaincapsdata/qemu_9.2.0.x86_64.xml    |   1 +
 tests/domaincapstest.c                        |   7 +-
 .../graphics-rdp.x86_64-latest.args           |  35 ++
 .../graphics-rdp.x86_64-latest.xml            |   1 +
 tests/qemuxmlconfdata/graphics-rdp.xml        |  43 ++
 tests/qemuxmlconftest.c                       |   2 +
 tests/testutilsqemu.c                         |  10 +
 tools/nss/libvirt_nss_leases.c                |   2 +-
 tools/nss/libvirt_nss_macs.c                  |   2 +-
 85 files changed, 1218 insertions(+), 138 deletions(-)
 create mode 100644 src/qemu/qemu_rdp.c
 create mode 100644 src/qemu/qemu_rdp.h
 create mode 100644 tests/qemuxmlconfdata/graphics-rdp.x86_64-latest.args
 create mode 120000 tests/qemuxmlconfdata/graphics-rdp.x86_64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/graphics-rdp.xml

-- 
2.47.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux