4

On Ubuntu server 11.10 I am trying to install a virtual machine using virt-manager. I believe 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>
  main()
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 efficiently 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
Paul T.
  • 189
  • 1
  • 9
Reid
  • 173
  • 1
  • 2
  • 7

3 Answers3

6

Are you running X on the server ? If not, you can run it from a second machine over ssh

ssh -X user@server

Or you can run a light weight X session on the server, run a web interface (convirt or similar), or run virsh (command line interface).

https://help.ubuntu.com/community/KVM/Virsh

Panther
  • 100,877
  • 19
  • 193
  • 283
  • how do I install it? on my mac when I try to do ssh like that I get /usr/bin/xauth: file /home/rkersey/.Xauthority does not exist – Reid Jan 05 '12 at 22:50
  • 3
    Try installing xauth `sudo apt-get install xauth` – Panther Jan 05 '12 at 22:56
0

Sorry to revive this old question, but I've encountered the same problem trying to run virt-manager via ssh+X11 with Putty from a Windows client machine.

For me, the following steps solved the problem:

  • Have xauth and xterm installed on the server
  • Have XMing running on the windows (client) machine
  • Run Putty with X11 forwarding (on client, connecting to server)
  • Log in as root, or other privileged user (using Putty from client)
  • Execute virt-manager on the server. It should bring up a separate dialog in Xming on the client showing virt-manager

So I think you were missing the X server on Windows, which is what Xming is providing.

WynX
  • 1
0

Have an ubuntu laptop/desktop in the same network as your server. Install virt-manager on it. Use: virt-manager -c qemu+ssh://root@your-server-ip-or-name/system as command.

Alternatively, read on at http://wiki.libvirt.org/page/FAQ

aquaherd
  • 6,160
  • 1
  • 29
  • 39