[one-users] QEMU-KVM problem: Error deploying VM on a Public Network

Gianni Dalla Torre gianni.dallatorre at cnaf.infn.it
Tue Nov 17 06:23:57 PST 2009


Hi Shi,

I followed your advice and created a symbolic link to /usr/bin/kvm
--oneadmin at omii001$ ln -s /usr/libexec/qemu-kvm /usr/bin/kvm

So I was able to solve that problem, thank you very much.

Anyway now I have another issue when I try do deploy my VM:
libvir: QEMU error :internal error Failed to add tap interface 'vnet%d' to bridge 'eth0' : Permission denied
This are the settings on omii001 host that I should be related with the issue:

--oneadmin at omii001$ id root
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),127(libvirtd),36(kvm)

--oneadmin at omii001$ id oneadmin
uid=1002(oneadmin) gid=1003(cloud) groups=1003(cloud),127(libvirtd),36(kvm)

--oneadmin at omii001$ cat /etc/group
libvirtd:x:127:root,oneadmin,cloud
cloud:x:1003:
kvm:x:36:root,oneadmin,cloud

--oneadmin at omii001$ ls -la /var/run/libvirt/
total 20
drwxr-xr-x  4 root root     4096 Nov 17 13:12 .
drwxr-xr-x 16 root root     4096 Nov 17 14:32 ..
srwxrwx---  1 root libvirtd    0 Nov 17 13:12 libvirt-sock
srwxrwxrwx  1 root libvirtd    0 Nov 17 13:12 libvirt-sock-ro
drwxr-xr-x  2 root root     4096 Nov 17 13:12 network
drwxr-xr-x  2 root root     4096 Sep 11 21:38 qemu

--oneadmin at omii001$ cat /etc/libvirt/libvirtd.conf
unix_sock_rw_perms = "0770"
unix_sock_group = "libvirtd"
 
I am not sure virsh is connecting in the right way, in fact if try "/virsh -c qemu:///system list/" in the omii001 host
I obtain a different output to the one from another host (that actually works), maybe have I to set the connection uri?

--oneadmin at omii001$virsh -c qemu:///system list
 Id Name                 State
----------------------------------

--oneadmin at ivanoc$virsh -c qemu:///system list
Connecting to uri: qemu:///system
 Id Name                 State
----------------------------------

The oned.log related to VM creation and deployment:

Tue Nov 17 13:18:13 2009 [TM][D]: Message received: TRANSFER SUCCESS 15 -
Tue Nov 17 13:18:19 2009 [InM][I]: Monitoring host omii001 (4)
Tue Nov 17 13:18:25 2009 [InM][D]: Host 4 successfully monitored.
Tue Nov 17 13:18:46 2009 [VMM][I]: --Mark--
Tue Nov 17 13:18:49 2009 [InM][I]: --Mark--
Tue Nov 17 13:18:52 2009 [VMM][D]: Message received: LOG - 15 Command execution fail: 'cat > /srv/cloud/one/var/15/images/deployment.0 && virsh create /srv/cloud/one/var/15/images/deployment.0'
Tue Nov 17 13:18:52 2009 [VMM][D]: Message received: LOG - 15 STDERR follows.
Tue Nov 17 13:18:52 2009 [VMM][D]: Message received: LOG - 15 13:18:53.525: error : No vport operation path found for host1
Tue Nov 17 13:18:52 2009 [VMM][D]: Message received: LOG - 15 13:18:53.539: error : No vport operation path found for host0
Tue Nov 17 13:18:52 2009 [VMM][D]: Message received: LOG - 15 13:18:53.561: error : No vport operation path found for host2
Tue Nov 17 13:18:52 2009 [VMM][D]: Message received: LOG - 15 13:18:54.182: error : internal error Failed to add tap interface 'vnet%d' to bridge 'eth0' : Permission denied
Tue Nov 17 13:18:52 2009 [VMM][D]: Message received: LOG - 15 libvir: QEMU error : internal error Failed to add tap interface 'vnet%d' to bridge 'eth0' : Permission denied
Tue Nov 17 13:18:52 2009 [VMM][D]: Message received: LOG - 15 error: Failed to create domain from /srv/cloud/one/var/15/images/deployment.0
Tue Nov 17 13:18:52 2009 [VMM][D]: Message received: LOG - 15 error: internal error Failed to add tap interface 'vnet%d' to bridge 'eth0' : Permission denied
Tue Nov 17 13:18:52 2009 [VMM][D]: Message received: LOG - 15 ExitCode: 1


Thank you in advance for your time.
Best regards,

Gianni


Shi Jin ha wrote

