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 clib
The following is the YAML definition of valid VM Content Library CLI specification:
built: clib # Required: Do not remove. machine: item: ubuntu-22.04 # Required: Source content library id OVF. cpu: 1 # Optional: CPU count (Default: 1). memory: 1 # Optional: Memory in GB (Default: 1GB). name: &name Vm-Name # Required: Target virtual machine name. os: ubuntu64Guest # Required: Guest Operating System name or Id. folder: Name-or-Id # Required: Folder name, path or ID. storage-type: hdd # Optional: Storage Type to use for this VM. ssd or hdd firmware: efi # Optional: Firmware to use: Either bios or efi (Default: bios). # Disks (Uncomment to enable) disks: - capacity_gb: 40 # Disk capacity in GB (Default: 40GB). backing_mode: persistent # Optional Disk backing mode (Default: persistent). backing_sharing: sharingnone # Optional Disk sharing mode (Default: sharingnone). # 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. # template: false # Optional: Mark resulting vm as template. # tpm: true # Optional: Enable vTrusted Platform Module Device. # vbs: true # Optional: Enable Virtualization Based Security. networking: interfaces: - network: CGN # Required: Network name or network ID. type: vmxnet3 # Required: 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: # Required: list of additional contact email addresses - 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/Required for ITS: VSS Service name or service id # 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" # OVF additional parameters (Uncomment to enable) # PropertyParams and DeploymentOptionParams. # additional_parameters: additional_params.yaml # Day0 configuration (Uncomment to enable) #day-zero: # config-file: configuration.txt # config-name: # Optional: To define the file name of the configuration. Defaults to day0-config # id-token-file: id-token.txt # id-token-name: # Optional: To define the file name of the id token configuration. Defaults to idtoken # Cloud init post-deployment config (Uncomment to enable) # cloud_init: # user_data: 'user_data.yaml' # network_data: 'network_config.yaml' # 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
YAML is case-sensitive. YAML is whitespace-sensitive and indentation defines the structure, but it doesn’t accept tabs for indentation.