Create a persistent qemu+ssh connection
I am trying to make a script that will list the VMs on my four host
servers, and dump the xml for guest domains that are running. I am running
the script on one host server, and using qemu+ssh to connect to the
others.
This is an example command:virsh -c qemu+ssh://${HOSTS[$index]}/system
dumpxml $vm > xmldump/$DATE/$vm.xml
This command runs for each VM running on that host and a new connection is
made each time and I am prompted for my password each time. This works but
is not ideal.
How could I do this so that I only make one connection per host, and run
all my commands within that connection?
These are KVMs running on Ubuntu servers using libvirt.
No comments:
Post a Comment