1, brew install libvirt
2, generate ssh key, and copy your public key to your remote vm host
3, virsh -c qemu+ssh://name@host/system
There is an issue when connect remote debian/ubuntu host, an error 'hangout event in socket', since mac assume libvirt socket resides in /usr/local/lib, but actually it's in /var/run/libvirt/libvirt-sock, so when connect to debian/ubuntu kvm host, pass a variable socket,
qemu+ssh://user@remote-host/system?socket=/var/run/libvirt/libvirt-sock
Bingo, that's it Refer: http://jedi.be/blog/2011/09/13/libvirt-fog-provider/
You can add uri aliases too, so you don't have to type all that every time: http://berrange.com/posts/2011/10/28/using-uri-aliases-with-libvirt-0-9-7-forthcoming-release/
ReplyDelete