ctys-conf-change-vm

February, 2010



.

NAME

ctys-conf-change-vm - Configuration and change of VMs


General

This document describes the automated change and configuration mainly provided by ctys-createConfVM(1). This tool is used for ctys-cloneVM(1) too in order to set new unique values for a cloned VM.

Initial Configuration

The basic configuration could be proceeded in two basic variants:

  1. QEMU/KVM, Xen
    The complete configuration could be proceeded by the utility ctys-createConfVM. The GuestOS has to be setup by common procedures in a second step.

  2. VBOX, VMW
    The VM has to be setup by the native OEM tools and could be registered for ctys by post creation of configuration files and collecting these into the registry. The GuestOS has to be setup by common procedures in a second step.

The following call creates a dummy VM with a small dummy-image.

  
  MAC=00:11:22:33:44:55 \
  IP=12.12.12.12 \
  TCP=gecko \
  HDDBOOTIMAGE_INST_SIZE=128M \
  HDDBOOTIMAGE_INST_BLOCKSIZE=32M \
  HDDBOOTIMAGE_INST_BLOCKCOUNT=4 \
  ctys-createConfVM \
    -t XEN \
    --label=tst02 \
    --auto-all \
    --create-image
  

The same call could be used in a trace-only-mode by usage of the '--levo' option.

  
  MAC=00:11:22:33:44:55 \
  IP=12.12.12.12 \
  TCP=gecko \
  HDDBOOTIMAGE_INST_SIZE=128M \
  HDDBOOTIMAGE_INST_BLOCKSIZE=32M \
  HDDBOOTIMAGE_INST_BLOCKCOUNT=4 \
  ctys-createConfVM \
    -t XEN \
    --label=tst02 \
    --auto-all \
    --create-image
    --levo
  

Post-Modification

A present VM could be altered by a recall of the ctys-createConfVM utility. For application and modification of present parameters a defaults file could be generated. This contains all variables as required by ctys-createConfVM for the creation of a similar VM. Just some dynamic IDs, such as the serial number and creation time are altered.

The following call of ctys-createConfVM(1) creates the defaults file, which is used for pre-assignment of values from the source machine for the cloned machine. Some basic machine related IDs are required to be altered by command line assignment.

  
  MAC=00:11:22:33:44:55 \
  ctys-createConfVM \
    -t XEN \
    --label=tst02 \
    --defaults-file-create \
    --auto-all \
    --no-create-image \
    --no-save-para-kernel
  

In the previous case the MAC address is altered only, but any installation parameter could be varied.

The following calls could be applied to attribute value assignments and the creation of new.

List XEN configuration file:

  ctys-attribute --list tst02clone.conf

List CTYS configuration file:

  ctys-attribute --list tst02clone.ctys

Replace all values of an attribute in XEN configuration file:

  ctys-attribute \
    --attribute-name='kernelbase' \
    --attribute-replace=ALL  \
    --attribute-value-new="'/nboot1'"  \
    tst02clone.conf

Replace string in all values of an attribute in XEN configuration file:

  ctys-attribute \
    --attribute-name='kernelbase' \
    --attribute-replace=ALL \
    --attribute-value-new="'/nboot1'" \
    --attribute-value-old="'/boot'" \
    tst02clone.conf

Replace string in FIRST value of an attribute in XEN configuration file:

  ctys-attribute \
    --attribute-name='kernelbase' \
    --attribute-replace=FIRST \
    --attribute-value-new="'/nboot1'" \
    --attribute-value-old="'/boot'" \
    tst02clone.conf

Replace string in LAST value of an attribute in XEN configuration file:

  ctys-attribute \
    --attribute-name='kernelbase' \
    --attribute-replace=FIRST \
    --attribute-value-new="'/nboot1'" \
    --attribute-value-old="'/boot'" \
    tst02clone.conf

Replace string in 2. value of an attribute in CTYS configuration file:

  ctys-attribute \
    --attribute-name='kernelbase' \
    --attribute-replace=FIRST \
    --attribute-value-new="'/nboot1'" \
    --attribute-value-old="'/boot'" \
    tst02clone.conf

Replace all values of an attribute in CTYS configuration file:

  ctys-attribute \
    --attribute-name='WRAPPERCALL' \
    --attribute-replace=ALL  \
    --attribute-value-new="'123'"  \
    tst02clone.ctys

Create new attribute value assignment in CTYS configuration file:

  ctys-attribute \
    --attribute-create=TOP \
    --attribute-name='NEWATTR' \
    --attribute-value-new="'123'"  \
    tst02clone.ctys

Create new attribute value assignment in CTYS configuration file:

  ctys-attribute \
    --attribute-create=BOTTOM \
    --attribute-name='NEWATTR' \
    --attribute-value-new="'123'"  \
    tst02clone.ctys

Create new attribute value assignment in CTYS configuration file:

  ctys-attribute \
    --attribute-create=15 \
    --attribute-name='NEWATTR' \
    --attribute-value-new="'123'"  \
    tst02clone.ctys

Delete first occurance of an attribute in CTYS configuration file:

  ctys-attribute \
    --attribute-delete \
    --attribute-name='NEWATTR' \
    tst02clone.ctys

or

  ctys-attribute \
    --attribute-delete=1 \
    --attribute-name='NEWATTR' \
    tst02clone.ctys

Delete ALL occurances of an attribute in CTYS configuration file:

  ctys-attribute \
    --attribute-delete=ALL \
    --attribute-name='NEWATTR' \
    tst02clone.ctys




SEE ALSO

UserManual , CommandReference , HowTo

ctys-attribute(1) , ctys-cloneVM(1) , ctys-convertVM(1) , ctys-createConfVM(1)




AUTHOR

Written and maintained by Arno-Can Uestuensoez:

Maintenance: <<acue_sf1 (a) users sourceforge net>>
Homepage: <https://arnocan.wordpress.com>
Sourceforge.net: <http://sourceforge.net/projects/ctys>
Project moved from Berlios.de to OSDN.net: <https://osdn.net/projects/ctys>
Commercial: <https://arnocan.wordpress.com>




COPYRIGHT

Copyright (C) 2008, 2009, 2010, 2011 Ingenieurbuero Arno-Can Uestuensoez

For BASE package following licenses apply,

This document is part of the DOC package,

For additional information refer to enclosed Releasenotes and License files.