VIRTQEMUD(8)

๐Ÿ’… virtqemud

okay so first things first, bestie: this is page VIRTQEMUD(8) from the Virtualization Support manual โ€” section 8, daemon territory. say it with me: virt-qemu-d. slay, let's go โœจ

๐ŸŒธ NAME ๐ŸŒธ

virtqemud โ€” the libvirt QEMU management daemon. she manages. she daemonizes. she's that girl ๐ŸŽ€

๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

virtqemud [OPTION]...

โœจ DESCRIPTION โœจ

So virtqemud is a server side daemon โ€” like, a component of the libvirt virtualization management system. big main character energy, but she's part of an ensemble ๐Ÿ’–

She's one of a whole collection of modular daemons that replaced the functionality that the old monolithic libvirtd daemon used to hand out all by itself. glow-up era, honestly ๐Ÿ”ฅ

This daemon runs on virtualization hosts and provides management for QEMU virtual machines. that's her whole job and she does it gorgeously.

k so important: virtqemud only listens for requests on a local Unix domain socket. only local. if you want remote access via TLS/TCP, or backwards compatibility with legacy clients that are still expecting libvirtd โ€” that's the virtproxyd daemon's job, not hers. know the difference iykyk ๐Ÿ’…

Now the genuinely important bit: restarting virtqemud does not interrupt running guests. the guests keep operating, and changes in their state will generally be picked up automatically during startup. phew ๐Ÿ˜ฎโ€๐Ÿ’จ

but ngl, even though it's generally fine, it's recommended to avoid restarting with running guests whenever it's practical. just... don't tempt fate, bestie ๐Ÿ™ˆ

๐ŸŒˆ DAEMON STARTUP MODES ๐ŸŒˆ

virtqemud is capable of starting in two modes. two vibes, one daemon ๐Ÿ‘‘

๐Ÿ’œ Socket activation mode

On hosts with systemd, she starts in socket activation mode. she relies on systemd to create and listen on the UNIX sockets, and systemd passes them to her as pre-opened file descriptors. very "you handle the logistics, i'll handle the aura" ๐Ÿซถ

heads up: in this mode, most of the socket related config options in /etc/libvirt/virtqemud.conf will no longer have any effect. they just sit there looking cute. ๐Ÿ’€

๐Ÿ“ Traditional service mode

On hosts without systemd, she creates and listens on the UNIX sockets herself. independent queen. no cap. โœจ

๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

  • -h, --help โ€” displays command line help usage, then exits. your little orientation tour ๐Ÿงš
  • -d, --daemon โ€” run as a daemon and write a PID file. she goes in the background and leaves a lil receipt ๐Ÿ’–
  • -f, --config FILE โ€” use this configuration file, overriding the default value. be specific, bestie ๐ŸŽ€
  • -p, --pid-file FILE โ€” use this name for the PID file, overriding the default value. custom receipt, custom name ๐Ÿฆ‹
  • -t, --timeout SECONDS โ€” exit after the timeout period (in seconds), provided there are neither any client connections nor any running domains. so she'll only dip if literally nobody needs her ๐Ÿ˜ญ
  • -v, --verbose โ€” enable output of verbose messages. she will tell you things. love that for us ๐ŸŒธ
  • --version โ€” display version information, then exit. the classic "who even are you" move ๐Ÿ’…

๐Ÿ’€ SIGNALS ๐Ÿ’€

On receipt of SIGHUP, virtqemud will reload its configuration. that's it. that's the signal. one (1) signal. iconic minimalism โœจ

๐ŸŽ€ FILES ๐ŸŽ€

โญ When run as root

  • /etc/libvirt/virtqemud.conf

the default configuration file used by virtqemud, unless it's overridden on the command line using the -f | --config option.

On top of the default configuration file, virtqemud also reads configuration for the QEMU driver from:

  • /etc/libvirt/qemu.conf

