Now to the question of how to manage the VMs on my virtualization cluster.
I don’t have a good answer yet, but two things are true:
- libvirt will be used to manage the VMs
- ssh is used for remote logins
It’s simple to set up ssh to allow remote logins as root using ssh-agent:
ham3$ sudo bash ham3# cd /root ham3# mkdir .ssh ham3# cp /mnt/scratch/authorized_keys .ssh/
From a remote host, remote virsh commands now work:
$ virsh -c qemu+ssh://root@ham3/system list Id Name State ----------------------------------------------------
Using libvirt URI aliases (thanks Kashyap) I can set up some aliases to make this quite easy:
$ cat .config/libvirt/libvirt.conf uri_aliases = [ "ham0=qemu+ssh://root@ham0/system", "ham1=qemu+ssh://root@ham1/system", "ham2=qemu+ssh://root@ham2/system", "ham3=qemu+ssh://root@ham3/system", ] $ virsh -c ham0 list Id Name State ----------------------------------------------------
However my bash history contains a lot of commands like these which don’t make me happy:
$ for i in 0 1 2 3 ; do ./bin/wol-ham$i; done $ for i in 0 1 2 3 ; do virsh -c ham$i list; done