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

張德勤 cinmex91047 at gmail.com
Thu Mar 8 00:44:49 PST 2012


Hello ,
Thank for Olivier's reply.
Yes, I saw this error message and I create a cloud folder for it.
And then sudo chown -R oneadmin:oneamdin /srv/cloud/ on my client1.
then create an other VM.
But the other error is happened.  :(

Thu Mar  8 16:38:02 2012 [DiM][I]: New VM state is ACTIVE.
Thu Mar  8 16:38:02 2012 [LCM][I]: New VM state is PROLOG.
Thu Mar  8 16:38:02 2012 [VM][I]: Virtual Machine has no context
Thu Mar  8 16:38:02 2012 [TM][I]: tm_ln.sh: Creating directory
/srv/cloud/one/var//7/images
Thu Mar  8 16:38:02 2012 [TM][I]: tm_ln.sh: Executed "mkdir -p
/srv/cloud/one/var//7/images".
Thu Mar  8 16:38:02 2012 [TM][I]: tm_ln.sh: Executed "chmod a+w
/srv/cloud/one/var//7/images".
Thu Mar  8 16:38:02 2012 [TM][I]: tm_ln.sh: Link
/srv/cloud/one/cinmex1/cinmex1.img
Thu Mar  8 16:38:02 2012 [TM][I]: tm_ln.sh: Executed "ln -s
/srv/cloud/one/cinmex1/cinmex1.img /srv/cloud/one/var//7/images/disk.0".
Thu Mar  8 16:38:02 2012 [TM][I]: ExitCode: 0
Thu Mar  8 16:38:02 2012 [TM][D]: tm_mkswap.sh: Creating directory
/srv/cloud/one/var//7/images
Thu Mar  8 16:38:02 2012 [TM][I]: tm_mkswap.sh: Executed "mkdir -p
/srv/cloud/one/var//7/images".
Thu Mar  8 16:38:02 2012 [TM][I]: tm_mkswap.sh: Executed "chmod a+w
/srv/cloud/one/var//7/images".
Thu Mar  8 16:38:02 2012 [TM][D]: tm_mkswap.sh: Creating 128Mb image in
/srv/cloud/one/var//7/images/disk.1
Thu Mar  8 16:38:02 2012 [TM][I]: tm_mkswap.sh: Executed "dd if=/dev/zero
of=/srv/cloud/one/var//7/images/disk.1 bs=1 count=1 seek=128M".
Thu Mar  8 16:38:02 2012 [TM][D]: tm_mkswap.sh: Initializing swap space
Thu Mar  8 16:38:02 2012 [TM][I]: tm_mkswap.sh: Executed "mkswap
/srv/cloud/one/var//7/images/disk.1".
Thu Mar  8 16:38:02 2012 [TM][I]: tm_mkswap.sh: Executed "chmod a+w
/srv/cloud/one/var//7/images/disk.1".
Thu Mar  8 16:38:02 2012 [TM][I]: ExitCode: 0
Thu Mar  8 16:38:02 2012 [LCM][I]: New VM state is BOOT
Thu Mar  8 16:38:02 2012 [VMM][I]: Generating deployment file:
/srv/cloud/one/var/7/deployment.0
Thu Mar  8 16:38:05 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//7/images/deployment.0 client1 7 client1; else
                   exit 42; fi'
Thu Mar  8 16:38:05 2012 [VMM][I]: Error: Device 2050 (tap) could not be
connected. /srv/cloud/one/var//7/images/disk.0 does not exist
Thu Mar  8 16:38:05 2012 [VMM][E]: Unable
Thu Mar  8 16:38:05 2012 [VMM][I]: ExitCode: 1
Thu Mar  8 16:38:05 2012 [VMM][E]: Error deploying virtual machine: Unable
Thu Mar  8 16:38:05 2012 [DiM][I]: New VM state is FAILED


My question is where to find the disk.0??
My images folder only has deployment.0 file....
And the deployment.0's content is following
########deployment.0##########
name = 'one-7'
#O CPU_CREDITS = 256
memory  = '512'
kernel = '/boot/vmlinuz-2.6.32.56-1.el6xen.x86_64'
ramdisk = '/boot/initrd-2.6.32.56-1.el6xen.x86_64kdump.img'
root = '/dev/sda2'
disk = [
    'tap:aio:/srv/cloud/one/var//7/images/disk.0,sda2,w',
    'tap:aio:/srv/cloud/one/var//7/images/disk.1,sda1,w',
]
vif = [
    ' mac=00:16:01:01:01:01,ip=140.115.155.181',
]
#################END################
[oneadmin at client1 images]$ pwd
/srv/cloud/one/var/7/images
[oneadmin at client1 images]$ ls
deployment.0

Thank for your replpy!!!

2012/3/8 Olivier Sallou <olivier.sallou at irisa.fr>

>  I see you have the error:
>
> Thu Mar  8 01:01:33 2012 [VMM][I]: mkdir: cannot create directory
> `/srv/cloud': Permission denied
>
> seems that oneadmin user does not have correct access rights to this dir
> on remote server
>
> Le 3/8/12 8:19 AM, ˆµÂÇÚ a ¨¦crit :
>
> 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<%2B886-3-4227151%20%2357968>
>> 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
>
>
> _______________________________________________
> Users mailing listUsers at lists.opennebula.orghttp://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>
> --
> Olivier Sallou
> IRISA / University of Rennes 1
> Campus de Beaulieu, 35000 RENNES - FRANCE
> Tel: 02.99.84.71.95
>
> gpg key id: 4096R/326D8438  (keyring.debian.org)
> Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438
>
>
>


-- 
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/6cba578d/attachment-0003.htm>


More information about the Users mailing list