[one-users] Failed to create domainfrom/var/lib/one//5/images/deployment.0
Jaime Melis
j.melis at fdi.ucm.es
Thu Oct 15 13:26:38 PDT 2009
Hi Liu,
it seems that you have a problem with your configuration of libvirt in the
nodes. For OpenNebula to be able to set up the tap interface the oneadmin
user in the nodes must be able to connect to qemu:///system.
First of all, are you able to connect to qemu:///system as root (in the
nodes)? If that's not the case you have a problem with your installation.
Supposing that you can, please check that the following options are set in
your libvirtd.conf:
unix_sock_group = "libvirtd"
unix_sock_rw_perms = "0770"
The sockets libvirt creates belong to unix_sock_group (which if unset
defaults to 'root', therefore unwriteable by the rest of users).
You can find them here:
srwxrwx--- 1 root libvirtd 0 2009-10-15 20:20 /var/run/libvirt/libvirt-sock
srwxrwxrwx 1 root libvirtd 0 2009-10-15 20:20
/var/run/libvirt/libvirt-sock-ro
According to the above configuration, the oneadmin user should belong to
group libvirtd to be able to read and write to the socket.
Hope this helps.
regards,
Jaime
On Thu, Oct 15, 2009 at 2:11 PM, Ruben S. Montero <rubensm at dacya.ucm.es>wrote:
> That only changes the live migration. Add something like:
>
> Line 88:
> command="-c qemu:///system create #{remote_deployment_file}"
>
> and the std_actions, Line 103, 107...
>
> std_action("SHUTDOWN", "-c qemu:///system shutdown #{args[3]}", args)
>
>
> Cheers
>
> On Thu, Oct 15, 2009 at 1:28 PM, Liu, Zhentao
> <Zhentao.Liu at fokus-extern.fraunhofer.de> wrote:
> > Hi,
> >
> > I have changed the file "/usr/lib/one/mads/one_vmm_kvm.rb"
> >
> >
> -----------------------------------------------------------------------------------------------
> > def action_migrate(args)
> > std_action("MIGRATE", "migrate --live #{args[3]}
> > qemu+tcp://#{args[4]}/session", args)
> >
> ----------------------------------------------------------------------------------------------
> >
> > I have changed "session" to "system", and I also add "oneadmin" to
> libvirtd
> > group, but there is still the same error.
> >
> > Other ideas?
> >
> > Regards
> >
> > Zhentao
> >
> > -----Original Message-----
> > From: rsmontero at gmail.com on behalf of Ruben S. Montero
> > Sent: Thu 10/15/2009 11:18 AM
> > To: Liu, Zhentao
> > Cc: Jaime Melis; users at lists.opennebula.org
> > Subject: Re: [one-users] Failed to create
> > domainfrom/var/lib/one//5/images/deployment.0
> >
> > Hi,
> >
> > The problem
> >
> > "Failed to add tap interface 'vnet%d' to bridge 'br2' "
> >
> > is because of libvirt not able to join the tap interface to br2. In
> > order to do so, the connection URI should be qemu:///system (and you
> > have to be in the libvirt group, also libvirt should be using socket
> > auth and not policy kit), it seems that your configuration is using
> > qemu:///session instead. You can add this to the virsh commands in
> > one_vmm_kvm.rb (virsh -c qemu:///system).
> >
> > Beaware that in this case you also need a fix (already in trunk) to
> > make stop/resume and migration work.
> >
> > Cheers
> >
> > Ruben
> >
> > On Thu, Oct 15, 2009 at 9:48 AM, Liu, Zhentao
> > <Zhentao.Liu at fokus-extern.fraunhofer.de> wrote:
> >> Hello, Jaime
> >>
> >> I have added both my user, root und oneadmin to the libvirtd group. But
> it
> >> still can't work.
> >> Have you other suggestions?
> >>
> >>
> >>
> -----------------------------------------------------------------------------------------------------------------------------------------------------
> >> root at taresian:/# id oneadmin
> >> uid=408(oneadmin) gid=65534(nogroup) Gruppen=65534(nogroup),0(root)
> >> root at taresian:/# id zli
> >> uid=823(zli) gid=1700(extern)
> >>
> >>
> Gruppen=1700(extern),4(adm),20(dialout),24(cdrom),46(plugdev),106(lpadmin),121(admin),122(sambashare),125(libvirtd)
> >> root at taresian:/# id root
> >> uid=0(root) gid=0(root)
> >> Gruppen=0(root),124(kvm),125(libvirtd),129(vde2-net),1002(tun)
> >>
> >>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
> >>
> >> Regards
> >>
> >> Zhentao
> >>
> >>
> >> -----Original Message-----
> >> From: users-bounces at lists.opennebula.org on behalf of Jaime Melis
> >> Sent: Wed 10/14/2009 10:38 AM
> >> To: Liu, Zhentao
> >> Cc: users at lists.opennebula.org
> >> Subject: Re: [one-users] Failed to create
> >> domainfrom/var/lib/one//5/images/deployment.0
> >>
> >> Hello,
> >>
> >> It seems that the oneadmin user does not belong to group libvirtd. Try
> >> adding both your user account and oneadmin to this group.
> >>
> >> Regards,
> >> Jaime
> >>
> >> On Wed, Oct 14, 2009 at 10:32 AM, Liu, Zhentao <
> >> Zhentao.Liu at fokus-extern.fraunhofer.de> wrote:
> >>
> >>> Hello,
> >>>
> >>> I have changed the disk partitions to sda, but it still doesn't work.
> >>> There
> >>> is still the same error.
> >>>
> >>>
> >>>
> >>>
> >>>
> --------------------------------------------------------------------------------------------------------------------------------------------------------
> >>>
> >>> Tue Oct 13 17:43:18 2009 [VMM][D]: Message received: LOG - 7 error:
> >>> Failed
> >>> to create domain from /var/lib/one//7/images/deployment.0
> >>>
> >>> Tue Oct 13 17:43:18 2009 [VMM][D]: Message received: LOG - 7 error:
> >>> internal error Failed to add tap interface 'vnet%d' to bridge 'br2' :
> >>> Permission denied
> >>>
> >>> Tue Oct 13 17:43:18 2009 [VMM][D]: Message received: LOG - 7 ExitCode:
> 1
> >>>
> >>> Tue Oct 13 17:43:18 2009 [VMM][D]: Message received: DEPLOY FAILURE 7
> >>> Failed to create domain from /var/lib/one//7/images/deployment.0
> >>>
> >>>
> >>>
> >>>
> --------------------------------------------------------------------------------------------------------------------------------------------------------
> >>> ps: I have changed the interface to br2. This is my network
> >>> configuration.
> >>>
> >>>
> >>>
> >>>
> >>>
> ------------------------------------------------------------------------------
> >>>
> >>> auto lo
> >>> iface lo inet loopback
> >>>
> >>>
> >>> auto eth2
> >>> iface eth2 inet manual
> >>>
> >>> auto br2
> >>> iface br2 inet dhcp
> >>> bridge_ports eth2
> >>> bridge_stp off
> >>> bridge_fd 0
> >>> bridge_maxwait 0
> >>> metric 1
> >>>
> >>>
> --------------------------------------------------------------------------
> >>>
> >>> I can't run virsh correctly on the node. Maybe is it the problem?
> >>> -------------------------------------------------------------
> >>> root at forest:/var/run/libvirt# virsh -c qemu:///system list
> >>> error: unable to connect to '/var/run/libvirt/libvirt-sock': Connection
> >>> refused
> >>> error: failed to connect to the hypervisor
> >>>
> >>> -------------------------------------------------------------
> >>>
> >>> Any ideas?
> >>>
> >>> Regards
> >>>
> >>> Zhentao
> >>>
> >>>
> >>>
> >>>
> >>> -----Original Message-----
> >>> From: users-bounces at lists.opennebula.org on behalf of Javier Fontan
> >>> Sent: Tue 10/13/2009 2:09 PM
> >>> To: Liu, Zhentao
> >>> Cc: users at lists.opennebula.org
> >>> Subject: Re: [one-users] Failed to create domain
> >>> from/var/lib/one//5/images/deployment.0
> >>>
> >>> Hello,
> >>>
> >>> kvm is unable to bind images to disk partitions, that is, sda1. You
> >>> only can bind the image to a full disk device, for example sda.
> >>>
> >>> Bye
> >>>
> >>> On Tue, Oct 13, 2009 at 1:48 PM, Liu, Zhentao
> >>> <Zhentao.Liu at fokus-extern.fraunhofer.de> wrote:
> >>> > Hello,
> >>> >
> >>> > I have deployed a vm into my node, but the vm dosen't work. It has
> this
> >>> > error:
> >>> >
> >>> > oned.log
> >>> >
> >>>
> >>>
> >>>
> ------------------------------------------------------------------------------------------------
> >>> > Tue Oct 13 12:45:31 2009 [TM][D]: Message received: LOG - 5
> >>> > tm_clone.sh:
> >>> > taresian:/boot/euca-debian-5.0-x86_64/debian.5-0.x86-64.img
> >>> > 193.175.134.144:/var/lib/one//5/images/disk.0
> >>> >
> >>> > Tue Oct 13 12:45:31 2009 [TM][D]: Message received: LOG - 5
> >>> > tm_clone.sh:
> >>> > DST: /var/lib/one//5/images/disk.0
> >>> >
> >>> > Tue Oct 13 12:45:31 2009 [TM][D]: Message received: LOG - 5
> >>> > tm_clone.sh:
> >>> > Creating directory /var/lib/one//5/images
> >>> >
> >>> > Tue Oct 13 12:46:10 2009 [VMM][I]: --Mark--
> >>> > Tue Oct 13 12:46:26 2009 [TM][D]: Message received: LOG - 5
> >>> > tm_clone.sh:
> >>> > Executed "ssh 193.175.134.144 mkdir -p /var/lib/one//5/images".
> >>> >
> >>> > Tue Oct 13 12:46:26 2009 [TM][D]: Message received: LOG - 5
> >>> > tm_clone.sh:
> >>> > Cloning taresian:/boot/euca-debian-5.0-x86_64/debian.5-0.x86-64.img
> >>> >
> >>> > Tue Oct 13 12:46:28 2009 [InM][D]: Host 4 successfully monitored.
> >>> > Tue Oct 13 12:46:42 2009 [InM][I]: --Mark--
> >>> > Tue Oct 13 12:46:42 2009 [InM][I]: Monitoring host 193.175.134.144
> (4)
> >>> > Tue Oct 13 12:48:51 2009 [TM][D]: Message received: LOG - 5
> >>> > tm_clone.sh:
> >>> > Executed "scp
> >>> > taresian:/boot/euca-debian-5.0-x86_64/debian.5-0.x86-64.img
> >>> > 193.175.134.144:/var/lib/one//5/images/disk.0".
> >>> >
> >>> > Tue Oct 13 12:49:18 2009 [InM][D]: Host 4 successfully monitored.
> >>> > Tue Oct 13 12:49:38 2009 [InM][I]: Monitoring host 193.175.134.144
> (4)
> >>> > Tue Oct 13 12:49:41 2009 [TM][D]: Message received: LOG - 5
> >>> > tm_clone.sh:
> >>> > Executed "ssh 193.175.134.144 chmod a+w
> /var/lib/one//5/images/disk.0".
> >>> >
> >>> > Tue Oct 13 12:49:41 2009 [TM][D]: Message received: LOG - 5
> >>> > tm_mkswap.sh:
> >>> > Creating 1024Mb image in /var/lib/one//5/images/disk.1
> >>> >
> >>> > Tue Oct 13 12:50:31 2009 [TM][D]: Message received: LOG - 5
> >>> > tm_mkswap.sh:
> >>> > Executed "ssh 193.175.134.144 mkdir -p /var/lib/one//5/images".
> >>> >
> >>> > Tue Oct 13 12:51:21 2009 [TM][D]: Message received: LOG - 5
> >>> > tm_mkswap.sh:
> >>> > Executed "ssh 193.175.134.144 dd if=/dev/zero
> >>> > of=/var/lib/one//5/images/disk.1 bs=1 count=1 seek=1024M".
> >>> >
> >>> > Tue Oct 13 12:51:21 2009 [TM][D]: Message received: LOG - 5
> >>> > tm_mkswap.sh:
> >>> > Initializing swap space
> >>> >
> >>> > Tue Oct 13 12:52:15 2009 [TM][D]: Message received: LOG - 5
> >>> > tm_mkswap.sh:
> >>> > Executed "ssh 193.175.134.144 /sbin/mkswap
> >>> /var/lib/one//5/images/disk.1".
> >>> >
> >>> > Tue Oct 13 12:53:08 2009 [TM][D]: Message received: LOG - 5
> >>> > tm_mkswap.sh:
> >>> > Executed "ssh 193.175.134.144 chmod a+w
> /var/lib/one//5/images/disk.1".
> >>> >
> >>> > Tue Oct 13 12:53:08 2009 [TM][D]: Message received: TRANSFER SUCCESS
> 5
> >>> > -
> >>> >
> >>> > Tue Oct 13 12:53:08 2009 [VMM][D]: Message received: LOG - 5 Command:
> >>> > scp
> >>> > /var/lib/one/5/deployment.0
> >>> > 193.175.134.144:/var/lib/one//5/images/deployment.0
> >>> >
> >>> > Tue Oct 13 12:53:58 2009 [VMM][D]: Message received: LOG - 5 Copy
> >>> > success
> >>> >
> >>> > Tue Oct 13 12:54:51 2009 [VMM][D]: Message received: LOG - 5 error:
> >>> Failed
> >>> > to create domain from /var/lib/one//5/images/deployment.0
> >>> >
> >>> > Tue Oct 13 12:54:51 2009 [VMM][D]: Message received: LOG - 5 error:
> >>> internal
> >>> > error unsupported disk type 'sda1'
> >>> >
> >>> > Tue Oct 13 12:54:51 2009 [VMM][D]: Message received: LOG - 5
> ExitCode:
> >>> > 1
> >>> >
> >>> > Tue Oct 13 12:54:51 2009 [VMM][D]: Message received: DEPLOY FAILURE 5
> >>> Failed
> >>> > to create domain from /var/lib/one//5/images/deployment.0
> >>> >
> >>>
> >>>
> >>>
> --------------------------------------------------------------------------------------------------------------------------------------------
> >>> >
> >>> > deployment.0
> >>> >
> >>> >
> >>>
> >>>
> >>>
> -----------------------------------------------------------------------------------------
> >>> >
> >>> > <domain type='kvm'>
> >>> > <name>one-5</name>
> >>> > <vcpu>1</vcpu>
> >>> > <memory>131072</memory>
> >>> > <os>
> >>> > <type>hvm</type>
> >>> >
> >>> >
> >>>
> >>>
> >>>
> <kernel>/boot/euca-ubuntu-9.04-x86_64/kvm-kernel/vmlinuz-2.6.28-11-generic</kernel>
> >>> >
> >>> >
> >>>
> >>>
> >>>
> <initrd>/boot/euca-ubuntu-9.04-x86_64/kvm-kernel/initrd.img-2.6.28-11-generic</initrd>
> >>> > <cmdline>root=/dev/sda1 </cmdline>
> >>> > <boot dev='hd'/>
> >>> > </os>
> >>> > <devices>
> >>> > <emulator>/usr/bin/kvm</emulator>
> >>> > <disk type='file' device='disk'>
> >>> > <source
> file='/var/lib/one//5/images/disk.0'/>
> >>> > <target dev='sda1'/>
> >>> > </disk>
> >>> > <disk type='file' device='disk'>
> >>> > <source
> file='/var/lib/one//5/images/disk.1'/>
> >>> > <target dev='sdb'/>
> >>> > </disk>
> >>> > <interface type='bridge'>
> >>> > <source bridge='eth0'/>
> >>> > <mac address='00:16:0a:00:01:01'/>
> >>> > </interface>
> >>> > </devices>
> >>> > <features>
> >>> > <acpi/>
> >>> > </features>
> >>> > </domain>
> >>> >
> >>>
> >>>
> >>>
> -------------------------------------------------------------------------------------------------
> >>> >
> >>> > Otherwise there is also a error, when I run "virsh" on the node:
> >>> >
> >>> >
> >>>
> >>>
> >>>
> ----------------------------------------------------------------------------
> >>> > $ virsh -c qemu:///system list
> >>> > error: unable to connect to '/var/run/libvirt/libvirt-sock':
> Permission
> >>> > denied
> >>> > error: failed to connect to the hypervisor
> >>> >
> >>> >
> >>> >
> -------------------------------------------------------------------------
> >>> >
> >>> > Is the error "Failed to create domain from
> >>> > /var/lib/one//5/images/deployment.0" caused by wrong "virsh"?
> >>> >
> >>> > Any helps?
> >>> >
> >>> > Regards
> >>> >
> >>> > Zhentao
> >>> >
> >>> >
> >>> > _______________________________________________
> >>> > Users mailing list
> >>> > Users at lists.opennebula.org
> >>> > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
> >>> >
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> Javier Fontan, Grid & Virtualization Technology Engineer/Researcher
> >>> DSA Research Group: http://dsa-research.org
> >>> Globus GridWay Metascheduler: http://www.GridWay.org
> >>> OpenNebula Virtual Infrastructure Engine: http://www.OpenNebula.org
> >>> _______________________________________________
> >>> Users mailing list
> >>> Users at lists.opennebula.org
> >>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
> >>>
> >>>
> >>> _______________________________________________
> >>> Users mailing list
> >>> Users at lists.opennebula.org
> >>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
> >>>
> >>>
> >>
> >>
> >> _______________________________________________
> >> Users mailing list
> >> Users at lists.opennebula.org
> >> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
> >>
> >>
> >
> >
> >
> > --
> > +---------------------------------------------------------------+
> > Dr. Ruben Santiago Montero
> > Associate Professor
> > Distributed System Architecture Group (http://dsa-research.org)
> >
> > URL: http://dsa-research.org/doku.php?id=people:ruben
> > Weblog: http://blog.dsa-research.org/?author=7
> >
> > GridWay, http://www.gridway.org
> > OpenNebula, http://www.opennebula.org
> > +---------------------------------------------------------------+
> >
> >
>
>
>
> --
> +---------------------------------------------------------------+
> Dr. Ruben Santiago Montero
> Associate Professor
> Distributed System Architecture Group (http://dsa-research.org)
>
> URL: http://dsa-research.org/doku.php?id=people:ruben
> Weblog: http://blog.dsa-research.org/?author=7
>
> GridWay, http://www.gridway.org
> OpenNebula, http://www.opennebula.org
> +---------------------------------------------------------------+
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20091015/3c4f6113/attachment-0003.htm>
More information about the Users
mailing list