This docker image is based on alpine. Only the required package libvirt-client
is installed.
Pass the libvirt socket as a docker volume to this container.
-v /var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock
Use the remote URIs (libvirt Connection URIs) to connect to a remote host. You may have to edit libvirt.conf
or pass the URI as an argument virsh -c <remote-uri>
docker run --name libvirtclient -d -v /var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock hsrnetwork/libvirt-client
docker exec libvirtclient virsh list
docker exec -it libvirtclient virsh console <vm-name>