[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] How does libvirt 0.6.3 load kvm driver

Dear all,

I found that libvirt 0.6.3 seems does not load KVM driver while libvirt 0.3.3 does.

Situation description:

I am using CentOS 5.3, and the kernel I used is 2.6.30.
I downloaded the kernel from kernel.org andcompile it. KVM was compiled as a module. libvirt: libvirt 0.6.3, released by Eucalyptus(a cloud computing infrastructure software which supports KVM as well)

(1) libvirt 0.6.3 does not load KVM driver

After booting the machine with kernel 2.6.30 and probe KVM related module.
I started libvirtd 0.6.3 and set LD_LIBRARY_PATH to "$LIBVIRT_063_HOME/lib:$LIBVIRT_063_HOME/usr/lib:$LD_LIBRARY_PATH". I found that I am not able to connect to libvirtd using "virsh --connect qemu:///system"(the virsh used is virsh 0.6.3 that shipped with libvirt 0.6.3), here is the debug message:

======================================= debug message =========================================
17:41:11.219: debug : virInitialize:290 : register drivers
17:41:11.219: debug : virRegisterDriver:667 : registering Test as driver 0
17:41:11.219: debug : virRegisterNetworkDriver:567 : registering Test as network driver 0 17:41:11.219: debug : virRegisterStorageDriver:598 : registering Test as storage driver 0 17:41:11.219: debug : virRegisterDeviceMonitor:629 : registering Test as device driver 0
17:41:11.219: debug : virRegisterDriver:667 : registering Xen as driver 1
17:41:11.219: debug : vboxRegister:68 : VBoxCGlueInit failed: 0.0.0, errorval=-1
17:41:11.219: debug : virRegisterDriver:667 : registering VBOX as driver 2
17:41:11.219: debug : virConnectOpen:1050 : name=qemu:///system
17:41:11.219: debug : do_open:920 : name "qemu:///system" to URI components:
 scheme qemu
 opaque (null)
 authority (null)
 server (null)
 user (null)
 port 0
 path /system

17:41:11.219: debug : do_open:930 : trying driver 0 (Test) ...
17:41:11.219: debug : do_open:936 : driver 0 Test returned DECLINED
17:41:11.219: debug : do_open:930 : trying driver 1 (Xen) ...
17:41:11.219: debug : do_open:936 : driver 1 Xen returned DECLINED
17:41:11.219: debug : do_open:930 : trying driver 2 (VBOX) ...
17:41:11.219: debug : do_open:936 : driver 2 VBOX returned DECLINED
libvir: error : could not connect to qemu:///system
17:41:11.219: debug : virUnrefConnect:210 : unref connection 0x60dd00 1
17:41:11.219: debug : virReleaseConnect:171 : release connection 0x60dd00
libvirt error: could not connect to qemu:///system (code=5)
error: failed to connect to hypervisor
================================end of debug message =========================================

It seems that libvirt 0.6.3 does not load QEMU driver.

(2) libvirt 0.3.3 does load KVM driver

However, when I run the command "lsmod | grep kvm". I found KVM module was present: ================================= result of lsmod ==============================================
[root node2 ~]# lsmod | grep kvm
kvm_intel              46664  0
kvm                   166224  1 kvm_intel
[root node2 ~]#
================================= end of result of lsmod =========================================

I stopped libvirtd 0.6.3 and then started libvirtd 0.3.3(the one shipped with CentOS 5.3). The virtual machine manager works well and I can use "virsh --connect qemu:///system"(the virsh used is virsh 0.3.3 that shipped with CentOS 5.3) to connect to libvirtd.

I dig into libvirt source code.
I found that in libvirt 0.3.3:
There is qemudRegister() in libvirt.c. I think this function call is responsible for loading qemu(kvm) driver.
And in libvirt 0.6.3:
I cannot found qemudRegister() or virDriverLoadModule("qemu") in the source code.

My question is: Does libvirt 0.6.3 support KVM? If yes, how does it load KVM driver? I want to find out why libvirt 0.3.3 works well while libvirt 0.6.3 does not work in my computer.


Jason Wong

System engineer

Cluster Technology Limited

Email: hcwong clustertech com

Direct Line: (852) 2655-6129

Tel: (852) 2655-6100

Fax: (852) 2994-2101

Website: www.clustertech.com

The information and attachment contained in this e-mail originating from
Cluster Technology Limited is confidential and intended solely for
the specified addressees. If you have received this email in error,
please do not read, copy, distribute, disclose or use any information of
this email in any way and please immediately notify the sender and delete
this email. Thank you for your cooperation.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]