ITS Private Cloud CLI Clone specification for VM deploymentο
To launch your text editor with the specification template pre-loaded, run the following command:
vss-cli compute vm mk from-file --edit --save --spec-template clone
The following is the YAML definition of valid VM Clone CLI specification:
built: clone # Required: Do not remove.
machine:
source: SourceVM # Required: Can be a vm name or a vm id.
name: &name Vm-Name # Required: Target virtual machine name
disks: # Optional: Disks (Default: source vm disk layout)
- capacity_gb: 40 # Optional: Disk capacity in GB (Default: source vm disk capacity)
# Additional (Uncomment to enable)
# source_snapshot: # Optional: Snapshot name, id or description source to clone from
# folder: MyFolder # Optional: Folder name, path or ID (Default: source vm folder)
# firmware: efi # Optional: Firmware to use: Either bios or efi (Default: source vm firmware).
# storage-type: hdd # Optional: Storage Type to use for this VM. ssd or hdd
# os: # Optional: Guest Operating System name or Id (Default: source vm)
# cpu: # Optional: CPU count (Default: source vm cpu count)
# memory: # Optional: Memory in GB (Default: source vm memory size)
# domain: # Optional: Domain name or ID to deploy (Default: provided by API).
# power_on: true # Optional: Power on after successful deployment.
# template: false # Optional: Mark resulting vm as template.
# tpm: true # Optional: Enable vTrusted Platform Module Device.
# vbs: true # Optional: Enable Virtualization Based Security.
# Networking
networking: # Optional: Networking (Default: source vm interfaces layout)
interfaces: # Optional: Interfaces (Default: source vm interfaces layout)
- network: CGN # Optional: Network name or network ID (default: source vm network)
type: vmxnet3 # Optional: Defaults to vmxnet3
# Customization Specification
# VMware Tools must be installed and running on the source
# Linux must Perl installed
# customization specification (optional)
custom_spec:
hostname: *name # Required: host name setting for the OS (default: name)
time_zone: 'America/Toronto' # Optional: The case-sensitive timezone or MS Time Zone code: 35
domain: eis.utoronto.ca # Required: full search domain
# dns_servers:
# - 128.100.100.128 # Required (if dhcp:false): Remove if using VSS-PUBLIC or any other DHCP based network
interfaces:
- dhcp: true # Required: Whether to use DHCP for interface configuration (default: no)
# ip: 10.6.0.2/24 # Required (if dhcp:false): CIDR format. Remove if using VSS-PUBLIC or any other DHCP based network
# gateway: # Required (if dhcp:false): Remove if using VSS-PUBLIC or any other DHCP based network
# - 10.6.0.1
# Metadata required
metadata: # Optional: Description of virtual machine
description: >
nginx and database server for a very important service.
usage: Test # Optional: Usage between Prod | Dev | QA | Test (default: source vm usage)
client: Department # Optional: Client department (default: source vm client)
inform: # Required: list of email addresses. (default: source vm inform)
- email@utoronto.ca
admin: # Optional: VM Administrator (Default: source vm admin)
name: # (Admin) Required: VM Administrator full name
email: # (Admin) Required: VM Administrator email i.e. user@utoronto.ca
phone: # (Admin) Required: VM Administrator phone i.e. 416-123-2341
# vss_service: N/A # Optional: VSS Service name or service id
# Recommended Metadata (Uncomment to enable)
# notes: # Optional: list of key-value items to be set in Key: value form.
# - BillingCode: 12345
# - Documentation: https://uoft.me/service-docs
# vss_options: # Optional: VSS options reset_on_restore, reboot_on_restore
# - reset_on_restore
# - reboot_on_restore
# VM extra configuration (Uncomment to enable)
# extra_config:
# - disk.EnableUUID="TRUE"
# Cloud init post-deployment config (Uncomment to enable)
# cloud_init:
# user_data: 'user_data.yaml'
# network_data: 'network_config.yaml'
Note
YAML is case-sensitive. YAML is whitespace-sensitive and indentation defines the structure, but it doesnβt accept tabs for indentation.