VSS Command Line Interface (vss-cli) v2022.10.1

VSS-CLI v2022.10.1 is available for download via PyPI or GitLab. Latest version includes the following improvements and bug fixes:

New Features

ovf get: to inspect and generate additional-params spec file from OVA or OVF. (#571)

Commands

  • ovf get <ova_or_ovf_path

  • ovf get <ova_or_ovf_path> property-params

  • ovf get <ova_or_ovf_path> deployment-params

  • ovf get <ova_or_ovf_path> params-spec

Description

Back on v2022.5.0, we introduced the option --additional-params to support OVF PropertyParams and DeploymentOptionParams to use the pre-defined vApp options and pre-configure the appliance. Many “cloud images” like Ubuntu OS and Cisco OVA have these defined in the OVF.

However, getting this configuration from the OVF is not as simple as it seems. The ovf command goal is to simplify the process of obtaining and generating yaml specification file without much intervention and even without unpacking an ova . The only limitation (for now) is that the OVA must be locally available.

For instance, If we plan to deploy the following Ubuntu VM using a cloud image available in our Content Library:

vss-cli compute contentlib ovf ls -f name=jammy id name library.name size -------------------------------- -------------------------------- -------------- --------- 8261093e-281a-42db-8d1c-1c2f68e… Ubuntu-22.04.jammy-server-cloud… VSS-Nix 841781847

which can be downloaded from jammy-server-cloudimg-amd64.ova and to your workstation, you could run vss-cli ovf get jammy-server-cloudimg-amd64.ova to obtain a summary of the OVF:

Name : ubuntu-jammy-22.04-cloudimg-20221019 ProductVersion : None Networks : VM Network Files : ubuntu-jammy-22.04-cloudimg.vmdk DeploymentOptionParams: PropertyParams : instance-id, hostname, seedfrom, public-keys, user-data, password

Tada! we have retrieved the minimum info from the OVA. Now, if you would like to know more, try running the command with the --output yaml option at the top level.

From the previous output, we know that the OVF only has PropertyParams, but how do we use them? We have two options:

  1. Run vss-cli --columns-width=0 ovf get jammy-server-cloudimg-amd64.ova property-params to get text output of the key, type, description and default value:

    vss-cli --columns-width=0 ovf get jammy-server-cloudimg-amd64.ova property-params key type description default ----------- ------ -------------------------------- ----------- instance-id string Specifies the instance id. Thi… id-ovf hostname string Specifies the hostname for the … ubuntuguest seedfrom string This field is optional, but ind… None public-keys string This field is optional, but ind… user-data string In order to fit into a xml attr… password string If set, the default user's pass…
  2. Run vss-cli ovf get jammy-server-cloudimg-amd64.ova params-spec --edit to create an additional-params.yaml specification for you to edit in your default text editor. The best part is that it will pre-set any default value and will add comments at the bottom of the screen for guidance. After saving the changes, the vss-cli saves the yaml specification for you to use:

 

Improvements

compute vm mk: option --custom-spec load from yaml/json file or input (#568)

Commands:

  • compute vm mk shell

  • compute vm mk from-clone

  • compute vm mk from-spec

  • compute vm mk from-template

Description

Applying Guest Customization Specification to a cloned instance is a popular feature and has been around for a while supporting only a json string from input via --custom-spec. However, it has been always challenging to type a long string along with the other options in a deployment command and even more difficult in JSON format. As you may know,YAML goal is to be human-readable, whereas JSON is to be a universally used and machines oriented.

Taking this into account, we have finally rolled out support for both .json and .yaml files or string values in the option. This means that your existing commands could be simplified as follows:

or

On this note, either of the following specs will work as the --custom-spec value:

If you have an existing custom-spec.json file, you could easily convert it to yaml with the yq utility: GitHub - mikefarah/yq: yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties processor i.e. yq eval -P custom-spec.json> custom-spec.yaml.

compute vm mk: option --vbs to enable Virtualization Based Security (#572)

Commands:

  • compute vm mk shell

  • compute vm mk from-clone

  • compute vm mk from-spec

  • compute vm mk from-template

Description

Version v2022.8.0 introduced VBS management in the vss-cli, and now we have made available the option --vbs to do the following tasks in a single op:

  • Use efi firmware.

  • Enable secure boot on virtual machine.

  • Enable vvtd on virtual machine.

  • Enable vbs on the virtual machine.

  • Add a virtual tpm device.

If you were to deploy a Windows 11 virtual machine, your command would look like:

compute vm mk from-file: option vbs to enable Virtualization Based Security (#573)

Description

A new attribute has been added to the machine section in the file.yaml specification file:

misc: process value from input or file (#574)

Commands:

  • misc b64d-gz

  • misc gz-b64e

  • misc hash-string

Description

The misc helper commands are useful when dealing with additional tasks like compressing and encoding data such as userdata.yaml and generating hashed strings from passwords. For example, compressing and encoding a given userdata.yaml can now be done:

docs: example to deploy Photon OS from clib. (#575)

docs: example update clib deployment user data. (#576)

compute vm set <id> storage-type: set to either ssd or hdd (approval required). (#563)

compute vm get <id> storage-type: get current virtual machine storage type. (#564)

core: upgrade pyvss to v2022.10.0. (#565)

Upgrade

Remember, VSS-CLI documentation is now available in VSS-CLI and the full Change Log is available Changelog 📝 — ITS Private Cloud Command Line Interface 2024.10.0 documentation . Upgrade or install VSS-CLI as follows:

For more information, please refer to the official documentation site.

 

University of Toronto - Since 1827