.
ctys-createConfVM - Creation and Configuration of VMs
ctys-createConfVM
[--auto-all] [--auto] [-C] [--create-image] [-d <debug-level>] [-D <directory>] [--defaults-file=<file-name>] [--defaults-file] [--defaults-file-create] [--defaults-file-create-with-force] [--expert] [-h] [-H <help-options>] ( --label=<label> | --label <label> ) [--list-env-var-options|--levo] [--no-create-image] [--no-create-conf-data] [--no-load-defaults-file] [--no-save-para-kernel] [--no-write-conf-files] [--save-para-kernel] -t <session-type> [-V] [-X]
ctys-createConfVM provides the initial creation of complete VMs for various
open source hypervisors.
For present VMs including several commercial products the post-creation of configuration
files and wrapper scripts is supported.
The whole process could be automated by pre-configured specific configuration defaults for
supported distributions.
This provides for simplified installation and creation of VMs with seamless integration into
the inventory management, automation facilities and interactive graphical frontends provided
by the UnifiedSessionsManager framework.
For duplication and conversion of present VMs the tools
ctys-cloneVM(1).
and
ctys-convertVM(1).
could be used.
The ctys-createConfVM could be either applied in the interactive dialogue mode, or by semi and full automatic batch processing based on pre-defined default values. Beneath the pure creation of the virtual machines the automation of the installation for the guest operating system is supported for various distributions. Therefore offline installation of final images as well as batch startups of guest systems by means of the installed operating system are supported. The emphasis for the current version in on opensource systems, but is going to be extended as a common generic wrapper including additional commercial products.
The current version provides the following support:
The installation of the guest OS varies due to the provided means by the guest OS and distribution. The following cases are available in the current version:
The following table shows a sumup of available install automation for the current version,
where k marks support by external kernel parameters - available for Linux - and g marks
the required configuration of the GuestOS, e.g. by boot of installers.
Hypervisor/Emulator | Configuration | VM | GuestOS |
---|---|---|---|
QEMU/KVM | x | x | k,g |
VBOX | x | g | |
VMW | x | g | |
VMWE - VMware ESX(TM) | |||
VMWEi - VMware ESXi(TM) | |||
XEN | x | x | k,g |
XENS - XenServer(TM) |
Installation Automation |
---|
Following install modes for automated install procedures could be utilized. |
- g: guest OS based |
- k: kernel based |
The available call options are partly set by the commandline options, but could the majority of the values are used by pre-assigned environment variables. The actuall available variables with their inital value could be listed by the option '--list-env-var-options' or for short '--levo', these are listen within the following chapter ENVIRONMENT. The Syntax for the call is
<VAR-NAME>=<VAR-VALUE> ctys-createConfVM ....
For example
ACCELERATOR=KVM \ DIST=Scientific \ RELEASE=5.4.1 \ OS=Linux \ OSVERSION=2.6.18 \ ctys-createConfVM -t qemu --label=tst213 --auto-all --no-create-image
The created files comprise a generic wrapper-script and a configuration file, where the wrapperscript
presents the generic facilities for application on all provided hypervisors.
These are partly adapted to the targeted hypervisor during creation and marked with a version string for
later compatibility validation.
The configuration script contains the specific variables and parameters for the wrapperscript.
Both files are also part of the overall ctys-framework as they implement the final stage of the actual
execution for the related plugin.
The execution of ctys-createConfVM could be performed either locally or on remote
The resulting configuration could be executed by the ctys-wrapper script either
by call of ctys - locally or remote - or ctys-wrapper CLI - locally, where both calls could be
transformed to remote relays/hosts by ctys-beamer.
Both files are inline documented bash syntax files - with additinal Python modules for Xen, implementing a medium level of configuration and workflow complexity and could be extended as required. The base call interface cosisting of the call parameters
is mandatory and therefore required to be present for proper ctys operations. The amount of supported values could be adapted as required and varied by the user. The following values are required to be implemented mandatory:
--bootmode=HDD --initonly --instmode=(CD|PXE) --console={VNC,CLI} --vncaccesdisplay=<#nr> --print --check
The wrapper script is used for internal startup calls, but could be used particularly for tests from the command line. The following options support the initial runtime setup:
--listoptions --print --check
Particularly the debugging option '-d printfinal' provides the display of the final call assembly of each system call for debugging purposes.
The WRAPPER-SCRIPT-OPTIONS are:
.
ctys-createConfVM
Forces all answers to be 'y', excluding mandatory parameters, which have
to be answered by a manual confirmation.
Forces all answers to be 'y', including mandatory parameters, which have
else to be answered by a manual confirmation.
Forces the creation of a directory when -D is selected
and the target directory is not yet present.
For safety reasons when operating on remote hosts, only one level
of subdirectories could be created, for multiple level
creation use "mkdir -p".
Same as ctys.
Directory for storage of created configuration files.
Use defaults file, name is '<LABEL>.defaults'.
User defaults file, name is as provided.
Create defaults file, for later usage, file name is as provided.
If no filename is given, the default name is '<LABEL>.defaults'
The file contains all configuration variables, where the values are
protected if already set.
Create defaults file, for later usage, file name is as provided.
If no filename is given, the default name is '<LABEL>.defaults'
The file contains all configuration variables, where the values overwrite
any previous value set before execution.
In this mode the values could only be altered by interactive dialogue.
Expert mode, which reduces the displayed text, and shows some additional technical details.
Print help, refer to "-H" for additional information.
The extended help option is based on system interfaces for display of manpages, PDF and HTML documents. This comprises the man pages and installed manuals.
For additional help refer to the documents or type ctys -H help.
The label - the name - for the VM to be created.
List of current options to be set by environment variables.
The values are the initially assigned static values, which partly are
completed at runtime dynamically.
The actually resulting options, including a list of all valid environment variables is displayed as
given in the following example figure. The '(h)' marked values sign the by default taken values from the host machine:
-bash-3.2$ ctys-createConfVM --label=testDisplay --levo Not all values require to be set, some will be requested later by dialogue. Thus it is not neccessary to have values assigned to the complete displayed set. Actually used sources for default values: no-marker = Pre-Set value, either from defaults configuration, or by commandline. no-value = Either requested by dialog later, or the defaults of the finally called application are used. (g) = Dynamically generated. (c) = Read from actual configuration file, e.g. vmx-file. (h) = Used from current host as default. Applicable modifications: blue = By call option, defines dependency for others. green = By environment, 'could be set almost independent' from other values. cyan = By miscellaneous facilities, but is dependent from others. E.g. LABEL defines by convention the network 'hostname', thus the TCP/IP params. This could ..., but should not be altered! Most of the missing values will be fetched during actual execution of this tool by dynamic evaluation. VAR name:Initial Value C_SESSIONTYPE:QEMU LABEL:testDisplay MAC: IP: BRIDGE: DHCP: NETMASK: TCP: GATEWAY: EDITOR:acue UUID:f58abb0f-f63b-4c46-aaf1-4421e1e21b43 (h) DIST:CentOS (h) DISTREL:5.4 (h) OS:Linux (h) OSREL:2.6.32.6-app2-003-kvm (h) ARCH:x86_64 (h) ACCELERATOR:QEMU SMP: MEMSIZE:512 KBD_LAYOUT:de STARTERCALL:/usr/libexec/qemu-kvm WRAPPERCALL: DEFAULTBOOTMODE:HDD DEFAULTINSTTARGET:/hda.img HDDBOOTIMAGE_INST_SIZE:8G HDDBOOTIMAGE_INST_BLOCKSIZE:256M HDDBOOTIMAGE_INST_BLOCKCOUNT:32 HDDBOOTIMAGE_INST_BALLOON:y DEFAULTINSTMODE:CD INSTSRCCDROM:/dev/cdrom DEFAULTINSTSOURCE:/dev/cdrom INST_KERNEL: INST_INITRD: VMSTATE:ACTIVE Remember that his is a draft pre-display of current defaults. No consistency-checks for provided values are performed at this stage. Some missing values are evaluated at a later stage dynamically. -bash-3.2$
Suppresses the automatic creation of a virtual file image for installation.
Suppresses the creation of configuration data.
This implies the suppression of the write of configuration data, therefore should be used
for the creation of defaults file only, which is processed by filtering an existing configuration file.
Suppresses the initialization by reading a present defaults file.
If not set a present file is sourced into the process by default.
Suppresses the automatic storage of runtime kernels when these are selected.
This is particularly frequently the case for paraviretualized DomU of Xen
and in some cases of QEMU.
Suppresses the storage of configuration data into files, thus no data including the wrapper files is
stored.
Forces the automatic storage of runtime kernels when these are selected.
This is particularly the case for HVM DomU of Xen, or for some OSs like CentOS,
where the where this is not neccessarily required.
The session type the VM has to be created for.
Currently
QEMU
(for QEMU and KVM on x86),
VMW
,
VBOX
, and
XEN
are supported.
Each defines a common set of parameters with additional specific variations.
Version.
Terse.
.
None.
.
In addition to the commandline arguments the following environment variables provided. These could be listed by the --levo option and set by the call pattern:
IP=111.111.111.111 ctys-createconfVM -t Xen --label=myXenPattern
The current available variables are listend within the following table.
VAR name | Description | Default |
---|---|---|
ACCELERATOR | Available accelerator module. | Host OS |
ARCH | Architecture for guest OS. | Current host. |
BRIDGE | Host bridge. | (config) |
C_SESSIONTYPE | As selected by -t. | -t |
DEFAULTBOOTMODE | Default boot mode. | VHDD |
DEFAULTCONSOLE | Default console. | config |
DEFAULTHOSTS | Default HOSTs for GuestOS. | config |
DEFAULTINSTMODE | Default install mode. | config |
DEFAULTINSTSOURCE | Default install source. | config |
DEFAULTINSTTARGET | Default install target. | config |
DHCP | Use of DHCP for GuestOS. | (config) |
DIST | Distribution of GuestOS. | Host OS. |
DISTREL | Dirtribution release of GuestOS | Host OS. |
EDITOR | Author of installation. | $USER |
GATEWAY | TCP gateway within GuestOS. | (config) |
HDDBOOTIMAGE_INST_BALLOON | Expand on demand. | config |
HDDBOOTIMAGE_INST_BLOCKCOUNT | Number of blocks. | config |
HDDBOOTIMAGE_INST_BLOCKSIZE | Size of chunks. | config |
HDDBOOTIMAGE_INST_SIZE | Sum of chunks. | config |
INST_INITRD | Installation initrd image. | config |
INST_KERNEL | Installation kernel. | config |
INSTSRCCDROM | installation ISO image/media. | config |
IP | IP address of GuestOS. | cacheDB |
KBD_LAYOUT | Keaypoard laout. | config |
LABEL | Name of VM, GuestOS hostname. | --label |
MAC | MAC address of VM. | cacheDB |
MEMSIZE | Assigned RAM. | config |
NETMASK | Netmask of GuestOS TCP address. | (config) |
OS | Operating system of GuestOS. | Host OS |
OSREL | Release of GuestOS. | Host OS |
SMP | Number of assigned CPU cores. | 1 |
STARTERCALL | Hypervisor start-caller. | local hypervisor |
TCP | cacheDB | |
UUID | UUID. | VM or dynamic |
VMSTATE | Inventory state. | ACTIVE |
WRAPPERCALL | System wrapper for hypervisor. | config |
.
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 (C) 2008, 2009, 2010, 2011 Ingenieurbuero Arno-Can Uestuensoez
This is software and documentation from BASE package,
For additional information refer to enclosed Releasenotes and License files.