Skip to main content

Running virt-manager from its master branch (1.0.1) on Ubuntu 14.04

Hey all,

After upgrading my system from Ubuntu 12.04 to Ubuntu 14.04 I decided to check whether the latest package of virt-manager ( http://virt-manager.org/ ) comes with the feature that I needed the most - snapshots.

Unfortunately, The current Ubuntu 14.04's version of virt-manager is still based on the 0.9 branch,
So I decided to clone the latest version from the project's git repository ( https://git.fedorahosted.org/git/virt-manager.git ) and try it out.

While doing so, I had several issues which I will list here so you won't have to waste your time doing the same research.

Summary for busy people
There are several packages that you will need to install:
$ sudo apt-get install gir1.2-libvirt-glib-1.0 python-ipaddr libosinfo-bin libosinfo-1.0-dev libgtk-3-dev gir1.2-gtk-vnc-2.0 python-spice-client-gtk gir1.2-spice-client-gtk-3.0
This should fix all the following issues.

End of summary for busy people


After the git-clone's process was over, I read the README and INSTALL files, which told me that I should just run the virt-manager script ./virt-manager from the root directory. This was the result:

$:~/work/virt-manager$ ./virt-manager
ERROR:root:Could not find any typelib for LibvirtGLib
Traceback (most recent call last):
  File "./virt-manager", line 30, in <module>
    from gi.repository import LibvirtGLib
ImportError: cannot import name LibvirtGLib


According to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=736547 you should install gir1.2-libvirt-glib-1.0:

sudo apt-get install gir1.2-libvirt-glib-1.0

Running the virt-manager again will produce:

Traceback (most recent call last):
  File "./virt-manager", line 32, in <module>
    from virtinst import util as util
  File "/home/tal/work/virt-manager/virtinst/__init__.py", line 40, in <module>
    from virtinst.interface import Interface, InterfaceProtocol
  File "/home/tal/work/virt-manager/virtinst/interface.py", line 26, in <module>
    import ipaddr
ImportError: No module named ipaddr

Searching for the python package using apt-cache:
apt-cache search ipaddr

Revealed the python-ipaddr package:
sudo apt-get install python-ipaddr


Moving forward and running again:
ERROR:root:Could not find any typelib for Libosinfo
Traceback (most recent call last):
  File "./virt-manager", line 32, in <module>
    from virtinst import util as util
  File "/home/tal/work/virt-manager/virtinst/__init__.py", line 70, in <module>
    from virtinst.distroinstaller import DistroInstaller
  File "/home/tal/work/virt-manager/virtinst/distroinstaller.py", line 32, in <module>
    from virtinst import urlfetcher
  File "/home/tal/work/virt-manager/virtinst/urlfetcher.py", line 35, in <module>
    from virtinst import osdict
  File "/home/tal/work/virt-manager/virtinst/osdict.py", line 25, in <module>
    from gi.repository import Libosinfo as libosinfo
ImportError: cannot import name Libosinfo

This was solved by installing libosinfo-1.0-dev and libosinfo-bin:
sudo apt-get install libosinfo-bin libosinfo-1.0-dev


This time the application successfully ran, but pressing the "Open" button generates the following error:
Error launching details: cannot import name GtkVnc
Traceback (most recent call last):
  File "/home/tal/work/virt-manager/virtManager/engine.py", line 753, in _show_vm_helper
    details = self._get_details_dialog(uri, vm.get_connkey())
  File "/home/tal/work/virt-manager/virtManager/engine.py", line 731, in _get_details_dialog
    obj = vmmDetails(conn.get_vm(connkey))
  File "/home/tal/work/virt-manager/virtManager/details.py", line 495, in __init__
    from virtManager.console import vmmConsolePages
  File "/home/tal/work/virt-manager/virtManager/console.py", line 26, in <module>
    from gi.repository import GtkVnc
ImportError: cannot import name GtkVnc

After reading https://www.redhat.com/archives/virt-tools-list/2014-March/msg00128.html and https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1188846.html:
sudo apt-get install libgtk-3-dev gir1.2-gtk-vnc-2.0

Which led to the next issue:
Error launching details: cannot import name SpiceClientGtk
Traceback (most recent call last):
  File "/home/tal/work/virt-manager/virtManager/engine.py", line 753, in _show_vm_helper
    details = self._get_details_dialog(uri, vm.get_connkey())
  File "/home/tal/work/virt-manager/virtManager/engine.py", line 731, in _get_details_dialog
    obj = vmmDetails(conn.get_vm(connkey))
  File "/home/tal/work/virt-manager/virtManager/details.py", line 495, in __init__
    from virtManager.console import vmmConsolePages
  File "/home/tal/work/virt-manager/virtManager/console.py", line 27, in <module>
    from gi.repository import SpiceClientGtk
ImportError: cannot import name SpiceClientGtk

Now, I ran the following command:
sudo apt-get install python-spice-client-gtk gir1.2-spice-client-gtk-3.0

Finally! Now you should be able to easily run your new virt-manager.


NOTE: This post was written based on the master branch with a specific commit (aa823b5b58d689e2a69a9822fd462a1333d8d415) since the current state had a small issue creating new machines (I sent a patch https://www.redhat.com/archives/virt-tools-list/2014-July/msg00051.html).

Have fun!
Tal Kain

Comments

  1. I should have read this:-)

    I was in the same position and but I did it via som ppa etc and got a mess. Now I have libvirt git repo and others and I can't get it to hold together.

    Am I right in that your virt-manager from source works with everything else based on supported 14.04 packages? libvirt, kvm qemu etc. Or is the starting point for this blogpost something else than plain 14.04.
    I would much rather go with 16.04 but I am stuck with 14.04 a while longer unfortunately.

    Kind regards,

    ReplyDelete
    Replies
    1. Hey soundoptics,
      When I did this post, everything was installed using the standard packages (no PPA, no manually installed debs).

      I am not sure what is the current status of the project (this post is from 2014 :) ), but I assume that everything should still work perfectly on Ubuntu 14.04.

      Good luck!
      - Tal

      Delete

