Heath Petersen
2011-Jul-13 03:44 UTC
[libvirt-users] Unable to start libvirtd 0.9.3 on Ubuntu 10.10
I just built libvirt 0.9.3 on my Ubuntu 10.10 box. It appears to have built correctly. When I try "virsh -c qemu:///session list --all" I get the following: error: Failed to connect socket to '@/home/heath/.libvirt/libvirt-sock': Connection refused error: failed to connect to the hypervisor After that, libvirtd isn't running as user heath as it did when I was using 0.9.2. When I run it with LIBVIRT_DEBUG=1 I get this: . . . 22:26:34.334: 8385: debug : remoteOpen:774 : Auto-spawn user daemon instance 22:26:34.334: 8385: debug : doRemoteOpen:487 : proceeding with name = qemu:///session 22:26:34.334: 8385: debug : doRemoteOpen:497 : Connecting with transport 1 22:26:34.378: 8385: debug : doRemoteOpen:544 : Proceeding with sockname @/home/heath/.libvirt/libvirt-sock 22:26:34.378: 8385: debug : virCommandRunAsync:1874 : About to run LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games HOME=/home/heath USER=heath LOGNAME=heath /usr/local/sbin/libvirtd --timeout=30 22:26:34.378: 8385: debug : virCommandRunAsync:1890 : Command result 0, with PID 8386 22:26:34.379: 8385: debug : virCommandRun:1711 : Result status 0, stdout: '(null)' stderr: '(null)' 22:26:55.430: 8385: debug : do_open:1059 : driver 7 remote returned ERROR 22:26:55.430: 8385: debug : virUnrefConnect:145 : unref connection 0x8451840 1 22:26:55.430: 8385: debug : virReleaseConnect:94 : release connection 0x8451840 error: Failed to connect socket to '@/home/heath/.libvirt/libvirt-sock': Connection refused error: failed to connect to the hypervisor I then proceeded to try to start libvirtd manually with "LIBVIRT_DEBUG=1 LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games HOME=/home/heath USER=heath LOGNAME=heath /usr/local/sbin/libvirtd --timeout=30". I got a return code of 1 with the following output: 22:29:33.295: 8389: info : libvirt version: 0.9.3 22:29:33.295: 8389: debug : virInitialize:412 : register drivers 22:29:33.295: 8389: debug : virRegisterDriver:767 : driver=0x3745e0 name=Test 22:29:33.295: 8389: debug : virRegisterDriver:791 : registering Test as driver 0 22:29:33.295: 8389: debug : virRegisterNetworkDriver:584 : registering Test as network driver 0 22:29:33.295: 8389: debug : virRegisterInterfaceDriver:617 : registering Test as interface driver 0 22:29:33.295: 8389: debug : virRegisterStorageDriver:650 : registering Test as storage driver 0 22:29:33.295: 8389: debug : virRegisterDeviceMonitor:683 : registering Test as device driver 0 22:29:33.295: 8389: debug : virRegisterSecretDriver:716 : registering Test as secret driver 0 22:29:33.295: 8389: debug : virRegisterNWFilterDriver:749 : registering Test as network filter driver 0 22:29:33.295: 8389: debug : virRegisterDriver:767 : driver=0x374fa0 name=Xen 22:29:33.295: 8389: debug : virRegisterDriver:791 : registering Xen as driver 1 22:29:33.295: 8389: debug : virRegisterDriver:767 : driver=0x375720 name=OPENVZ 22:29:33.295: 8389: debug : virRegisterDriver:791 : registering OPENVZ as driver 2 22:29:33.295: 8389: debug : virRegisterDriver:767 : driver=0x375920 name=VMWARE 22:29:33.295: 8389: debug : virRegisterDriver:791 : registering VMWARE as driver 3 22:29:33.295: 8389: debug : virRegisterDriver:767 : driver=0x375420 name=PHYP 22:29:33.295: 8389: debug : virRegisterDriver:791 : registering PHYP as driver 4 22:29:33.295: 8389: debug : virRegisterStorageDriver:650 : registering PHYP as storage driver 1 22:29:33.295: 8389: debug : virRegisterInterfaceDriver:617 : registering PHYP as interface driver 1 22:29:33.324: 8389: debug : tryLoadOne:163 : Found VBoxXPCOMC.so in '/usr/lib/virtualbox' 22:29:33.324: 8389: debug : vboxRegister:94 : VBoxCGlueInit found API version: 4.0.10 (4000010) 22:29:33.324: 8389: debug : vboxRegister:121 : VirtualBox API version: 4.0 22:29:33.324: 8389: debug : virRegisterDriver:767 : driver=0x376920 name=VBOX 22:29:33.324: 8389: debug : virRegisterDriver:791 : registering VBOX as driver 5 22:29:33.324: 8389: debug : virRegisterNetworkDriver:584 : registering VBOX as network driver 1 22:29:33.325: 8389: debug : virRegisterStorageDriver:650 : registering VBOX as storage driver 2 22:29:33.325: 8389: debug : virRegisterDriver:767 : driver=0x376c20 name=ESX 22:29:33.325: 8389: debug : virRegisterDriver:791 : registering ESX as driver 6 22:29:33.325: 8389: debug : virRegisterInterfaceDriver:617 : registering ESX as interface driver 2 22:29:33.325: 8389: debug : virRegisterNetworkDriver:584 : registering ESX as network driver 2 22:29:33.325: 8389: debug : virRegisterStorageDriver:650 : registering ESX as storage driver 3 22:29:33.325: 8389: debug : virRegisterDeviceMonitor:683 : registering ESX as device driver 1 22:29:33.325: 8389: debug : virRegisterSecretDriver:716 : registering ESX as secret driver 1 22:29:33.325: 8389: debug : virRegisterNWFilterDriver:749 : registering ESX as network filter driver 1 22:29:33.325: 8389: debug : virRegisterDriver:767 : driver=0x374a00 name=remote 22:29:33.325: 8389: debug : virRegisterDriver:791 : registering remote as driver 7 22:29:33.325: 8389: debug : virRegisterNetworkDriver:584 : registering remote as network driver 3 22:29:33.325: 8389: debug : virRegisterInterfaceDriver:617 : registering remote as interface driver 3 22:29:33.325: 8389: debug : virRegisterStorageDriver:650 : registering remote as storage driver 4 22:29:33.325: 8389: debug : virRegisterDeviceMonitor:683 : registering remote as device driver 2 22:29:33.325: 8389: debug : virRegisterSecretDriver:716 : registering remote as secret driver 2 22:29:33.325: 8389: debug : virRegisterNWFilterDriver:749 : registering remote as network filter driver 2 Any idea why libvirtd won't run? -- ---------- If you want to send stuff to the bit bucket, email Phineas.Ferb at Kandre.com .
Matthias Bolte
2011-Jul-13 08:52 UTC
[libvirt-users] Unable to start libvirtd 0.9.3 on Ubuntu 10.10
2011/7/13 Heath Petersen <HeathPetersen at kandre.com>:> I just built libvirt 0.9.3 on my Ubuntu 10.10 box. ?It appears to have built > correctly. > > When I try "virsh -c qemu:///session list --all" I get the following: > > error: Failed to connect socket to '@/home/heath/.libvirt/libvirt-sock': > Connection refused > error: failed to connect to the hypervisor > > After that, libvirtd isn't running as user heath as it did when I was using > 0.9.2. ?When I run it with LIBVIRT_DEBUG=1 I get this:Your problem is probably caused by a partly rewrite of libvirtd that introduced a regression in the libvirtd.conf file handling. When libvirtd is running as non-root it tries to read $HOME/.libvirt/libvirtd.conf. Before 0.9.3 it was non-fatal if this file wasn't there. In 0.9.3 this is fatal. You can either touch $HOME/.libvirt/libvirtd.conf to avoid the problem or apply this patches on top of 0.9.3 to fix it http://libvirt.org/git/?p=libvirt.git;a=commit;h=8e2e47803c0028b42b72c45b81e91de7b0cbb7fe http://libvirt.org/git/?p=libvirt.git;a=commit;h=a07c81c4d0befc1e92b9cf3ce25260488a6bdcdb -- Matthias Bolte http://photron.blogspot.com
Apparently Analagous Threads
- Problem starting libvirtd 0.9.3 on Ubuntu
- run virsh as non-root user
- Trouble connecting to XenServer HyperVisor with Java bindings
- java binding and virtualbox-ose
- virsh migrate results in error: Timed out during operation: cannot acquire state change lock