[one-users] Difficulty in accessing the virtual instance

Prakhar Srivastava prakhar.apj at gmail.com
Mon Dec 20 02:40:15 PST 2010


Hi,
I tried to use the contextualization in the template file. But everytime I
create the instance, it fails at boot time saying "tap device could not be
connected". I belive this is the problem with xen. Is there any way I can
change the driver of the iso file created by the opennebula when the
instance is created. Following is the instance log
-----------------------------------------------------------------------------------------------------------------------------
Mon Dec 20 15:23:14 2010 [DiM][I]: New VM state is ACTIVE.
Mon Dec 20 15:23:14 2010 [LCM][I]: New VM state is PROLOG.
Mon Dec 20 15:24:46 2010 [TM][I]: tm_clone.sh:
prakhar-desktop:/var/lib/one//images/32e8224dac203aa2874167c7b180f666c1c77da2
192.168.145.71:/var/lib/one//48/images/disk.0
Mon Dec 20 15:24:46 2010 [TM][I]: tm_clone.sh: DST:
/var/lib/one//48/images/disk.0
Mon Dec 20 15:24:46 2010 [TM][I]: tm_clone.sh: Creating directory
/var/lib/one//48/images
Mon Dec 20 15:24:46 2010 [TM][I]: tm_clone.sh: Executed "/usr/bin/ssh
192.168.145.71 mkdir -p /var/lib/one//48/images".
Mon Dec 20 15:24:46 2010 [TM][I]: tm_clone.sh: Cloning
prakhar-desktop:/var/lib/one//images/32e8224dac203aa2874167c7b180f666c1c77da2
Mon Dec 20 15:24:46 2010 [TM][I]: tm_clone.sh: Executed "/usr/bin/scp
prakhar-desktop:/var/lib/one//images/32e8224dac203aa2874167c7b180f666c1c77da2
192.168.145.71:/var/lib/one//48/images/disk.0".
Mon Dec 20 15:24:46 2010 [TM][I]: tm_clone.sh: Executed "/usr/bin/ssh
192.168.145.71 chmod a+rw /var/lib/one//48/images/disk.0".
Mon Dec 20 15:24:47 2010 [TM][I]: tm_mkswap.sh: Creating 1024Mb image in
/var/lib/one//48/images/disk.1
Mon Dec 20 15:24:47 2010 [TM][I]: tm_mkswap.sh: Executed "/usr/bin/ssh
192.168.145.71 mkdir -p /var/lib/one//48/images".
Mon Dec 20 15:24:47 2010 [TM][I]: tm_mkswap.sh: Executed "/usr/bin/ssh
192.168.145.71 /bin/dd if=/dev/zero of=/var/lib/one//48/images/disk.1 bs=1
count=1 seek=1024M".
Mon Dec 20 15:24:47 2010 [TM][I]: tm_mkswap.sh: Initializing swap space
Mon Dec 20 15:24:47 2010 [TM][I]: tm_mkswap.sh: Executed "/usr/bin/ssh
192.168.145.71 /sbin/mkswap /var/lib/one//48/images/disk.1".
Mon Dec 20 15:24:47 2010 [TM][I]: tm_mkswap.sh: Executed "/usr/bin/ssh
192.168.145.71 chmod a+w /var/lib/one//48/images/disk.1".
Mon Dec 20 15:24:48 2010 [TM][I]: tm_context.sh: Executed "mkdir -p
/var/lib/one/b18484d61cd76a74c80d8576ecc7a1d5/isofiles".
Mon Dec 20 15:24:48 2010 [TM][I]: tm_context.sh: Executed "cp -R
/var/lib/one/48/context.sh
/var/lib/one/b18484d61cd76a74c80d8576ecc7a1d5/isofiles".
Mon Dec 20 15:24:48 2010 [TM][I]: tm_context.sh: Executed "cp -R
/home/prakhar/cloud/context/init.sh
/var/lib/one/b18484d61cd76a74c80d8576ecc7a1d5/isofiles".
Mon Dec 20 15:24:48 2010 [TM][I]: tm_context.sh: Executed "cp -R
/home/prakhar/cloud/context/init.sh
/var/lib/one/b18484d61cd76a74c80d8576ecc7a1d5/isofiles".
Mon Dec 20 15:24:48 2010 [TM][I]: tm_context.sh: Executed "cp -R
/root/.ssh/id_dsa.pub
/var/lib/one/b18484d61cd76a74c80d8576ecc7a1d5/isofiles".
Mon Dec 20 15:24:48 2010 [TM][I]: tm_context.sh: Executed "/usr/bin/mkisofs
-o /var/lib/one/b18484d61cd76a74c80d8576ecc7a1d5/disk.2 -J -R
/var/lib/one/b18484d61cd76a74c80d8576ecc7a1d5/isofiles".
Mon Dec 20 15:24:48 2010 [TM][I]: tm_context.sh: Executed "/usr/bin/scp
/var/lib/one/b18484d61cd76a74c80d8576ecc7a1d5/disk.2 192.168.145.71:
/var/lib/one//48/images/disk.2".
Mon Dec 20 15:24:48 2010 [TM][I]: tm_context.sh: Executed "rm -rf
/var/lib/one/b18484d61cd76a74c80d8576ecc7a1d5".
Mon Dec 20 15:24:48 2010 [LCM][I]: New VM state is BOOT
Mon Dec 20 15:24:48 2010 [VMM][I]: Generating deployment file:
/var/lib/one/48/deployment.0
Mon Dec 20 15:26:36 2010 [VMM][I]: Command execution fail: 'if [ -x
"/var/tmp/one/vmm/xen/deploy" ]; then /var/tmp/one/vmm/xen/deploy
/var/lib/one//48/images/deployment.0; else                              exit
42; fi'
Mon Dec 20 15:26:36 2010 [VMM][I]: STDERR follows.
Mon Dec 20 15:26:36 2010 [VMM][I]: Error: Device 51744 (tap) could not be
connected. Hotplug scripts not working.
Mon Dec 20 15:26:36 2010 [VMM][I]: ExitCode: 1
Mon Dec 20 15:26:36 2010 [VMM][E]: Error deploying virtual machine: Error:
Device 51744 (tap) could not be connected. Hotplug scripts not working.
Mon Dec 20 15:26:36 2010 [DiM][I]: New VM state is FAILED
Mon Dec 20 15:26:37 2010 [TM][W]: Ignored: LOG - 48 tm_delete.sh: Deleting
/var/lib/one//48/images

-----------------------------------------------------------------------------------------------------------------------------------------------------------
The deployment file is created as follows (Managed to copy it before it was
deleted)
------------------------------------------------------------------------
name = 'one-48'
#O CPU_CREDITS = 256
memory  = '256'
vcpus  = '1'
kernel = '/home/cloud/vm2/vmlinuz-2.6.27.21-0.1-xen'
ramdisk = '/home/cloud/vm2/initrd-2.6.27.21-0.1-xen'
root = '/dev/xvda'
extra = 'xencons=tty'
disk = [
    'file:/var/lib/one//48/images/disk.0,xvda,w',
    'file:/var/lib/one//48/images/disk.1,xvdd,w',
    'tap:aio:/var/lib/one//48/images/disk.2,xvdc,r',
]
vif = [
    ' mac=02:00:c0:a8:91:44,ip=192.168.145.68,bridge=eth0',
]
------------------------------------------------------------------------------------------
I have only used the file: driver . With :tap:aio, I get the above error.
Please advice.

On Thu, Dec 16, 2010 at 6:35 PM, <Daniel.MOLDOVAN at cs.utcluj.ro> wrote:

> I had the same problem with the IP assignment.
>
> Contextualization  must be used in order to be able to assign the desired
> IP to the virtual machine. The contextualization script reads the MAC of
> the VM(opennebula assigns the MAC you have specified) and based on the MAC
> fields it assigns an IP. The script must be places inside your virtual
> machine.
>
> Look at http://www.opennebula.org/documentation:rel2.2:cong and
> http://www.opennebula.org/documentation:rel2.0:vmg to
>
> Regards,
> Daniel
>
> În Joi, Decembrie 16, 2010 2:35 pm, Prakhar Srivastava a scris:
> > Hi,
> > I am trying to install a opennebula cloud. I have one front end with
> > ubuntu installed. I have successfully installed opennebula. I am able to
> > run instances but cannot access them using the IP given in the network
> > template file.. Following is my VM template file.
> >
> > NAME   = test-vm
> > MEMORY = 256
> > CPU    = 1
> >
> >
> > OS = [ KERNEL     = "/boot/vmlinuz-2.6.32-5-xen-amd64",
> > INITRD     = "/boot/initrd.img-2.6.32-5-xen-amd64",
> > ROOT       = "/dev/xvda",
> > KERNEL_CMD = "ro xencons=tty console=tty1"]
> >
> >
> > # OS image, mapped to sda.
> > DISK = [ IMAGE      = "Debian Lenny",
> > TARGET     = "xvda",
> > DRIVER     = "file:",
> > READONLY   = "no" ]
> >
> >
> > # First DATABLOCK image, mapped to sde
> > #DISK = [ IMAGE     = "Debian" ]
> >
> >
> > # Second DATABLOCK image, mapped to sdf
> > #DISK = [ IMAGE     = "Experiment scripts" ]
> >
> >
> > # swap, sdd
> > DISK = [ TYPE     = swap,
> > SIZE     = 1024,
> > TARGET   = "sdb",
> > READONLY = "no",
> > DRIVER   = "file:" ]
> >
> >
> > #DISK = [ TYPE   = fs,
> > #         SIZE   = 4096,
> > #         FORMAT = ext3,
> > #         SAVE   = yes,
> > #         TARGET = sdg ]
> >
> >
> > NIC=[NETWORK="Public1"]
> >
> >
> > --------------------------------------------------------------
> > The network file is as follows
> > NAME = "Public1"
> > TYPE = FIXED
> >
> >
> > BRIDGE = eth0
> >
> >
> > LEASES = [IP=192.168.145.68]
> >
> >
> > ---------------------------------------------------------------
> > In opennebula , there is no option for specifying gateway, broadcast,
> > netmask and dns server. How these values are communicated to the instance
> > at boot time. I would like to know how networking is managed by
> opennebula
> >  front-end.
> >
> > Prakhar
> > _______________________________________________
> > 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/20101220/3457f1df/attachment-0003.htm>


More information about the Users mailing list