On Ubuntu server 11.10 I am trying to install a virtual machine using virt-manager. I beleive that I have everything right, but when I go and run the command "virt-manager" I get the following error message:

File "/usr/share/virt-manager/virt-manager.py", line 383, in <module>
File "/usr/share/virt-manager/virt-manager.py", line 285, in main
  raise RuntimeError(_("Unable to initialize GTK: %s") % gtk_error)
RuntimeError: Unable to initialize GTK: could not open display

I want to use virt-manager so that I can quickly and efficently create multiple (6) virtual machines, but is there any other alternative that does not take hours per host system, and is still lightweight?

My machine is as follows:

  • Ubuntu Server 11.10
  • 8 cores @ 2.5ghz
  • 64 gb ram
  • Packages:
    • qemu-kvm
    • libvirt-bin
    • virt-manager
    • bridge-utils
    • gnome-core

Thank you for all of your help!


Ubuntu has a tool just for that, VMBuilder.

RuntimeError means that you probably didn't forward X11 connection through SSH. Check SSH server's config (/etc/ssh/sshd_config) and client's, too (~/.ssh/config).

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.