> Maybe kvm is not located at /usr/bin/kvm in your host distribution?
> A quick and dirty way might be to create a symbolic link. Not sure if
> it would help.
>
> Shi
>
> On Fri, Nov 13, 2009 at 10:48 AM, Gianni Dalla Torre
> <gianni.dallatorre at cnaf.infn.it> wrote:
>   
>> Hi all,
>>
>> I configured an OpenNebula (v 1.3.80) front-end in my pc "solaris" (Ubuntu
>> 9.04) and installed a cluster node "omii001" (Scientific Linux CERN SLC
>> release 2.6.18-164.6.1.el5 x86_64).
>> I need to access my VM through ssh, so I used the Bridged networking
>> ("shared physical device") following this instructions:
>> http://www.opennebula.org/doku.php?id=documentation:rel1.4:nm
>> And I used the kvm-hook-script taken from v. 1.3.85
>>
>> When I try do deploy my VM I have a failure.
>> from the log file seems that I have a problem with KVM configuration:
>> 	"Cannot find QEMU binary /usr/bin/kvm: No such file or directory"
>> I'm not sure my kvm installation was done properly, so maybe is my fault..
>> anyway  I follow the steps in the documentation and I can't find a
>> solution.
>>
>> Here some information about my configuration:
>>
>> I should have the kvm module loaded on my node:
>> oneadmin at omii001$/sbin/lsmod | grep kvm
>> kvm_intel              86248  0
>> kvm                   223264  2 ksm,kvm_intel
>>
>> But I have no kvm service running... (Is that my problem?)
>> oneadmin at omii001$ chkconfig --list | grep kvm
>> oneadmin at omii001$ chkconfig --list | grep libvirtd
>> libvirtd       	0:off	1:off	2:off	3:on	4:on	5:on	6:off
>> oneadmin at omii001$ chkconfig --list | grep qemu
>> qemu           	0:off	1:off	2:on	3:on	4:on	5:on	6:off
>>
>> oneadmin at solaris:/home/giannidallatorre$ onevm show two
>> VIRTUAL MACHINE 7 INFORMATION
>> ID             : 7
>> NAME           : two
>> STATE          : FAILED
>> LCM_STATE      : LCM_INIT
>> START TIME     : 11/13 17:30:07
>> END TIME       : 11/13 17:36:28
>> DEPLOY ID:     :
>>
>> VIRTUAL MACHINE TEMPLATE
>> CPU=1
>> DISK=[
>>   READONLY=no,
>>   SOURCE=/srv/cloud/one/images/debian5.img,
>>   TARGET=vda ]
>> GRAPHICS=[
>>   LISTEN=127.0.0.1,
>>   PORT=1,
>>   TYPE=vnc ]
>> MEMORY=512
>> NAME=two
>> NIC=[
>>   BRIDGE=eth0,
>>   IP=131.154.101.250,
>>   MAC=00:03:83:9a:65:fa,
>>   NETWORK=PublicVLAN,
>>   VNID=2 ]
>> OS=[
>>   BOOT=hd ]
>> SAVE=yes
>> VMID=7
>>
>> oneadmin at solaris:/home/giannidallatorre$ onevnet list
>>  NID USER     NAME              TYPE BRIDGE #LEASES
>>    2 oneadmin PublicVLAN       Fixed   eth0       1
>> oneadmin at solaris:/home/giannidallatorre$ onevnet show 2
>> VIRTUAL NETWORK 2 INFORMATION
>> ID:       : 2
>> UID:      : 0
>>
>> VIRTUAL NETWORK TEMPLATE
>> BRIDGE=eth0
>> LEASES=[ IP=131.154.101.250 ]
>> LEASES=[ IP=131.154.101.251 ]
>> LEASES=[ IP=131.154.101.252 ]
>> NAME=PublicVLAN
>> TYPE=FIXED
>>
>> LEASES INFORMATION
>> LEASE=[ IP=131.154.101.250, MAC=00:03:83:9a:65:fa, USED=1, VID=7 ]
>> LEASE=[ IP=131.154.101.251, MAC=00:03:83:9a:65:fb, USED=0, VID=-1 ]
>> LEASE=[ IP=131.154.101.252, MAC=00:03:83:9a:65:fc, USED=0, VID=-1 ]
>>
>>
>> This is the oned.log file:
>> Fri Nov 13 17:29:52 2009 [ONE][I]: Init OpenNebula Log system
>> Fri Nov 13 17:29:52 2009 [ONE][I]: Log Level: 3
>> [0=ERROR,1=WARNING,2=INFO,3=DEBUG]
>> Fri Nov 13 17:29:52 2009 [ONE][I]:
>> ----------------------------------------------
>> Fri Nov 13 17:29:52 2009 [ONE][I]:        OpenNebula Configuration File
>> Fri Nov 13 17:29:52 2009 [ONE][I]:
>> ----------------------------------------------
>> Fri Nov 13 17:29:52 2009 [ONE][I]:
>> --------------------------------------------
>>         DEBUG_LEVEL=3
>>         HM_MAD=EXECUTABLE=one_hm
>>         HOST_MONITORING_INTERVAL=60
>>
>> IM_MAD=ARGUMENTS=im_kvm/im_kvm.conf,EXECUTABLE=one_im_ssh,NAME=im_kvm
>>         MAC_PREFIX=00:03
>>         MANAGER_TIMER=30
>>         NETWORK_SIZE=254
>>         PORT=2633
>>         TM_MAD=ARGUMENTS=tm_nfs/tm_nfs.conf,EXECUTABLE=one_tm,NAME=tm_nfs
>>         VM_DIR=/srv/cloud/one/var
>>         VM_HOOK=ARGUMENTS=start
>> one-$VMID,COMMAND=/srv/cloud/one/share/hooks/ebtables-kvm,NAME=ebtables-running,ON=running,REMOTE=yes
>>
>> VM_HOOK=ARGUMENTS="",COMMAND=/srv/cloud/one/share/hooks/ebtables-flush,NAME=ebtables-shutdown,ON=shutdown,REMOTE=yes
>>
>> VM_HOOK=ARGUMENTS="",COMMAND=/srv/cloud/one/share/hooks/ebtables-flush,NAME=ebtables-stop,ON=stop,REMOTE=yes
>>
>> VM_MAD=DEFAULT=vmm_kvm/vmm_kvm.conf,EXECUTABLE=one_vmm_kvm,NAME=vmm_kvm,TYPE=kvm
>>         VM_POLLING_INTERVAL=60
>> --------------------------------------------
>> Fri Nov 13 17:29:52 2009 [VMM][I]: Starting Virtual Machine Manager...
>> Fri Nov 13 17:29:52 2009 [VMM][I]: Virtual Machine Manager started.
>> Fri Nov 13 17:29:52 2009 [LCM][I]: Starting Life-cycle Manager...
>> Fri Nov 13 17:29:52 2009 [LCM][I]: Life-cycle Manager started.
>> Fri Nov 13 17:29:52 2009 [InM][I]: Starting Information Manager...
>> Fri Nov 13 17:29:52 2009 [InM][I]: Information Manager started.
>> Fri Nov 13 17:29:52 2009 [TrM][I]: Starting Transfer Manager...
>> Fri Nov 13 17:29:52 2009 [TrM][I]: Transfer Manager started.
>> Fri Nov 13 17:29:52 2009 [DiM][I]: Starting Dispatch Manager...
>> Fri Nov 13 17:29:52 2009 [DiM][I]: Dispatch Manager started.
>> Fri Nov 13 17:29:52 2009 [ReM][I]: Starting Request Manager...
>> Fri Nov 13 17:29:52 2009 [ReM][I]: Request Manager started.
>> Fri Nov 13 17:29:52 2009 [ReM][I]: Starting XML-RPC server, port 2633 ...
>> Fri Nov 13 17:29:52 2009 [HKM][I]: Starting Hook Manager...
>> Fri Nov 13 17:29:52 2009 [HKM][I]: Hook Manager started.
>> Fri Nov 13 17:29:54 2009 [VMM][I]: Loading Virtual Machine Manager drivers.
>> Fri Nov 13 17:29:54 2009 [VMM][I]:      Loading driver: vmm_kvm (KVM)
>> Fri Nov 13 17:29:54 2009 [VMM][I]:      Driver vmm_kvm loaded.
>> Fri Nov 13 17:29:54 2009 [InM][I]: Loading Information Manager drivers.
>> Fri Nov 13 17:29:54 2009 [InM][I]:      Loading driver: im_kvm
>> Fri Nov 13 17:29:54 2009 [InM][I]:      Driver im_kvm loaded
>> Fri Nov 13 17:29:54 2009 [TM][I]: Loading Transfer Manager drivers.
>> Fri Nov 13 17:29:54 2009 [VMM][I]:      Loading driver: tm_nfs
>> Fri Nov 13 17:29:54 2009 [TM][I]:       Driver tm_nfs loaded.
>> Fri Nov 13 17:29:54 2009 [HKM][I]: Loading Hook Manager driver.
>> Fri Nov 13 17:29:54 2009 [HKM][I]:      Hook Manager loaded
>> Fri Nov 13 17:30:07 2009 [ReM][D]: VirtualMachineAllocate invoked
>> Fri Nov 13 17:30:07 2009 [DiM][D]: Allocating a new VM
>> Fri Nov 13 17:30:22 2009 [InM][I]: Monitoring host omii001 (4)
>> Fri Nov 13 17:30:23 2009 [ReM][D]: VirtualMachineDeploy invoked
>> Fri Nov 13 17:32:03 2009 [InM][I]: Monitoring host omii001 (4)
>> Fri Nov 13 17:35:33 2009 [InM][D]: Host 4 successfully monitored.
>> Fri Nov 13 17:35:57 2009 [TM][D]: Message received: LOG - 7 tm_clone.sh:
>> solaris:/srv/cloud/one/images/debian5.img
>> omii001:/srv/cloud/one/var/7/images/disk.0
>> Fri Nov 13 17:35:57 2009 [TM][D]: Message received: LOG - 7 tm_clone.sh:
>> DST: /srv/cloud/one/var/7/images/disk.0
>> Fri Nov 13 17:35:57 2009 [TM][D]: Message received: LOG - 7 tm_clone.sh:
>> Creating directory /srv/cloud/one/var/7/images
>> Fri Nov 13 17:35:57 2009 [TM][D]: Message received: LOG - 7 tm_clone.sh:
>> Executed "mkdir -p /srv/cloud/one/var/7/images".
>> Fri Nov 13 17:35:57 2009 [TM][D]: Message received: LOG - 7 tm_clone.sh:
>> Executed "chmod a+w /srv/cloud/one/var/7/images".
>> Fri Nov 13 17:35:57 2009 [TM][D]: Message received: LOG - 7 tm_clone.sh:
>> Cloning /srv/cloud/one/images/debian5.img
>> Fri Nov 13 17:35:57 2009 [TM][D]: Message received: LOG - 7 tm_clone.sh:
>> Executed "cp /srv/cloud/one/images/debian5.img
>> /srv/cloud/one/var/7/images/disk.0".
>> Fri Nov 13 17:35:57 2009 [TM][D]: Message received: LOG - 7 tm_clone.sh:
>> Executed "chmod a+w /srv/cloud/one/var/7/images/disk.0".
>> Fri Nov 13 17:35:57 2009 [TM][D]: Message received: TRANSFER SUCCESS 7 -
>> Fri Nov 13 17:36:28 2009 [VMM][D]: Message received: LOG - 7 Command
>> execution fail: 'cat > /srv/cloud/one/var/7/images/deployment.0 && virsh
>> create /srv/cloud/one/var/7/images/deployment.0'
>> Fri Nov 13 17:36:28 2009 [VMM][D]: Message received: LOG - 7 STDERR follows.
>> Fri Nov 13 17:36:28 2009 [VMM][D]: Message received: LOG - 7 17:36:46.885:
>> error : No vport operation path found for host1
>> Fri Nov 13 17:36:28 2009 [VMM][D]: Message received: LOG - 7 17:36:46.899:
>> error : No vport operation path found for host0
>> Fri Nov 13 17:36:28 2009 [VMM][D]: Message received: LOG - 7 17:36:46.920:
>> error : No vport operation path found for host2
>> Fri Nov 13 17:36:28 2009 [VMM][D]: Message received: LOG - 7 17:36:47.171:
>> error : Cannot find QEMU binary /usr/bin/kvm: No such file or directory
>> Fri Nov 13 17:36:28 2009 [VMM][D]: Message received: LOG - 7 libvir: QEMU
>> error : Cannot find QEMU binary /usr/bin/kvm: No such file or directory
>> Fri Nov 13 17:36:28 2009 [VMM][D]: Message received: LOG - 7 error: Failed
>> to create domain from /srv/cloud/one/var/7/images/deployment.0
>> Fri Nov 13 17:36:28 2009 [VMM][D]: Message received: LOG - 7 error: Cannot
>> find QEMU binary /usr/bin/kvm: No such file or directory
>> Fri Nov 13 17:36:28 2009 [VMM][D]: Message received: LOG - 7 ExitCode: 1
>> Fri Nov 13 17:36:28 2009 [VMM][D]: Message received: DEPLOY FAILURE 7 -
>> Fri Nov 13 17:36:33 2009 [TM][D]: Message received: LOG - 7 tm_delete.sh:
>> Deleting /srv/cloud/one/var/7/images
>> Fri Nov 13 17:36:33 2009 [TM][D]: Message received: LOG - 7 tm_delete.sh:
>> Executed "rm -rf /srv/cloud/one/var/7/images".
>> Fri Nov 13 17:36:33 2009 [TM][D]: Message received: TRANSFER SUCCESS 7 -
>>
>> Thank you in advance for your time.
>> Best regards,
>>
>> Gianni
>>
>> --
>>
>> Gianni Dalla Torre
>> Computer Science Engineering
>> INFN -CNAF
>> Via Ranzani 13/2
>> 40127 Bologna, Italy
>> Phone:	+39 051 6092913
>> Fax:	+39 051 6092916
>> mail:	dallatorre&cnaf.infn.it
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opennebula.org
>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>     
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20091117/685b6041/attachment-0003.htm>


More information about the Users mailing list