Template
Name
hypercloud template - manages HyperCloud templates.
Synopsis
hypercloud template <command> [<args>] [<options>]
Options
--adjust x,y,z Adjust size to not truncate selected columns
--admin lock admin actions
--all lock all actions
-a, --append Append new attributes to the current template
--arch arch Architecture of the VM,
e.g.: i386 or x86_64
--as_gid gid The Group ID to instantiate the VM
--as_uid uid The User ID to instantiate the VM
--boot device_list Set boot device list
e.g. disk0,disk2,nic0
--context line1,line2,line3 Lines to add to the context section
--cpu cpu CPU percentage reserved for the VM (1=100% one
CPU)
--csv Write table in csv format
--csv-del del Set delimiter for csv output
-d, --delay x Sets the delay in seconds for top command
--describe Describe list columns
--disk image0,image1 Disks to attach.
To use an image owned by other user use user[disk].
Add any additional attributes separated by ':' and
in the shape of KEY=VALUE.
For example, if the disk must be resized, use image0:size=1000 .
Or, image0:size=1000:target=vda,image1:target=vdb
--dry Just print the template
--endpoint endpoint URL of HyperCloud xmlrpc frontend
--expand [x=prop,y=prop] Expands the columns size to fill the terminal.
For example: $hypercloud template list --expand
name=0.4,group=0.6 will expand name 40% and
group 60%.
$hypercloud template list --expand name,group will
expand name and group based on its size.
$hypercloud template list --expand will expand all columns.
--extended Process the template and included extended
information, such as the SIZE for each DISK
--files_ds file1,file2 Add files to the contextualization CD from
thefiles datastore
-f, --filter x,y,z Filter data. An array is specified with
column=value pairs.
Valid operators: =,!=,<,<=,>,>=,~
e.g. NAME=test (match name with test)
NAME~test (match every NAME containing the substring 'test')
-h, --help Show this message
--hold Creates the new VM on hold state instead of
pending
--init script1,script2 Script or scripts to start in context
-j, --json Show the resource in JSON format
-l, --list x,y,z Selects columns to display with list command
-c, --listconf conf Selects a predefined column list
--manage lock manage actions
--memory memory Memory amount given to the VM.
By default the unit is megabytes.
To use gigabytes add a 'g', floats can be used: 8g=8192, 0.5g=512
-m, --multiple x Instance multiple VMs
--name name Name of the new VM or TEMPLATE. When
instantiating multiple VMs you can use the "%i"
wildcard to produce different names such as
vm-0, vm-1...
--net_context Add network contextualization parameters
--nic network0,network1 Networks to attach. To use a network owned by
other user use user[network]. Additional
attributes are supported like with the --disk
option. Also you can use auto if you want that
HyperCloud select automatically the network
--no-expand Disable expand
--no-header Hides the header of the table
--no-pager Disable pagination
-n, --numeric Do not translate user and group IDs
--operator operator Logical operator used on filters: AND, OR.
Default: AND.
--password password Password to authenticate with HyperCloud
--persistent Creates a private persistent copy of the template
plus any image defined in DISK, and instantiates
that copy
--prefix prefix Prefix to autogenerate name, e.g: 001, 01
--raw string Raw string to add to the template. Not to be
confused with the RAW attribute
-R, --recursive Applies the action to the template plus any image
defined in DISK
--report_ready Sends READY=YES to OneGate, useful for OneFlow
-s, --size x=size,y=size Change the size of selected columns.
For example: $ hypercloud template list --size "name=20"
will make column name size 20.
--spice Add spice server to the VM
--spice-keymap keymap spice keyboard layout
--spice-listen ip spice IP where to listen for connections.
By default is 0.0.0.0 (all interfaces).
--spice-password password spice password
--ssh [file] Add an ssh public key to the context. If the file
is omited then the user variable SSH_PUBLIC_KEY
will be used.
--startscript [file] Start script to be executed
--use lock use actions
--user name User name used to connect to HyperCloud
--user-inputs ui1,ui2,ui3 Specify the user inputs values when instantiating
--userdata userdata Integrate userdata into the EC2 section
--vcenter_vm_folder path In a vCenter environment sets the the VMs and
Template folder where the VM will be placed in.
The path uses slashes to separate folders.
For example: --vcenter_vm_folder "/Management/VMs"
--vcpu vcpu Number of virtualized CPUs
-v, --verbose Verbose mode
-V, --version Show version and copyright information
--vnc Add VNC server to the VM
--vnc-keymap keymap VNC keyboard layout
--vnc-listen ip VNC IP where to listen for connections.
By default is 0.0.0.0 (all interfaces).
--vnc-password password VNC password
-x, --xml Show the resource in xml format
-y, --yaml Show the resource in YAML format
Commands
-
chgrp <range|templateid_list> <groupid>Changes the Template group. -
chmod <range|templateid_list> <octet>Changes the Template permissions- Valid options:
recursive
- Valid options:
-
chown <range|templateid_list> <userid> [<groupid>]Changes the Template owner and group. -
clone <templateid> <name>Creates a new Template from an existing one- Valid options:
recursive
- Valid options:
-
create [<file>]Creates a new VM Template from the given description.- Valid options:
archas_gidas_uidbootcontextcpudiskdryfiles_dsinitmemorynamenet_contextnicrawreport_readyspicespice_keymapspice_listenspice_passwordsshstartscriptuser_inputsvcenter_vm_foldervcpuvncvnc_keymapvnc_listenvnc_password
- Valid options:
Examples
- using a VM Template description file:
- new VM Template named
arch vmwith a disk and a NIC: - using two disks:
-
delete <range|templateid_list>Deletes the given Template.- Valid options:
recursive
- Valid options:
-
instantiate <templateid> [<file>]Creates a new VM instance from the given Template. This VM can be managed with the 'hypercloud template' command. The source Template can be modified by replacing existing attributes; or adding new DISK or NIC elements. The new attributes can be specified with the command options or the file argument.- Valid options:
archas_gidas_uidbootcontextcpudiskfiles_dsholdinitmemorymultiplenamenet_contextnicpersistentprefixrawreport_readyspicespice_keymapspice_listenspice_passwordsshstartscriptuser_inputsuserdatavcenter_vm_foldervcpuvncvnc_keymapvnc_listenvnc_password
- Valid options:
Examples
- Instantiate a template and add a new NIC
- Instantiate a template and replace CONTEXT with a new one
-
list [<filterflag>]Lists Templates in the pool.- Valid options:
adjustcsvcsv_deldelaydescribeexpandfilterjsonlistlistconfno_expandno_headerno_pagernumericoperatorsizexmlyaml
- Valid options:
-
lock <range|templateid_list>Locks a Template to prevent certain actions defined by different levels. The show action will never be locked.- Valid states are: All.
- Levels:
- [Use]: locks Admin, Manage and Use actions.
- [Manage]: locks Manage and Use actions.
- [Admin]: locks only Admin actions.
- Valid options:
adminallmanageuse
-
rename <templateid> <name>Renames the Template. -
show <templateid>Shows information for the given Template- Valid options:
extendedjsonxmlyaml
- Valid options:
-
top [<filterflag>]Lists Templates continuously- Valid options:
adjustcsvcsv_deldelaydescribeexpandfilterjsonlistlistconfno_expandno_headerno_pagernumericoperatorsizexmlyaml
- Valid options:
-
unlock <range|templateid_list>Unlocks a Template.- Valid states are: All.
-
update <templateid> [<file>]Update the template contents. If a path is not provided the editor will be launched to modify the current content.- Valid options:
append
- Valid options:
Argument Formats
-
filePath to a file. -
filterflaga, allall the knownVMTEMPLATEsm, minetheVMTEMPLATEbelonging to the user in ONE_AUTHg, group'mine' plus theVMTEMPLATEbelonging to the groups the user is member ofG, primary grouptheVMTEMPLATEowned the user's primary groupuidVMTEMPLATEof the user identified by thisuiduserVMTEMPLATEof the user identified by the username
-
groupidHyperCloud GROUP name or ID. -
rangeList of ID's in the form 1,8..15. -
templateidHyperCloudVMTEMPLATEname or ID. -
templateid_listComma-separated list of HyperCloudVMTEMPLATEnames or IDs. -
textString. -
useridHyperCloud USER name or ID.
Version
HyperCloud Orchestrator 6.4.0.1
Copyright © SoftIron