ITS Private Cloud CLI (vss-cli) Cheat Sheet

Global options

The following table includes global vss-cli options related to account and `

Name

Option

Environment Variable

Description

Name

Option

Environment Variable

Description

Username

--username

VSS_USER

 User to interact with the VSS API.

Password

--password

VSS_USER_PASS

 User password.

MFA TOTP Token

--totp

VSS_USER_OTP

If MFA enabled, will be prompted.

Config­uration Path

--config

VSS_CONFIG

Altern­ative config­uration path.

Request Timeout

--timeout

VSS_TIMEOUT

Request timeout in seconds.

API endpoint

--endpoint

VSS_ENDPOINT

ITS Private Cloud endpoint instance.

Global options (format)

The following table includes the global vss-cli options to customize output format.

Name

Option

Environment Variable

Description

Name

Option

Environment Variable

Description

Table format to use

--tabl­e-f­ormat

VSS_TABLE

csv, fancy_­grid, github, grid, html, jira...

Custom columns

--columns

-

Any VM attribute: 

moref,­nam­e,c­pu_­cou­nt,­ip_­address

Truncates column values

--colu­mns­-width

VSS_COL_WIDTH

0: auto, -1: disable

Don't use headers

--no-h­eaders

-

When printing tables

Sort output

--sort-by

-

Sort table by the jsonpath expres­sion.

Output

--output

VSS_OUTPUT

json|y­aml­|ta­ble­|au­to|­ndjson

Example 1. List virtual machines in yaml format:

vss-cli --output yaml compute vm ls

Example 2. List virtual machines with only moref, name, cpu_count, ip_address with fancy_grid in the table format.

vss-cli --columns moref,name,cpu_count,ip_address --table-format fancy_grid compute vm ls

 

Virtual Machine (update)

Manage virtual machine attributes with the vss-cli.

Add --wait to global vss-cli and get immediate change request results.

Action

Description

Command

Action

Description

Command

CPU

Update VM CPU count.

vss-cli compute vm set {id} cpu count {n}

CPU hot-add

Update VM cpu hot-add settings.

Memory

Update VM memory size.

Memory hot-add

Update VM memory hot-add settings.

Disk New (basic)

Create single or multiple disks.

Power State:

Turn off, on, reset. Shutdown and reboot (VMware Tools required)

Disk New (adv.)

Create single or multiple disks using specific SCSI controller

Disk Copy (adv.)

Copy and attach disks to VM from vskey-stor user space.

Disk Update

Update VM disk N capacity in GB.

Disk Update (adv.)

Update VM disk N capacity in GB, SCSI bus N and add metadata notes to the disk.

Disk Delete

Delete VM disk(s). Confirmation will be prompted.

NIC New

Create new network interface specifying Network name.

NIC new (adv.)

Create new network interface specifying Network name and Type.

NIC Update Network:

Update network interface network.

NIC Update State

Update network interface state to either connect or disconnect

NIC Update Type

Update network interface adapter type. defaults to vmxnet3.

NIC Delete

Delete network interface adapter(s)

CD/ISO Create

Create CD drive with attached ISO image from Content Library or client.

CD/ISO Update

Update CD drive to connect to a different ISO or disconnect.

Floppy Create

Create virtual floppy drive with given image or client.

Floppy Update

Update virtual floppy backing with a different image or client.

Storage Type

Update VM storage type to either ssd or hdd. This action will perform storage vMotion within the Compute Domain.

Domain

Update VM compute domain. This action will perform vMotion and storage vMotion.

Operating System

Update VM operating system settings. This setting is responsible to present the right virtual hardware to the guest OS.

Add vTPM

Add virtual Trusted Platform Module to VM. Virtualization Based Security, EFI and secure boot will be also en

Add vGPU

Add GPU to VM based on given profile.

Enable|Disable VBS

Enable or disable Virtualization Based Security.

Enable|Disable Secure Boot

Enable or Disable secure boot.

FIrmware

Update VM firmware to bios or EFI.

Convert to|from template

Mark VM as template or template as VM.

Administrator

Update VM admin metadata.

Informational Contacts

Add Informational Contacts in VM metadata.

Virtual Machine (restore)

Restore virtual machine from ZFS snapshots. More information about Restore Requests available here: https://eis-vss.atlassian.net/wiki/spaces/VSSPublic/pages/1406042121

Action

Description

Command

Action

Description

Command

Get Restore Points

List available restore points filtered by timestamp.

Submit Restore

Submit a restore request.

Virtual Machine (deplo­yment)

Deploy virtual mahc

Type

Description

Command

Type

Description

Command

Content Library

Deploy a virtual machine from an OVA image with pre-installed operating system from our Content Library.

 

 

 

Note. --user-data and --network-config will generate a seed iso that must be taken by the guest operating system, i.e. Ubuntu.

Shell VM

Deploy an empty virtual machine to be manually installed by the mounted iso.

Clone VM or Template

Clone virtual machine from another VM, template.

Clone VM (from snapshot)

Clone virtual machine from another VM snapshot id.

CLI Spec (existing)

Deploy a virtual machine from existing vss-cli specification.

CLI Spec (new)

Deploy a virtual machine from new vss-cli specification.

From Image

 

Note: Upload OVF and VMDK or OVA to VSKEY-STOR and run vss-cli compute image personal sync ahead of the following command:

Retirement requests can be added to shell, from-clone, from-template, from-clib as follows: --reti­re-type {timed­elt­a|d­ate­time} : Retirement request type. --reti­re-­warning {n} : Days before retirement date to notify. --reti­re-­value {hours­},{­day­s},­{mo­nths}: Value for given retirement type.

Virtual Machine Snapshot

Virtual Machine Snapshot management:

Create virtual machine snapshot now

Create virtual machine snapshot later

List existing virtual machine snapshots

Revert to existing virtual machine snapshots

Remove existing virtual machine snapshot

Extend virtual machine snapshot lifetime

Remember that every change, new vm submission and snapshot request create a unique ID.

Virtual Machine Folders

Manage virtual machine vSphere folders.

Create Folder

Rename Folder

Move Folder with its contents

Virtual Machine Inventory

Generate virtual machine inventory files.

Create Inventory File

Download Inventory File

 

Virtual Machine query

Action

Description

Command

Action

Description

Command

List

List all virtual machines

Search

Search for vm by attribute

Attributes

Get additional info for specific attribute

Virtual Machine query (advanced): The power of --col­umns with vss-cli

Look for a VM by IP address

List including storage type and prefer­ences

Decommission Virtual Machine

Show VM info before decommissioning

Initialize and Configure the vss-cli

Initialize

List

Set

Default config­uration file is available at 

Account MFA management

Enable MFA

Disable MFA

Verify

Account Notifi­cations

Format

Filter

Method

Account Group Membership

Get Group membership

Get group details

Get group members

OVF/OVA parsing

Get Deployment Option parameters

Generate additi­ona­l-p­arams spec

Get Property parameters

Raw requests

For example: 

 

University of Toronto - Since 1827