[libvirt-users] Using virsh on OSX to control a VMs on a linux machine

Johannes Kastl mail at ojkastl.de
Sat Oct 25 13:35:39 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi everyone,

maybe this is a stupid thing, but Google found no answer. So, for the
next one trying this:

I have a linux server, that runs a couple of VMs, and on which libvirt
and virsh work like a charm. From time to time I'm on a Mac OSX
machine, where I can install libvirt from macports very comfortably.
But this far I have not gotten it to work with anything apart from the
virtualbox that is installed on osx.

I always get a hangup error, that is not listed on
http://wiki.libvirt.org/page/Failed_to_connect_to_the_hypervisor:

> error: failed to connect to the hypervisor error: internal error:
> received hangup / error event on socket

So I had to enter the path to the socket (on the linux machine), as
the OSX libvirt thinks it is in /opt/local/..., where the whole
macports stuff is. On linux it's in /var/run/libvirt/.

So, the following works:
> virsh -c
> qemu+ssh://example.org/system?socket=/var/run/libvirt/libvirt-sock
> list --all

Regards,
Johannes
- -- 
`Even if I could, I wouldn't. Scars can come in useful. I have one
myself above my left knee which is a perfect map of the London
Underground.´
(Albus Dumbledore, Harry Potter I)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/

iEYEARECAAYFAlRLpysACgkQzi3gQ/xETbLb8QCeMXgA3A0erpPvc3fHpOWSnBYG
6AAAoI6e3+Kzk4Q30GBbixCgea6TBEGy
=RMS/
-----END PGP SIGNATURE-----




More information about the libvirt-users mailing list