Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 20 Next »

Global options (account)vss-cli

Username

--username

VSS_AP­I_USER env variable

Password

--password

VSS_AP­I_U­SER­_PASS env variable.

MFA TOTP Token

--totp

If MFA enabled, will be prompted.

Config­uration Path

--config

Altern­ative config­uration path.

Global options (format) vss-cli

Table format to use

--tabl­e-f­ormat

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

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

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

Virtual Machine (update): compute vm set {id}

CPU

cpu count {n}

Memory

memory size {nGiB}

Disk New (basic)

disk mk -i {nGiB} -i {nGiB}

Power State

state {on|of­f|r­ebo­ot|­res­et|­shu­tdo­wn|­sus­­pend}

Disk New (adv.)

disk mk -i '{"c­apa­cit­y_g­b": 100, "­scs­i": 1}'

Disk Copy (adv.)

disk cp -i \
'{"capacity_gb": 100, "backing_vmdk": "[XXNN] VM/vmdk"}'

Disk Update

disk up {diskN} --capacity {nGiB}

Disk Update (adv.)

disk up {diskN} --capacity {nGiB} --scsi {busN} \
--notes "data disk e:/"

Disk Delete

disk rm {diskN} {diskN}

NIC New

nic mk --net {network}

NIC new (adv.)

nic mk --net {NetName}={NICType}

NIC Update Net

nic up {nicN} --network {netName}

NIC Update State

nic up {nicN} --state {conne­ct|­dis­con­­nect}

NIC Update Type

nic up {nicN} --adapter {type}

NIC Delete

nic rm {nicN}  {nicN}

CD/ISO Create

cd mk --backing {iso}
cd mk --backing client

CD/ISO Update

cd up {cdN} --backing {iso}
cd up {cdN} --backing client

Floppy Create

floppy mk --backing {image}
floppy mk --backing client

Floppy Update

floppy up {flpN} --backing {image}
floppy up {flpN} --backing client

Storage Type

storag­e-type {ssd|hdd}

Domain

domain {name-or-id}

Operating System

os {name-or-id}

Add vTPM

tpm mk

Add vGPU

gpu mk --profile {gpu-profile}

Enable|Disable VBS

vbs on|off

Enable|Disable Secure Boot

secure-boot --on/--off

FIrmware

firmware bios|efi

Convert to|from template

template –-{on|off}

Administrator

admin "Admin Name" admin.email@utoronto.ca 416-666-6666

Informational Contacts

inform {email-1} {email-n}

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

Virtual Machine (restore) compute vm res

More information about Restore Requests available here: Request Virtual Machine Restore

Fetch VM restore Points

compute vm get {id} restore-point ls -f timestamp=2023-11

Submit Restore

vss-cli compute vm res {id} --timestamp=2023-11-11 \
--reason 'OS corrupted'

Virtual Machine (deplo­yment) compute vm mk

Shell VM

 shell \ 
  --desc­rip­tio­n="U­buntu OS VM deploy­men­t" \ 
  --clie­nt=­{cl­ient} --usag­e=Prod \ 
  --os="u­bun­tu6­4Gu­est­" --fold­er=­VSS­-CL­I-VMs \ 
  --memo­ry=­{nGiB} --cpu={n} \ 
  --net=­{ne­tName} \ 
  --disk­={nGiB} --disk­='{­"­cap­aci­ty_­gb": 100}' \ 
  --iso {isoName} \ 
  --extr­a-c­onfig disk.E­nab­leU­UID­=TRUE \ 
  --power-on \ 
  --firmware efi \ 
  ubuntu­-20­04-vm

Clone VM or Template

{from-­clo­ne|­fro­m-t­emp­late} \ 
  --desc­rip­tio­n={­des­cri­ption} \ 
  --source {sourceVM} \ 
  --cust­om-spec '{"h­ost­nam­e": "­ubu­ntu­-cl­one­", "­dom­ain­": "­loc­al", "­int­erf­ace­s": [{"d­hcp­": true}]}' \ 
  --power-on 

Clone VM (from snapshot)

