[one-users] VM config template

knawnd at gmail.com knawnd at gmail.com
Wed Mar 30 09:03:53 PDT 2011


Ruben S. Montero wrote on 28/03/11 02:17:
> It seem's so.... (you will have to use xml format for the driver,
as far as I understand in order to user xml format for the driver it 
needs to be specified in oned.conf. I did it as below:
#-------------------------------------------------------------------------------
#  OpenVZ Virtualization Driver Manager Configuration
#-------------------------------------------------------------------------------
VM_MAD = [
     name  = "vmm_ovz",
     executable = "one_vmm_ssh",
     arguments  = "ovz",
     type  = "xml" ]
#-------------------------------------------------------------------------------


what else is needed on ONE node to be modified to get raw xml file which 
will be sent to remote host?
Right now if I am trying to create VM from file with its description as 
below:

======================================================
ONBOOT="yes"

# UBC parameters (in form of barrier:limit)
MEMORY  = [ KMEMSIZE="14372700:14790164", LOCKEDPAGES="2048:2048", 
PRIVVMPAGES="65536:69632", SHMPAGES="21504:21504", 
PHYSPAGES="0:unlimited", VMGUARPAGES="33792:unlimited", 
OOMGUARPAGES="26112:unlimited" ]

CPU = [ CPUUNITS="1000", CPUS="1" ]

# the disk can be specified as image but it's name has to be similar 
openvz template file name (see example below)
DISK = [ IMAGE  = "centos-5-x86" ]

# Disk quota parameters (in form of softlimit:hardlimit)
DISK  = [ TYPE = "os", DISKSPACE="1048576:1153024", 
DISKINODES="200000:220000", QUOTATIME="0" ]

# swap can be specified as below
DISK = [ TYPE  = swap, SIZE = 1024, READONLY = "no" ]

=====================================================
I get the following error:
$ oneimage list
   ID     USER                 NAME TYPE              REGTIME PUB PER 
STAT  #VMS
    0 oneadmin                 SL55   OS   Mar 29, 2011 14:07 Yes  No  
rdy     0
    1 oneadmin         centos-5-x86   OS   Mar 30, 2011 15:21 Yes  No 
used     1

$ onevm create test_ovz_vm.tmpl

$ onevm show 4
VIRTUAL MACHINE 4 INFORMATION
ID             : 4
NAME           : one-4
STATE          : FAILED
LCM_STATE      : LCM_INIT
START TIME     : 03/30 19:22:10
END TIME       : 03/30 19:22:38
DEPLOY ID:     : -

VIRTUAL MACHINE MONITORING
NET_RX         : 0
USED MEMORY    : 0
USED CPU       : 0
NET_TX         : 0

VIRTUAL MACHINE TEMPLATE
CPU=[
   CPUS=1,
   CPUUNITS=1000 ]
DISK=[
   CLONE=YES,
   DISK_ID=0,
   IMAGE=centos-5-x86,
   IMAGE_ID=1,
   READONLY=NO,
   SAVE=NO,
   
SOURCE=/srv/cloud/one/one-2.2.0/var//images/70f38bbaf574eef06b8e3ca4e8ebee3eb1f1786d,
   TARGET=sda,
   TYPE=DISK ]
DISK=[
   DISKINODES=200000:220000,
   DISKSPACE=1048576:1153024,
   DISK_ID=1,
   QUOTATIME=0,
   TYPE=os ]
DISK=[
   DISK_ID=2,
   READONLY=no,
   SIZE=1024,
   TARGET=sdd,
   TYPE=swap ]
MEMORY=[
   KMEMSIZE=14372700:14790164,
   LOCKEDPAGES=2048:2048,
   OOMGUARPAGES=26112:unlimited,
   PHYSPAGES=0:unlimited,
   PRIVVMPAGES=65536:69632,
   SHMPAGES=21504:21504,
   VMGUARPAGES=33792:unlimited ]
NAME=one-4
ONBOOT=yes
VMID=4

$ONE_LOCATION/var/4/vm.log:
Wed Mar 30 19:34:16 2011 [DiM][I]: New VM state is ACTIVE.
Wed Mar 30 19:34:16 2011 [LCM][I]: New VM state is PROLOG.
Wed Mar 30 19:34:16 2011 [TM][E]: prolog, undefined source disk image in 
VM template
Wed Mar 30 19:34:16 2011 [DiM][I]: New VM state is FAILED
Wed Mar 30 19:34:16 2011 [TM][W]: Ignored: LOG - 4 tm_delete.sh: 
Deleting /vz/one/vm/4/images

Wed Mar 30 19:34:16 2011 [TM][W]: Ignored: LOG - 4 tm_delete.sh: 
Executed "/usr/bin/ssh node10 rm -rf /vz/one/vm/4/images".

Wed Mar 30 19:34:16 2011 [TM][W]: Ignored: TRANSFER SUCCESS 4 -

It looks like TM driver ( in my case it is ssh TM) is trying to perform 
some VM template checking against source disk image and fails. What 
needs to be fixed?

>   it
> does not make any check and delegates all template processing to the
> vmm driver...)
What vmm driver did you mean saying "vmm driver"? Is it something 
similar to src/vmm/XenDriver.cc  (e.g. src/vmm/OvzDriver.cc)?
The raw xml config should be passed to remote host where the appropriate 
deployment script (e.g. $SCRIPTS_REMOTE_DIR/vmm/ovz/deploy) is invoked, 
shouldn't it?
Or there is an intermediate step(s) before VM deployment config been 
transfered to remote host but after 'onevm create <vm_template>'?

Thanks!
Nikolay.



More information about the Users mailing list