To interact with a Debian 13 machine remotely using virsh, you need to install the libvirt-daemon-system package. This package provides the libvirtd service, which is the server-side daemon that allows remote management of virtual machines via virsh or other libvirt-based tools.
Install the package:
bashsudo apt update sudo apt install libvirt-daemon-system
Configure libvirtd for remote access:
/etc/libvirt/libvirtd.conf to enable TCP/IP connections (uncomment and set listen_tcp = 1).auth_tcp setting is configured (e.g., auth_tcp = "none" for no authentication, or use SASL for secure authentication).Restart the service:
bashsudo systemctl restart libvirtd
Open the firewall (if applicable):
Allow the libvirt port (default: 16509/tcp) in your firewall.
Connect remotely:
Use virsh from a client machine with:
bashvirsh -c qemu+tcp://<server_ip>/system
qemu+tls:// instead of qemu+tcp:// and configure TLS certificates.libvirt-daemon-system is still required, but no additional configuration is needed.Vibe can make mistakes. Check answers. Learn more