[[PageOutline]] [[TitleIndex(TipAndDoc/VM/virt-manager,format=group)]] = virt-manager = * http://virt-manager.et.redhat.com/ * [http://kernhack.hatenablog.com/entry/2014/12/17/230223 virt-managerで仮想環境作成時に選択するOS Typeは何に使っているのか - φ(・・*)ゞ ウーン カーネルとか弄ったりのメモ] * 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 }}} * [http://lists.xensource.com/archives/html/xen-ppc-devel/2007-07/msg00001.html (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が見られるようになる * warning : qemudStartup:1832 : Unable to create cgroup for driver: No such device or address * [http://www.mail-archive.com/libvir-list@redhat.com/msg15638.html (libvirt) Unable to create cgroup for driver] *[http://en.miheev.info/2010/01/18/virt-manager-keymap.html Strange keyboard layouts in virt-manager @ rusty_angel's Temptation of Saint Aqualung] > 1. remove Graphics device represented by VNC server > 1. add a new one, but set keymap to «en-us» instead of leaving it “same as host”. > 1. restart you guest == install == * $ sudo aptitude install -R virt-manager * see also [../QEMU#install] * Ubuntu 12.04では{{{gnome-icon-theme}}}もインストールしないとvirt-managerのUI上にアイコンが表示されない == use virt-manager with Windows == * need X Window System for Windows and X11forwarding 1. use Cygwin-X[[br]][[Image(virt-manager-01-Cygwin-X.png,33%)]] 1. X11forwarding with PuTTY[[br]][[Image(virt-manager-02-X11withPuTTY.png,33%)]] 1. type **//virt-manager//**[[br]][[Image(virt-manager-03-exec.png,33%)]] == connecting local VMM == 1. virt-manager main window[[br]][[Image(virt-manager-04-main-window.png,33%)]] 1. File > Add Connection...[[br]][[Image(virt-manager-05-add-connection.png,33%)]] 1. press [Connect][[br]][[Image(virt-manager-06-connect.png,33%)]] 1. connected to localhost[[br]][[Image(virt-manager-07-connected.png,33%)]] 1. only double click to connect[[br]][[Image(virt-manager-08-system.png,33%)]][[Image(virt-manager-09-double-click.png,33%)]] == create new VM == * Press [New] icon 1. 1/5 set VM name and install source[[br]][[Image(virt-manager-10-1of5.png,33%)]] 1. 2/5 set OS type[[br]][[Image(virt-manager-11-2of5.png,33%)]] 1. 3/5 set Memory and CPUs[[br]][[Image(virt-manager-12-3of5.png,33%)]] 1. 4/5 set Storage[[br]][[Image(virt-manager-13-4of5.png,33%)]] 1. 5/5 summary[[br]][[Image(virt-manager-14-5of5.png,33%)]] * Advanced options(Network device, MAC address, etc)[[br]][[Image(virt-manager-15-advanced.png,33%)]] = use version 0.9.1 on Debian 6.0 = * wheezyリポジトリを使えるようにする => [../../Linux/Debian#usewheezypackages] * GNOME等が導入済みの場合、依存関係を壊さずに導入する方法は今のところ不明 * qemu等が未導入の場合 * mitty@squeeze:~$ sudo aptitude install -t wheezy qemu-kvm libvirt-bin virt-manager udev * udevは依存関係から指定する {{{ The following packages have unmet dependencies: udev: Depends: libudev0 (= 164-3) but 175-3.1 is to be installed. }}} * squeezeリポジトリから既に導入済みの場合 * 「The following packages have unmet dependencies:」といわれるパッケージを追加する * mitty@squeeze:~$ sudo aptitude install -t wheezy qemu-kvm libvirt-bin virt-manager python-gnome2 python-pyorbit libgail18 python-numpy python-pycurl seabios librsvg2-common python-gtk-vnc python-glade2 python-vte python-cairo python-dbus python-gobject python-libvirt python-gtk2 python-gconf python-libxml2 seabios qemu == warning == * 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 }}} * => [http://git.fedorahosted.org/git/?p=virt-manager.git;a=commitdiff;h=cda1dd81f95ab335389eadfbdfe33e49785d6bb2;hp=51360f885433271dded02ca63147553d57d5090d Fedora Hosted Git Repositories - virt-manager.git/commitdiff] {{{#!diff index 464cf02..18f407e 100755 (executable) --- a/src/virt-manager.py.in +++ b/src/virt-manager.py.in @@ -302,8 +302,9 @@ def main(): gobject.threads_init() import dbus - import dbus.glib - dbus.glib.threads_init() + import dbus.mainloop.glib + dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) + dbus.mainloop.glib.threads_init() import dbus.service # Specifically init config/gconf before the fork, so that pam }}}