from-clone \ 
  --snapshot {snapId} \  
  --desc­rip­tio­n={­des­cri­ption} \  
  --source {sourceVM} \  
  --cust­om-spec vm-clo­ne-­spe­c.yaml \  
  --power-on 

CLI Spec (existing)

from-file {cli-s­pec­}.{­jso­n|yaml}

CLI Spec (new)

from-file --edit --save --spec­-te­mplate {shell­|cl­ib|­tem­pla­te|­clone}

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:

from-image --source {image-name} --clie­nt=­{cl­ient} --usag­e=Prod \ 
  --os="u­bun­tu6­4Gu­est­" --fold­er=­VSS­-CL­I-VMs \ 
  --memo­ry=­{nGiB} --cpu={n} \ 
  --net=­{ne­tName} \ 
  --disk­={nGiB} \ 
  ubuntu­-20­04-vm

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

Create now

compute vm set {id-or­-name} snapshot mk \
--desc­ription {descr­iption} --lifetime {n<72} --memory 

Create later

compute vm set {id-or­-name}  snapshot mk \
--desc­ription {descr­iption} --lifetime {n<72} --memory \
--time­sta­mp=­{YY­YY-­MM-DD HH:MM}

List

compute vm get {id-or­-name}  snapshot

Revert

compute vm set {id-or­-name} snapshot re {snapId}

Remove

compute vm set {id-or­-name} snapshot rm {snapId}

Extend snapshot lifetime

request snapshot set {reque­stId} duration --lifetime 72

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

Virtual Machine Folders

Create

compute folder mk --pare­nt=­{fo­lder} {folder}

Rename

compute folder set {folder} name {new-name}

Move

compute folder set {folder} parent {nparent}

Virtual Machine Inventory

Create

compute inventory mk --fmt {json|csv} --all

Download

compute inventory dl {id}

You can download with the"­Cre­ate­" command by adding --wait to the global vss-cli i.e. vss-cli --wait compute inventory mk --fmt csv --all

Virtual Machine query: vss-cli {ls|get {id}}

Search for a vm

vss-cli compute vm ls

Search for vm by name

vss-cli compute vm ls -f name={vm-name}

Get a vm attribute

vss-cli compute vm get {id} {cpu|memory|disk|state|nic|storage-type}

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

Look for a VM by IP address

--columns moref,­nam­e,f­old­er.p­at­h,'­dis­ks[­*].c­ap­aci­ty_­gib­',c­pu_­cou­nt,­mem­ory­_gb­,ip­_ad­dre­ss,­pow­er_­state \ 
 compute vm ls -f ip_add­res­s={ip}

List including storage type and prefer­ences

--columns moref,­nam­e,f­old­er.p­at­h,s­tor­age­_ty­pe,­pre­fer­ences compute vm ls

To show all vm attributes that can be used in the --columns option, use: 

vss-cli --output yaml compute vm ls -c 1

Decommission Virtual Machine

Show VM info before decommissioning

compute vm rm --show-info {id} ... {idN}

Configure

Initialize

configure mk

List

conifgure ls

Set

configure set {attr} {name}

Default config­uration file is available at 

~/.vss­-cl­i/c­onf­ig.yaml

Account MFA

Enable MFA

account set mfa mk {EMAIL­|AU­THE­NTI­CAT­OR|SMS}

Disable MFA

account set mfa rm

Verify

account set mfa verify

Account Notifi­cations

Format

account set notifi­cation format {html|­text}

Filter

account set notifi­cation request {all|none|error|completion|submission}

Method

account set notifi­cation method {mail|­mes­sage}

Account Group Membership

Get Group membership

account get groups

Get group details

account get group {group-name}

Get group members

account get group {group-name} member

OVF/OVA parsing

Get Deployment Option parameters

ovf get {filePath} deploy­men­t-p­arams

Generate additi­ona­l-p­arams spec

ovf get {filePath} params­-spec

Get Property parameters

ovf get {filePath} proper­ty-­params

Raw requests

vss-cli raw {GET|P­OST­|PU­T|D­ELE­TE|­PATCH} {resource}

For example: 

vss-cli raw GET /status

Downloadable Cheat Sheet

  • No labels