I'm using the virt-manager GUI 0.9.5-1ubuntu3 on my laptop running Ubuntu 14.04 against a server located some distance away (same OS) and getting rather unpleasant performance.

Laptop-server pings are ~50ms, not great but certainly sufficient for SSH access and even ok-ish running Firefox over X/ssh. Both server & laptop have plenty of spare CPU cycles, RAM and disks. My local ADSL is 8Mbps down 800Kbps upstream and exceptionally, the wife isn't streaming some soap ;-)

I'm creating a fresh VM and selecting 'customize config before install'. Clicking the 'Add Hardware' button freezes virt-manager for about 40 secs, during which little network activity occurs (117 kB sent, 151 kB rec'd, with peaks of 5kBps down, 11kBps up); CPU/RAM are absolutely fine on both boxes.

Pressing 'Finish' on the 'Add New Virtual Hardware' dialog to add a NIC takes 50s with similar bandwidth stats.

By contrast, the actual VM creation (35GB QCOW2 img) takes about 15 secs and console access performance via virt-manager is great - not significantly slower than SSH.

I must be doing smth wrong but what?

  • Is it just when you're adding hardware? – Hyppy Apr 29 '15 at 12:53
  • Nope, pretty much everything is at least 20x slower than when doing it on the LAN. I used these as example because I profiled them to get smth a little objective rather than just moaning "why is this so slow". – sxc731 Apr 29 '15 at 12:56
  • I routinely use virt-manager over a 150ms latency (US-EU) connection. Console redraws are understandably slow but VM creation does not exhibit this behavior. You've got other issues. The first thing I would do is get rid of Ubuntu. – Michael Hampton Apr 29 '15 at 15:13
  • Thanks for your comment. Last I heard Ubuntu was the most frequently used OS for OpenStack so I guess it's not all that bad? FWIW, I also found complaints of similar symptoms on RHEL albeit a few years ago and some of the follow-up suggests things were improved in newer versions. Could you confirm what version of virt-manager you're running? It could indeed be that the one packaged by Canonical is a little old... – sxc731 Apr 29 '15 at 15:36
  • I don't choose an OS based solely on its popularity, I choose it based on its ability to solve my business problems. And Ubuntu is almost never the best choice. – Michael Hampton May 23 '15 at 17:38

Having upgraded to a more recent version, I can confirm that the slow performance previously experienced is a thing of the past. The version packaged for Ubuntu 'Trusty' is over two years old (0.9.5 vs 1.2.0).

Upgrading isn't too difficult except maybe for figuring out which dependencies are required (the newer version seems to have quite a few more than the old one). Here's how:

  1. Grab the tarball for a recent version (I have tested this with 1.2.0) and uncompress somewhere handy
  2. Review the dependencies that may need to be installed: grep '^Requires:' virt-manager.spec.in
  3. For each identified dependency, check if you need to install it; below is a list (I believe complete but YMMV) of the packages I needed to install. As pointed out in the README file, the name of most of the dependencies have to be prefixed with 'gir-1.2':

    sudo apt-get install python-ipaddr
    sudo apt-get install gir1.2-libvirt-glib
    sudo apt-get install gir1.2-libosinfo
    sudo apt-get install gir1.2-gtk-vnc
    sudo apt-get install gir1.2-spice-client-gtk-3.0
  4. You should now be able to run virt-manager from the current directory; try it: ./virt-manager and confirm your previous performance issues are gone. If it fails, it's likely due to a missing dependency so go back to the previous step.
  5. The rest is optional as you could simply continue to run the fast version from you temp directory but if you'd like to install under /usr to replace the sluggish packaged version system-wide, run this:

    sudo python setup.py install --prefix=/usr
  6. If you try to run the installed version, it may not work out of the box. A bit of debugging with python -d -v /usr/share/virt-manager/virt-manager --debug --no-fork revealed the root cause as (virt-manager:8484): GLib-GIO-ERROR **: Settings schema 'org.virt-manager.virt-manager' is not installed. Google finally led me to this bug report; in short the cure was to run:

    sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
  7. Don't forget to check that you're running the right version by clicking Help->About

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.