[one-users] Who has ever successfully created a VM with xen in opennebula?
Łukasz Grabowski
grabbs07 at gmail.com
Tue Apr 26 13:29:10 PDT 2011
Hi,
If you are working with XEN, values in parameters "root" and "target" have
to start with "xvd".
To make it work, before creating VM in OpenNebula, a file /etc/fstab on a
source image has to be configured.
I enclose a VM template.
Regards,
Łukasz
NAME = debian
CPU = 1
MEMORY = 512
# --- kernel & boot device ---
OS = [
kernel = "/boot/vmlinuz-2.6.32-5-xen-amd64",
initrd = "/boot/initrd.img-2.6.32-5-xen-amd64",
root = "xvda2" ]
DISK = [
source = "/var/lib/one/50/images/disk.0",
target = "xvda2",
readonly = "no" ]
DISK = [
type = swap,
size = 1024,
readonly = "no",
target = "xvda1" ]
NIC=[network="private"]
CONTEXT = [
hostname="$NAME",
ip_private="$NIC[IP, NETWORK=\"private\"]",
username=oneadmin,
target="xvdb",
files="/srv/cloud/vm_contextualization/id_rsa.pub
/srv/cloud/vm_contextualization/init.sh" ]
2011/4/26 false <shixing.yan at yahoo.com.cn>
> 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.
> Here is my vm template:
>
> ######### ######the start of the template#####################
> CPU = 1
> MEMORY = 128
> DISK = [
> source = "/home/xen/domains/xen1/disk.img", # this is the file
> system disk image
> target = "sda" ]
>
> OS = [
> KERNEL = "/home/srv/cloud/template/vm/vmlinuz.img",
> INITRD = "/home/srv/cloud/template/vm/initrd.img" ]
>
> NIC = [NETWORK = "private lan" ]
>
> CONTEXT = [
> HOSTNAME = "$NAME",
> IP_PUBLIC = "$NIC[IP, NETWORK=\"private lan\"]",
> USERNAME = "$NAME",
> FILE = "/home/srv/cloud/template/vm/init.sh",
> target = sdb ]
> ######### ######the end of the template##############
>
> 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:
>
> ######### ######the start of the net template##############
> NAME = "private lan"
> TYPE = FIXED
> PUBLIC = NO
> BRIDGE = eth0 #the bridge is created by xen
> LEASES = [IP=10.214.0.250]
> LEASES = [IP=10.214.0.251]
> LEASES = [IP=10.214.0.252]
> LEASES = [IP=10.214.0.253]
> LEASES = [IP=10.214.0.254]
> ######### ######the end of the net template##############
>
> I create a VM using the "onevm create" command, and it finally turns out
> that the new VM is in running state
> root at ccnt:/home/srv/cloud/template/vm# onevm list
> ID USER NAME STAT CPU MEM HOSTNAME TIME
> 42 cloud one-42 runn 0 0K cloud55 00
> 00:01:14
>
> and we can see this VM(one-42) with "xm list" command as well
> root at ccnt:/home/srv/cloud/template/vm# xm list
> Name ID Mem VCPUs State
> Time(s)
> Domain-0 0 22676 16 r-----
> 11604.5
> one-42 30 128 1 -b----
> 1.0
> 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:
>
> [ 0.168687] XENBUS: Device with no driver: device/vbd/2048
> [ 0.168693] XENBUS: Device with no driver: device/vbd/2064
> [ 0.168699] XENBUS: Device with no driver: device/vif/0
> [ 0.168705] XENBUS: Device with no driver: device/console/0
> [ 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)
> [ 0.168751] Initalizing network drop monitor service
> [ 0.168834] Freeing unused kernel memory: 592k freed
> [ 0.169023] Write protecting the kernel read-only data: 4236k
> [ 0.212211] udev[46]: starting version 164
> [ 0.288008] Initialising Xen virtual ethernet driver.
> [ 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...
> [ 300.396162] XENBUS: Timeout connecting to device: device/vbd/2048 (local
> state 3, remote state 1)
> [ 300.396255] XENBUS: Timeout connecting to device: device/vbd/2064 (local
> state 3, remote state 1)
>
> It seems that we lack some device driver. Is it because I used the wrong
> format or wrong variables of VM template?
> Who knows?
>
> Above all are my problems. I think it is because I didn't get the right
> template format.
>
> Who has ever created VM successfully? Can anybody share your templates
> here?
>
> _______________________________________________
> 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/20110426/9ee5b8f2/attachment-0003.htm>
More information about the Users
mailing list