wiki:TipAndDoc/VM/virt-manager

Version 6 (modified by mitty, 12 years ago) (diff)

--

virt-manager

  • cannot connect hypervisor
    Unable to open connection to hypervisor URI 'xen:///':
    unable to connect to 'localhost:8000': Connection refused
    Traceback (most recent call last):
      File "/usr/share/virt-manager/virtManager/connection.py", line 971, in _try_open
        None], flags)
      File "/usr/lib/python2.6/dist-packages/libvirt.py", line 111, in openAuth
        if ret is None:raise libvirtError('virConnectOpenAuth() failed')
    libvirtError: unable to connect to 'localhost:8000': Connection refused
    
    • (XenPPC) virt-manager/virsh connection errors - fixed

      virt-manager:

      Unable to open connection to hypervisor URI 'xen':

      virtsh:

      virsh: error: failed to connect to the hypervisor

      After debugging a bit the problem looks pretty trivial - libvirt tries to access

       /var/lib/xend/xend-socket
      

      The default config of xend as it is currently in the repostitory seems to have the config in /etc/xen/xend-config.sxp default to no and commented out:

       #(xend-unix-server no)
      

      change this to

       (xend-unix-server yes)
      
      • (xend-unix-path /var/lib/xend/xend-socket) のコメントアウトも必要
    • (xend-http-server yes) だけでも良い模様
      • Dom-0のstatusが見られるようになる

*Strange keyboard layouts in virt-manager @ rusty_angel's Temptation of Saint Aqualung

  1. remove Graphics device represented by VNC server
  2. add a new one, but set keymap to «en-us» instead of leaving it “same as host”.
  3. restart you guest

install

  • $ sudo aptitude install -R virt-manager

use virt-manager with Windows

  • need X Window System for Windows and X11forwarding
  1. use Cygwin-X
  2. X11forwarding with PuTTY
  3. type virt-manager

connecting local VMM

  1. virt-manager main window
  2. File > Add Connection...
  3. press [Connect]
  4. connected to localhost
  5. only double click to connect

create new VM

  • Press [New] icon
  1. 1/5 set VM name and install source
  2. 2/5 set OS type
  3. 3/5 set Memory and CPUs
  4. 4/5 set Storage
  5. 5/5 summary
    • Advanced options(Network device, MAC address, etc)

use version 0.9.1 on Debian 6.0

  • wheezyリポジトリを使えるようにする => Linux/Debian
  • mitty@squeeze:~$ virt-manager
    /usr/share/virt-manager/virt-manager.py:306: DeprecationWarning: Importing dbus.glib to use the GLib main loop with dbus-python is deprecated.
    Instead, use this sequence:
    
        from dbus.mainloop.glib import DBusGMainLoop
    
        DBusGMainLoop(set_as_default=True)
    
      import dbus.glib
    
    • => Fedora Hosted Git Repositories - virt-manager.git/commitdiff
      • src/virt-manager.py.in

        index 464cf02..18f407e 100755 (executable)
        a b def main(): 
        302302    gobject.threads_init() 
        303303 
        304304    import dbus 
        305     import dbus.glib 
        306     dbus.glib.threads_init() 
         305    import dbus.mainloop.glib 
         306    dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) 
         307    dbus.mainloop.glib.threads_init() 
        307308    import dbus.service 
        308309 
        309310    # Specifically init config/gconf before the fork, so that pam 

Attachments (15)

Download all attachments as: .zip