This file contains various knobs and default values for virtual machines created within the QEMU driver, and it offers a way to override the built in defaults โ€” for instance (but not limited to): paths to various supplementary binaries, TLS certificates location, graphical consoles configuration and others. ngl the big one: the location of this file can't be overridden by any command line switch. not a single one. periodt ๐Ÿ”ฅ

  • /run/libvirt/virtqemud-sock
  • /run/libvirt/virtqemud-sock-ro
  • /run/libvirt/virtqemud-admin-sock

The sockets virtqemud will use. all three. she's got options ๐Ÿ’…

The TLS Server private key virtqemud will use. (yes, this line is just sitting here on its own in the original โ€” she's mysterious, we respect it ๐Ÿคซ)

  • /run/virtqemud.pid

the PID file to use, unless it's overridden by the -p | --pid-file option.

๐Ÿฆ‹ When run as non-root

  • $XDG_CONFIG_HOME/libvirt/virtqemud.conf

the default configuration file used by virtqemud, unless it's overridden on the command line using the -f | --config option.

On top of the default configuration file, virtqemud also reads configuration for the qemu driver from:

  • $XDG_CONFIG_HOME/libvirt/qemu.conf

If the file exists, it can contain various knobs and default values for virtual machines created within the QEMU driver, and it offers a way to override the built in defaults โ€” for instance (but not limited to): paths to various supplementary binaries, TLS certificates location, graphical consoles configuration and others. and again, for emphasis: the location of this file can't be overridden by any command line switch. โญ

  • $XDG_RUNTIME_DIR/libvirt/virtqemud-sock
  • $XDG_RUNTIME_DIR/libvirt/virtqemud-admin-sock

The sockets virtqemud will use.

  • $XDG_RUNTIME_DIR/libvirt/virtqemud.pid

the PID file to use, unless it's overridden by the -p | --pid-file option.

And the fallbacks, memorize these ๐Ÿ“

  • If $XDG_CONFIG_HOME is not set in your environment, virtqemud will use $HOME/.config
  • If $XDG_RUNTIME_DIR is not set in your environment, virtqemud will use $HOME/.cache

she's very forgiving about your environment variables, honestly ๐Ÿซถ

๐Ÿงš EXAMPLES ๐Ÿงš

Wanna retrieve the version of virtqemud? say less:

# virtqemud --version
virtqemud (libvirt) 12.8.0

Wanna start virtqemud, instructing it to daemonize and create a PID file? okay queen:

# virtqemud -d
# ls -la /run/virtqemud.pid
-rw-r--r-- 1 root root 6 Jul  9 02:40 /run/virtqemud.pid

there it is. six whole bytes of proof she exists ๐ŸŒŸ

๐Ÿ› BUGS ๐Ÿ›

Please report all bugs you discover. this should be done via either:

  1. the mailing list
https://libvirt.org/contact.html
  1. the bug tracker
https://libvirt.org/bugs.html

Alternatively, you may report bugs to your software distributor / vendor. no gatekeeping, go where you're comfy ๐Ÿ’–

๐ŸŒธ AUTHORS ๐ŸŒธ

Please refer to the AUTHORS file distributed with libvirt. the whole squad is credited there ๐Ÿ‘ฏโ€โ™€๏ธ

Copyright (C) 2006-2020 Red Hat, Inc., and the authors listed in the libvirt AUTHORS file.

๐ŸŽ€ LICENSE ๐ŸŽ€

virtqemud is distributed under the terms of the GNU LGPL v2.1+. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. like... none. zero. don't come for her if it breaks ๐Ÿ˜ญ

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

virsh(1), libvirtd(8), https://libvirt.org/daemons.html, https://libvirt.org/drvqemu.html


and that's the whole page, bestie ๐Ÿซถ that was VIRTQEMUD(8) from the Virtualization Support manual โ€” same title at the top, same VIRTQEMUD(8) stamp at the bottom, nothing skipped, nothing invented, all facts intact and looking gorgeous โœจ๐Ÿ’…๐ŸŽ€

๐Ÿ“ฆ where this page comes from