ITS Private Cloud CLI Image 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 image
The following is the YAML definition of valid VM Image CLI specification:
built: image # Required: Do not remove.
machine:
name: Vm-Name # Required: Target virtual machine name.
os: centos7 # Required: Guest Operating System name or Id.
cpu: 1 # Optional: CPU count (Default: 1).
memory: 1 # Optional: Memory in GB (Default: 1GB).
folder: Name-or-Id # Required: Folder name, path or ID.
disks:
- 40 # Optional: Disk capacity in GB (Default: 40GB).
iso: CentOS # Optional: ISO name or path to mount upon creation.
storage-type: hdd # Optional: Storage Type to use for this VM. ssd or hdd
# Additional (Uncomment to enable)
# domain: # Optional: Domain name or ID to deploy (Default: provided by API).
# power_on: true # Optional: Power on after successful deployment.
# gpus: # Optional: GPU profiles to attach to VM.
# - nvidia_l4-24c
networking:
interfaces:
- network: VSS-PUBLIC # Required: Network name or network ID.
type: vmxnet3 # Optional: Defaults to vmxnet3
# metadata required
metadata:
client: Department # Required: Client department
# Required: Description of virtual machine
description: >
nginx and database server for a very important service.
usage: Test # Optional: Usage between Prod | Dev | QA | Test (default: Test)
inform: # Optional: list of additional contact email addresses (default: user account)
- email@utoronto.ca
# admin: # Optional: VM Administrator (Default: user submitting request)
# 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
# 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_service: N/A # Optional: VSS Service name or service id
# vss_options: # Optional: VSS options reset_on_restore, reboot_on_restore
# - reset_on_restore
# - reboot_on_restore
# Extra config (Uncomment to enable)
# certain OVF/OVA like coreOS cloud images support guestinfo variables and these can
# be injected via the extra_config section
# extra_config:
# hostname: cos1
# interface.0.role: private
# dns.server.0: 128.100.100.128
# interface.0.route.0.gateway: 128.100.72.1
# interface.0.route.0.destination: 0.0.0.0/0
# interface.0.name: en*
# interface.0.dhcp: 'no'
# interface.0.ip.0.address: 128.100.72.148/24
# coreos.config.data.encoding: gzip+base64
# coreos.config.data: <cloud-init-data-gzip+b64>
Note
YAML is case-sensitive. YAML is whitespace-sensitive and indentation defines the structure, but it doesn’t accept tabs for indentation.