LIBVIRTD(8)
๐ฆ LIBVIRTD โ the libvirt management daemon (straight out of section 8 of the manual, under "Virtualization Support")
okay so bestie, buckle up ๐ this is the page for libvirtd(8) โ yes the one and only, the manual page for libvirtd, and we're gonna get through it together. no cap.
โจ NAME โจ
libvirtd โ the libvirt management daemon. it's the server-side bestie of the whole libvirt virtualization management system ๐ซถ
โจ SYNOPSIS โจ
libvirtd [OPTION]...
literally just the program plus options. that's the whole vibe check.
โจ DESCRIPTION โจ
so libvirtd is the server side daemon component of the libvirt virtualization management system ๐
this daemon runs on host servers and does all the required management tasks for your virtualized guests. what does that mean in practice? activities like starting, stopping, and migrating guests between host servers, configuring and manipulating networking, and managing storage for guests to use. it's giving main character energy in the virtualization stack, honestly ๐ฅ
the libvirt client libraries and utilities connect to this daemon to send over tasks and collect info about the configuration and resources of the host system and the guests. so like, all your clients are texting this daemon and it's answering. iconic.
by default, libvirtd listens for requests on a local Unix domain socket. but with the -l | --listen command line option, you can tell it to additionally listen on a TCP/IP socket. which TCP/IP socket it uses is defined in the libvirtd configuration file. slay.
๐ restarting libvirtd does not impact running guests. your guests keep operating and will be picked up automatically if their XML configuration has been defined. any guests whose XML configuration has not been defined will be lost from the configuration. so write your XML, bestie. write it. ๐ญ
โจ SYSTEM SOCKET ACTIVATION โจ
libvirtd can start up in two modes โ two whole modes, iykyk ๐
traditional mode: it creates and listens on UNIX sockets itself. if the --listen parameter is given, it will also listen on TCP/IP socket(s), according to the listen_tcp and listen_tls options in /etc/libvirt/libvirtd.conf.
socket activation mode: it relies on systemd to create and listen on the UNIX (and optionally TCP/IP) sockets, and systemd passes them in as pre-opened file descriptors. in this mode you are not permitted to pass the --listen parameter, and most of the socket-related config options in /etc/libvirt/libvirtd.conf will no longer have any effect. to enable TCP or TLS sockets, use either:
$ systemctl start libvirtd-tls.socket
or:
$ systemctl start libvirtd-tcp.socket
socket activation mode is generally the default when running on a host OS that uses systemd. to go back to traditional mode, all the socket unit files must be masked:
$ systemctl mask libvirtd.socket libvirtd-ro.socket \
libvirtd-admin.socket libvirtd-tls.socket libvirtd-tcp.socket
and on top of that, make sure the --timeout argument is not used for the daemon, since it would not be started upon any later connection. lowkey important ๐ซถ
if you're using the libvirt-guests service, then the ordering for that service needs to be adapted so that it's ordered after the service unit instead of the socket unit. and since dependencies and ordering cannot be changed with drop-in overrides, the whole libvirt-guests unit file needs to be changed. to preserve that change, copy the installed /usr/lib/systemd/system/libvirt-guests.service to /etc/systemd/system/libvirt-guests.service and make the change there โ specifically, make sure the After= ordering mentions libvirtd.service and not libvirtd.socket:
[Unit]
After=libvirtd.service
periodt. ๐ธ
โญ OPTIONS โญ
-h,--helpโ display command line help usage, then exit. the "what do I do again" button โจ-d,--daemonโ run as a daemon & write PID file.-f,--configFILE โ use this configuration file, overriding the default value.-l,--listenโ listen for TCP/IP connections. this should not be set if you're using systemd socket activation โ instead activate thelibvirtd-tls.socketorlibvirtd-tcp.socketunit files.-p,--pid-fileFILE โ use this name for the PID file, overriding the default value.-t,--timeoutSECONDS โ exit after the timeout period (in seconds), provided there are neither any client connections nor any running domains.-v,--verboseโ enable output of verbose messages. chatty daemon, love that for us ๐ฌ--versionโ display version information, then exit.
โจ SIGNALS โจ
on receipt of SIGHUP, libvirtd will reload its configuration. one signal, one job, does it well ๐
๐ FILES ๐
When run as root ๐
/etc/libvirt/libvirtd.conf
the default configuration file used by libvirtd, unless overridden on the command line using the -f | --config option.
depending on what driver is installed, the following files are also read:
/etc/libvirt/qemu.conffor the QEMU driver/etc/libvirt/lxc.conffor the LXC driver/etc/libvirt/libxl.conffor the libxl driver
these files contain various knobs and default values for virtual machines created within their respective drivers, and offer 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. the location of neither of these files can be overridden by any command line switch. ๐ซ
/run/libvirt/libvirt-sock/run/libvirt/libvirt-sock-ro
the sockets libvirtd will use.
/etc/pki/CA/cacert.pem
the TLS Certificate Authority certificate libvirtd will use.
/etc/pki/libvirt/servercert.pem
the TLS Server certificate libvirtd will use.
/etc/pki/libvirt/private/serverkey.pem
the TLS Server private key libvirtd will use. ๐
/run/libvirtd.pid
the PID file to use, unless overridden by the -p | --pid-file option.
When run as non-root ๐ง
$XDG_CONFIG_HOME/libvirt/libvirtd.conf
the default configuration file used by libvirtd, unless overridden on the command line using the -f | --config option.
if the QEMU driver is installed, then the following file is also read:
$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 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. the location of this file can't be overridden by any command line switch.
$XDG_RUNTIME_DIR/libvirt/libvirt-sock
the socket libvirtd will use.
$HOME/.pki/libvirt/cacert.pem
the TLS Certificate Authority certificate libvirtd will use.
$HOME/.pki/libvirt/servercert.pem
the TLS Server certificate libvirtd will use.
$HOME/.pki/libvirt/serverkey.pem
the TLS Server private key libvirtd will use. ๐
$XDG_RUNTIME_DIR/libvirt/libvirtd.pid
the PID file to use, unless overridden by the -p | --pid-file option.
if $XDG_CONFIG_HOME is not set in your environment, libvirtd will use $HOME/.config
if $XDG_RUNTIME_DIR is not set in your environment, libvirtd will use $HOME/.cache
๐ EXAMPLES ๐
to retrieve the version of libvirtd:
# libvirtd --version
libvirtd (libvirt) 12.8.0
to start libvirtd, instructing it to daemonize and create a PID file:
# libvirtd -d
# ls -la /run/libvirtd.pid
-rw-r--r-- 1 root root 6 Jul 9 02:40 /run/libvirtd.pid
look at that PID file living its best life ๐
๐ BUGS ๐
please report all bugs you discover. this should be done via either:
- the mailing list
https://libvirt.org/contact.html
- the bug tracker
alternatively, you may report bugs to your software distributor / vendor. we're not gatekeeping the bug reports, fr fr ๐
๐ซถ AUTHORS ๐ซถ
please refer to the AUTHORS file distributed with libvirt.
โญ COPYRIGHT โญ
Copyright (C) 2006-2012 Red Hat, Inc., and the authors listed in the libvirt AUTHORS file.
๐ LICENSE ๐
libvirtd 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 them if it breaks ๐ญ
๐ธ SEE ALSO ๐ธ
virsh(1), virt-install(1), virt-xml-validate(1), virt-top(1), virt-df(1), https://libvirt.org/
aaaand that's the whole page, bestie, you ate that ๐
โจ this little gem is from the LIBVIRTD(8) manual page, Virtualization Support edition, dated 2025-08-14 (libvirt 12.8.0 energy) โ go forth and manage some guests, you've got this ๐ฆ๐
๐ฆ where this page comes from
- centos-stream 10: libvirt-daemon 12.8.0-1.el10 ยท GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-1.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms