[one-users] Problems when booting VM (OpenNebula 2.0.1 and ESXi 4.1)
Luigi Fortunati
luigi.fortunati at gmail.com
Tue Feb 1 03:34:20 PST 2011
Hi,
During the last week I repeatedly banged my head against this problem, which
it seems I cannot solve on my own.
I'm actually trying to start a VM using opennebula 2.0.1 and a cluster node
hosting ESXi hypervisor 4.1 (Trial edition).
I think that most of the issues come from a lack of documentation about the
usage of these two tools together.
Here's an explanation of what i did till now:
I created the vmware image files (.vmdk, .vmx files and others) using
vSphere client by creating a new VM and then installing the OS, which in my
case is Ubuntu Server 10.4 i386.
After the OS intallation, I recovered the .vmdk and other files and put them
in a separate folder on the opennebula frontend. Then I created the image
template "ubuntu.img":
NAME = "Ubuntu Server"
DESCRIPTION = "Ubuntu Server 10.4 64bit"
I used the onevmware command to generate the image files for opennebula in
the image repo:
onevmware register --disk-vmdk Ubuntu\ Server\ 10.4\ i386.vmdk
--disk-flat Ubuntu\ Server\ 10.4\ i386-flat.vmdk ubuntu.img
I waited a while for openNebula to generate image files in the image repo
(srv/cloud/one/var/images folder) and then I set the image to persistent
mode (saves time during tests).
I created the vm template ubuntu.vm:
NAME = "Ubuntu Server"
VCPU = 1
MEMORY = 1024
OS = [ ARCH = "i686" ]
DISK = [IMAGE="Ubuntu Server"]
NIC = [NETWORK="Public LAN"]
the network "Public LAN" points to the default bridge for VMWare "VM
NETWORK":
$onevnet show 0
VIRTUAL NETWORK 0 INFORMATION
ID: : 0
UID: : 0
PUBLIC : N
VIRTUAL NETWORK TEMPLATE
BRIDGE=VM Network
NAME=Public LAN
NETWORK_ADDRESS=192.168.160.0
NETWORK_SIZE=C
TYPE=RANGED
After launching:
onevm create ubuntu.vm
I notice that OpenNebula generates a deployment.0 file and then hangs, the
vm remains in BOOT state and I cannot find any information about what's
happening by reading the logs.
I get these logs:
oned.conf:
Tue Feb 1 11:04:56 2011 [DiM][D]: Deploying VM 35
Tue Feb 1 11:04:56 2011 [TM][D]: Message received: LOG - 35 tm_ln.sh:
Creating directory /srv/cloud/one/var/35/images
Tue Feb 1 11:04:56 2011 [TM][D]: Message received: LOG - 35 tm_ln.sh:
Executed "mkdir -p /srv/cloud/one/var/35/images".
Tue Feb 1 11:04:56 2011 [TM][D]: Message received: LOG - 35 tm_ln.sh:
Executed "chmod a+w /srv/cloud/one/var/35/images".
Tue Feb 1 11:04:56 2011 [TM][D]: Message received: LOG - 35 tm_ln.sh: Link
/srv/cloud/one/var/images/6e437b6b686a00115997267786f981704913eed4
Tue Feb 1 11:04:56 2011 [TM][D]: Message received: LOG - 35 tm_ln.sh:
Executed "ln -s ../../images/6e437b6b686a00115997267786f981704913eed4
/srv/cloud/one/var/35/images/disk.0".
vm.log:
Tue Feb 1 11:04:56 2011 [DiM][I]: New VM state is ACTIVE.
Tue Feb 1 11:04:56 2011 [LCM][I]: New VM state is PROLOG.
Tue Feb 1 11:04:56 2011 [VM][I]: Virtual Machine has no context
Tue Feb 1 11:04:56 2011 [TM][I]: tm_ln.sh: Creating directory
/srv/cloud/one/var/35/images
Tue Feb 1 11:04:56 2011 [TM][I]: tm_ln.sh: Executed "mkdir -p
/srv/cloud/one/var/35/images".
Tue Feb 1 11:04:56 2011 [TM][I]: tm_ln.sh: Executed "chmod a+w
/srv/cloud/one/var/35/images".
Tue Feb 1 11:04:56 2011 [TM][I]: tm_ln.sh: Link
/srv/cloud/one/var/images/6e437b6b686a00115997267786f981704913eed4
Tue Feb 1 11:04:56 2011 [TM][I]: tm_ln.sh: Executed "ln -s
../../images/6e437b6b686a00115997267786f981704913eed4
/srv/cloud/one/var/35/images/disk.0".
Tue Feb 1 11:04:56 2011 [LCM][I]: New VM state is BOOT
Tue Feb 1 11:04:56 2011 [VMM][I]: Generating deployment file:
/srv/cloud/one/var/35/deployment.0
deployment.0:
<domain type='vmware'>
<name>one-35</name>
<vcpu>1</vcpu>
<memory>1048576</memory>
<os>
<type arch='i686'>hvm</type>
</os>
<devices>
<disk type='file' device='disk'>
<source file='[images] 35/images/disk.0/disk.vmdk'/>
<target dev='sda'/>
</disk>
<interface type='bridge'>
<source bridge='VM Network'/>
<mac address='02:00:c0:a8:a0:01'/>
</interface>
</devices>
</domain>
"onevm list" output:
oneadmin at custom2:~/var/35$ onevm list
ID USER NAME STAT CPU MEM HOSTNAME TIME
35 oneadmin Ubuntu S boot 0 0K custom6.sns.it 00 00:03:31
That should be all for the logs.
I think the problem is with the deployment.0 file, probably this file is not
complete.
I tried to produce an deploment xml file from the original vmx using the
instruction given here:
http://libvirt.org/drvesx.html
What i got is this:
<domain type='vmware'>
<name>Ubuntu Server 10.4 i386</name>
<uuid>564da5a4-d01e-279b-0f2d-b725311138b5</uuid>
<memory>524288</memory>
<currentMemory>524288</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686'>hvm</type>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<source file='[?] ?/Ubuntu Server 10.4 i386.vmdk'/>
<target dev='sda' bus='scsi'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<source file='[images] isos/ubuntu-10.04.1-server-i386.iso'/>
<target dev='hdc' bus='ide'/>
<address type='drive' controller='0' bus='1' unit='0'/>
</disk>
<controller type='scsi' index='0' model='lsilogic'/>
<controller type='ide' index='0'/>
<interface type='bridge'>
<mac address='00:0c:29:11:38:b5'/>
<source bridge='VM Network'/>
</interface>
</devices>
</domain>
I hope this helps because I'm really stuck with this problem. :-)
If you know some resources about the usage of vmware esxi 4.1 hypervisor and
opennebula please tell me, I think that the documentation on the opennebula
website is somehow incomplete on this part.
Thank you in advance
--
Luigi Fortunati
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20110201/35ca6902/attachment-0002.htm>
More information about the Users
mailing list