Post a Comment

Popular posts from this blog

IORegistryExplorer on macOS Dark Mode issue fix

IO Registry Explorer is a utility developed by Apple which allows you to watch the I/O Registry on your macOS. (Original:  https://developer.apple.com/library/archive/documentation/DeviceDrivers/Conceptual/IOKitFundamentals/art/registryexplorer.jpg ) If you are using the IORegistryExplorer on macOS while working with Dark Mode enabled, then you probably noticed the fact that the explorer doesn't fit the new DarkMode, hence the UI might look like that: Which makes it hard to read the content. I found this article  which shows you how to disable DarkMode for a specific application. Running the following commands: osascript -e 'id of app "IORegistryExplorer"' defaults write com.apple.IORegistryExplorer NSRequiresAquaSystemAppearance -bool yes Solves the issue and make it usable again. Have fun, Tal Kain

Ubuntu: Installing a missing ath3k firmware

While trying to prepare a new Ubuntu box to use a new card based on the Atheros chipset, I encounter the following error: Bluetooth: Firmware file "ath3k-1.fw" not found According to  http://wireless.kernel.org/en/users/Drivers/ath3k : ath3k is the Linux Bluetooth driver for Atheros AR3011/AR3012 Bluetooth chipsets. I saw this blog post: http://hexwave.blogspot.com/2011/04/debian-6-with-atheros-3011-ath3k-usb.html So I decided to try installing the package linux-firmware which contains the relevant file (I used  dlocate  to $ dlocate linux-firmware | grep -i ath3 linux-firmware: /lib/firmware/ath3k-1.fw or you can find it by searching for ath3k: $ dlocate ath3k-1.fw linux-firmware: /lib/firmware/ath3k-1.fw I just ran: # apt-get install linux-firmware and it fixed it by installing the missing firmware file. Good luck! Tal Kain

BinDiff error: "Can't start disassembler. Please set correct path in the main settings first"

After installing  BinDiff  and running the application for the first time on my Windows 7 x64 machine, I tried comparing two different binaries but got an error in the middle of the process: Can't start disassembler. Please set correct path in the main settings first The solution for this error is very simple: While installing BinDiff, the installation process asks for the installation path of IDA. The default path (on x64 machine) would be C:\Program Files (x86)\IDA\. This is not always correct. At my case the installation was at C:\Program Files (x86)\IDA 6.3\. Moving the path inside BinDiff will not be sufficient since part of BinDiff's files are still on the old directory. Easiest way to fix it (or by doing it in advance): Uninstall BinDiff and install it while pointing to the correct IDA's path. -Tal