Hi,<br><br>If you are working with XEN, values in parameters "root" and "target" have to start with "xvd".<br>To make it work, before creating VM in OpenNebula, a file /etc/fstab on a source image has to be configured.<br>
I enclose a VM template.<br><br>Regards,<br>£ukasz<br><br><br>NAME = debian<br><br>CPU = 1<br>MEMORY = 512<br><br># --- kernel & boot device ---<br><br>OS = [<br> kernel = "/boot/vmlinuz-2.6.32-5-xen-amd64",<br>
<div id=":yg"> initrd = "/boot/initrd.img-2.6.32-5-xen-amd64",<br>
root = "xvda2" ]<br><br>DISK = [<br> source = "/var/lib/one/50/images/disk.0",<br> target = "xvda2",<br> readonly = "no" ]<br><br>DISK = [<br> type = swap,<br> size = 1024,<br>
readonly = "no",<br> target = "xvda1" ]<br><br>NIC=[network="private"]</div><div id=":zr">
<br></div><br>CONTEXT = [<br> hostname="$NAME",<br> ip_private="$NIC[IP, NETWORK=\"private\"]",<br> username=oneadmin,<br> target="xvdb",<br> files="/srv/cloud/vm_contextualization/id_rsa.pub /srv/cloud/vm_contextualization/init.sh" ]<br>
<br><br><br><br><br><div class="gmail_quote">2011/4/26 false <span dir="ltr"><<a href="mailto:shixing.yan@yahoo.com.cn">shixing.yan@yahoo.com.cn</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top"><div>Has anyone ever created a VM in opennebula? I tried millions of times, but allways in vain. I suppose it is the problem of my templates. </div>
<div>Here is my vm template:</div>
<div> </div>
<div>######### ######the start of the template#####################</div>
<div>CPU = 1<br>MEMORY = 128</div>
<div>DISK = [<br> source = "/home/xen/domains/xen1/disk.img", # this is the file system disk image</div>
<div> target = "sda" ]</div>
<div><br>OS = [<br> KERNEL = "/home/srv/cloud/template/vm/vmlinuz.img",<br> INITRD = "/home/srv/cloud/template/vm/initrd.img" ]</div>
<div> </div>
<div>NIC = [NETWORK = "private lan" ]</div>
<div> </div>
<div>CONTEXT = [<br> HOSTNAME = "$NAME",<br> IP_PUBLIC = "$NIC[IP, NETWORK=\"private lan\"]",<br> USERNAME = "$NAME",<br> FILE = "/home/srv/cloud/template/vm/init.sh",<br>
target = sdb ]<br>######### ######the end of the template##############</div>
<div> </div>
<div>in the NIC section, I connect this vm to a network named "private lan", which is registered with a net template, below is the details of this net template:</div>
<div> </div>
<div>######### ######the start of the net template##############</div>
<div>NAME = "private lan"<br>TYPE = FIXED<br>PUBLIC = NO<br>BRIDGE = eth0 #the bridge is created by xen<br>LEASES = [IP=10.214.0.250]<br>LEASES = [IP=10.214.0.251]<br>LEASES = [IP=10.214.0.252]<br>LEASES = [IP=10.214.0.253]<br>
LEASES = [IP=10.214.0.254]<br>######### ######the end of the net template##############</div>
<div> </div>
<div>I create a VM using the "onevm create" command, and it finally turns out that the new VM is in running state</div>
<div><a href="mailto:root@ccnt:/home/srv/cloud/template/vm" target="_blank">root@ccnt:/home/srv/cloud/template/vm</a># onevm list</div>
<div> ID USER NAME STAT CPU MEM HOSTNAME TIME<br> 42 cloud one-42 <font color="#ff0000">runn</font> 0 0K cloud55 00 00:01:14</div>
<div> </div>
<div>and we can see this VM(one-42) with "xm list" command as well</div>
<div><a href="mailto:root@ccnt:/home/srv/cloud/template/vm" target="_blank">root@ccnt:/home/srv/cloud/template/vm</a># xm list<br>Name ID Mem VCPUs State Time(s)<br>Domain-0 0 22676 16 r----- 11604.5<br>
one-42 30 128 1 -b---- 1.0<br></div>
<div>but when I use "xm console one-42" to login it, the screen pasts a hell lot of message, whitch contains some error message bellow:</div>
<div> </div>
<div>[ 0.168687] XENBUS: Device with no driver: device/vbd/2048<br>[ 0.168693] XENBUS: Device with no driver: device/vbd/2064<br>[ 0.168699] XENBUS: Device with no driver: device/vif/0<br>[ 0.168705] XENBUS: Device with no driver: device/console/0<br>
[ 0.168726] /build/buildd-linux-2.6_2.6.32-30-amd64-d4MbNM/linux-2.6-2.6.32/debian/build/source_amd64_none/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)<br>[ 0.168751] Initalizing network drop monitor service<br>
[ 0.168834] Freeing unused kernel memory: 592k freed<br>[ 0.169023] Write protecting the kernel read-only data: 4236k<br>[ 0.212211] udev[46]: starting version 164<br>[ 0.288008] Initialising Xen virtual ethernet driver.<br>
[ 5.396019] XENBUS: Waiting for devices to initialise:
295s...290s...285s...280s...275s...270s...265s...260s...255s...250s...245s...240s...235s...230s...225s...220s...215s...210s...205s...200s...195s...190s...185s...180s...175s...170s...165s...160s...155s...150s...145s...140s...135s...130s...125s...120s...115s...110s...105s...100s...95s...90s...85s...80s...75s...70s...65s...60s...55s...50s...45s...40s...35s...30s...25s...20s...15s...10s...5s...0s...<br>
[ 300.396162] XENBUS: Timeout connecting to device: device/vbd/2048 (local state 3, remote state 1)<br>[ 300.396255] XENBUS: Timeout connecting to device: device/vbd/2064 (local state 3, remote state 1)<br><br>It seems that we lack some device driver. Is it because I used the wrong format or wrong variables of VM template?</div>
<div>Who knows?</div>
<div> </div>
<div>Above all are my problems. I think it is because I didn't get the right template format.</div>
<div> </div>
<div>Who has ever created VM successfully? Can anybody share your templates here?</div></td></tr></tbody></table><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><br>