Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

Edit:

So I have still been trying to figure this out and I ran across something that might be useful. I saw an example of someone using qemu+ssh://host/session instead of qemu+ssh://host/system. I can't find much information about the difference. Just because the word "session" makes me think this might solve my problem but I can't find enough info.

Does anyone know what qemu+ssh://host/session does, and could it possibly solve my problem?

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.