Skip to content

Instantly share code, notes, and snippets.

@holms
Last active January 31, 2019 23:38
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save holms/8324973 to your computer and use it in GitHub Desktop.
Save holms/8324973 to your computer and use it in GitHub Desktop.
Install virt-manager osx
git clone git://git.fedorahosted.org/virt-manager.git
cd virt-manager
sudo port -v install intltool py27-pygtk
sudo python setup.py install
@dghodgson
Copy link

Doesn't work in OSX 10.9

Even after symlinking /usr/bin/pythonw2.7 to /usr/bin/python2 and installing py27-gobject (and py27-gobject3), I still get the following error:

Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-manager", line 29, in <module>
    from gi.repository import GObject
ImportError: No module named gi.repository

@jaccoh
Copy link

jaccoh commented Nov 11, 2014

I fixed that by doing:

portuninstall -f py27-gobject3
port clean py27-gobject3
port install -s py27-gobject3

now for the next error....

virt-manager jhoeve$ virt-manager 
Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-manager", line 30, in 
    from gi.repository import LibvirtGLib
ImportError: cannot import name LibvirtGLib

@jamesooden
Copy link

I am experiencing the same problem, and got as far as you did (though I am using brew). libvirt-glib is separate library and it looks like the version of of gi.repository that you and I both have does not support it. I haven't figured out much more than that.

@jamesooden
Copy link

I found from another place that you need to tell gobject-inspector (that is the gi, part of gi.repository) where to find its type libs by using an environment variable GI_TYPELIB_PATH. In my case that would have been:

export GI_TYPELIB_PATH=/usr/local/lib/girepository-1.0

The problem was the particular gi typelib in question, LibvirtGlib did not exist. I could not find a brew package for this library so I built it myself pulling it from here:

ftp://libvirt.org/libvirt/glib/

Sadly after figuring out how to make it build (I had to patch the make files to remove an unsupported link option), it did not seem to product the typelib library, so I'm stuck again.

@jamesooden
Copy link

OK, there is an --enable-introspection on the configure for libvirt-glib, however it does not detect the gobject-introspection library (which it is doing via a package tool). Anyway I bet if I could ever git this LibvirtGlib.typelib file built virt-manager would run.

@jeffreywildman
Copy link

There are also a couple of other dependencies that need to be satisfied after libvirt-glib. I managed to get virt-manager installed and running using homebrew, albeit it is missing a few features. I've created a homebrew tap for others to check out and experiment with:

https://github.com/jeffreywildman/homebrew-virt-manager

@Gondagar
Copy link

Я ничего не понял)))

@tirrorex
Copy link

Thanks for the brew version.
How can one install libvirtd and qemu-kvm required to launch vm with virt-manager?

@66Ton99
Copy link

66Ton99 commented Sep 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment