[one-users] How to create a VM through my OpenNEbula?

張德勤 cinmex91047 at gmail.com
Wed Mar 7 23:19:19 PST 2012


Dear all:

My VM log file is following.
Please check

Thu Mar  8 01:01:32 2012 [DiM][I]: New VM state is ACTIVE.
Thu Mar  8 01:01:32 2012 [LCM][I]: New VM state is PROLOG.
Thu Mar  8 01:01:32 2012 [VM][I]: Virtual Machine has no context
Thu Mar  8 01:01:32 2012 [TM][I]: tm_ln.sh: Creating directory
/srv/cloud/one/var//6/images
Thu Mar  8 01:01:32 2012 [TM][I]: tm_ln.sh: Executed "mkdir -p
/srv/cloud/one/var//6/images".
Thu Mar  8 01:01:32 2012 [TM][I]: tm_ln.sh: Executed "chmod a+w
/srv/cloud/one/var//6/images".
Thu Mar  8 01:01:32 2012 [TM][I]: tm_ln.sh: Link
/srv/cloud/one/cinmex1/cinmex1.img
Thu Mar  8 01:01:32 2012 [TM][I]: tm_ln.sh: Executed "ln -s
/srv/cloud/one/cinmex1/cinmex1.img /srv/cloud/one/var//6/images/disk.0".
Thu Mar  8 01:01:32 2012 [TM][I]: ExitCode: 0
Thu Mar  8 01:01:32 2012 [TM][D]: tm_mkswap.sh: Creating directory
/srv/cloud/one/var//6/images
Thu Mar  8 01:01:32 2012 [TM][I]: tm_mkswap.sh: Executed "mkdir -p
/srv/cloud/one/var//6/images".
Thu Mar  8 01:01:32 2012 [TM][I]: tm_mkswap.sh: Executed "chmod a+w
/srv/cloud/one/var//6/images".
Thu Mar  8 01:01:32 2012 [TM][D]: tm_mkswap.sh: Creating 128Mb image in
/srv/cloud/one/var//6/images/disk.1
Thu Mar  8 01:01:32 2012 [TM][I]: tm_mkswap.sh: Executed "dd if=/dev/zero
of=/srv/cloud/one/var//6/images/disk.1 bs=1 count=1 seek=128M".
Thu Mar  8 01:01:32 2012 [TM][D]: tm_mkswap.sh: Initializing swap space
Thu Mar  8 01:01:32 2012 [TM][I]: tm_mkswap.sh: Executed "mkswap
/srv/cloud/one/var//6/images/disk.1".
Thu Mar  8 01:01:32 2012 [TM][I]: tm_mkswap.sh: Executed "chmod a+w
/srv/cloud/one/var//6/images/disk.1".
Thu Mar  8 01:01:32 2012 [TM][I]: ExitCode: 0
Thu Mar  8 01:01:32 2012 [LCM][I]: New VM state is BOOT
Thu Mar  8 01:01:32 2012 [VMM][I]: Generating deployment file:
/srv/cloud/one/var/6/deployment.0
Thu Mar  8 01:01:33 2012 [VMM][I]: Command execution fail: 'if [ -x
"/var/tmp/one/vmm/xen/deploy" ]; then /var/tmp/one/vmm/xen/deploy
/srv/cloud/one/var//6/images/deployment.0 client1 6 client1; else
                   exit 42; fi'
Thu Mar  8 01:01:33 2012 [VMM][I]: mkdir: cannot create directory
`/srv/cloud': Permission denied
Thu Mar  8 01:01:33 2012 [VMM][I]: /var/tmp/one/vmm/xen/deploy: line 34:
/srv/cloud/one/var//6/images/deployment.0: No such file or directory
Thu Mar  8 01:01:33 2012 [VMM][I]: Error: Unable to open config file:
/srv/cloud/one/var//6/images/deployment.0
Thu Mar  8 01:01:33 2012 [VMM][E]: Unable
Thu Mar  8 01:01:33 2012 [VMM][I]: ExitCode: 1
Thu Mar  8 01:01:33 2012 [VMM][E]: Error deploying virtual machine: Unable
Thu Mar  8 01:01:33 2012 [DiM][I]: New VM state is FAILED

How can I fix this?


張德勤 <cinmex91047 at gmail.com> 於 2012年3月8日上午1:21 寫道:

> Dear all:
>
> After I installed my ONE system.
> There are 2 machines in my system.
> one is Server : CentOS 6 + OpenNEbula
> the other one is client1 : CentOS 6 + Xen-kernel
>
> And now I want to locate a VM to Client1 through Server.
> Here are my steps.
> 1.  I refer this website to install my VM on client1.
>
> http://www.howtoforge.com/virtualization-with-xen-on-centos-6.2-x86_64-paravirtualization-and-hardware-virtualization-p2
>      After this step, I get cinmex1.img in my client1.
> 2.  I copy cinemx1.img to /srv/cloud/one/cinmex1 in my ONE server. And
> create a cinmex1.one file. The content is following.
>      NAME   = cinmex1
>      CPU    = 1
>      MEMORY = 512
>      OS = [ kernel     = /boot/vmlinuz-2.6.32.56-1.el6xen.x86_64,
>                  initrd     =
> /boot/initrd-2.6.32.56-1.el6xen.x86_64kdump.img,
>                  root       = sda2]
>      DISK = [ source   = /srv/cloud/one/cinmex1/cinmex1.img,
>                      clone    = no,
>                      target   = sda2,
>                      readonly = no]
>      DISK = [  type     = swap,
>                      size     = 128,
>                      target   = "sda1",
>                      readonly = "no" ]
>      NIC=[IP="XX.XX.XX.XX", MAC="00:16:01:01:01:01"]
>
> 3.  I command onevm create cinmex1.one, but the VM failed.  :(
>      [oneadmin at server cinmex1]$ onevm create cinmex1.one
>      ID: 6
>      [oneadmin at server cinmex1]$ onevm list
>       ID USER     GROUP    NAME         STAT CPU     MEM        HOSTNAME
>      TIME
>          6 oneadmin oneadmin cinmex1      fail   0      0K
> 00 00:00:02
>
> My question is how to set the cinmex1.one file??
> For example, what content should I set in the OS??
> My /boot/grub/menu.lst in client1 is here.
>
> default=0
> timeout=5
> splashimage=(hd0,0)/grub/splash.xpm.gz
> hiddenmenu
> title CentOS (2.6.32.56-1.el6xen.x86_64)
>         root (hd0,0)
>         kernel /xen.gz dom0_mem=1024M cpufreq=xen dom0_max_vcpus=4
> dom0_vcpus_pin
>         module /vmlinuz-2.6.32.56-1.el6xen.x86_64 ro
> root=/dev/mapper/vg_client1-lv_root rd_NO_LUKS LANG=en_US.UTF-8
> rd_LVM_LV=vg_client1/lv_root rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb
> crashkernel=128M rd_LVM_LV=vg_client1/lv_swap  KEYBOARDTYPE=pc KEYTABLE=us
> rd_NO_DM
>         module /initramfs-2.6.32.56-1.el6xen.x86_64.img
>
> Someone can help me??
>
>
>
> --
> Regards,
>
> Te - Chin, Chang (張德勤), +886-3-4227151 #57968
> Networklab, Computer Science & Information Engineering,
> National Central University, Jhongli, Taiwan, R.O.C
>



-- 
Regards,

Te - Chin, Chang (張德勤), +886-3-4227151 #57968
Networklab, Computer Science & Information Engineering,
National Central University, Jhongli, Taiwan, R.O.C
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120308/db4caa62/attachment-0003.htm>


More information about the Users mailing list