VSS Command Line Interface v0.2.5
VSSCLI v0.2.5 is available for download via PyPI or GitLab. Latest version includes the following new features and bug fixes:
- Features
- Introducing vss upgrade to automatically upgrade VSS CLI and its components (including py-vss).
- Bug fixes
- Error in vss compute vm set client
- Error in vss compute vm set state
- Improvements
We have finally overcome the issue when a console link is requested and you don't have a session on vCenter. vss compute vm <uuid> get console takes username and password either from the VSS CLI configuration file, environment variables or input:
vss compute vm get 5012ce58-d43d-527a-5928-6c7fe116bf3b console --help Usage: vss compute vm get console [OPTIONS] Get one-time HTML link to access console Options: -l, --launch Launch link in default browser -u, --username TEXT VSS username or configure by setting VSS_API_USER environment variable or defaults to configuration file. -p, --password TEXT VSS password or configure by setting VSS_API_USER_PASS environment variable or defaults to configuration file. --help Show this message and exit.
Help with examples have been included in commands, for instance vss compute vm set <uuid> state shows:
vss compute vm set 50127974-aa4a-c215-f9f0-e1ab8a4ef050 state --help Usage: vss compute vm set state [OPTIONS] STATE Set given virtual machine power state. vss compute vm set <uuid> state on|off|reset|reboot|shutdown -c Reboot and shutdown send a guest OS restart signal (VMware Tools required). Options: -c, --confirm Confirm state change --help Show this message and exit.
Command vss compute vm set <uuid> state provides a confirmation prompt showing more information about the target host, for instance:
vss compute vm set <uuid> state reboot Host Name: hostname.eis.utoronto.ca (Linux 3.10.0-693.2.2.el7.x86_64 CentOS Linux release 7.4.1708 (Core) ) IP Address: 192.168.23.128, fe80::250:56ff:fe92:2cd, 172.17.0.1, fe80::42:41ff:fece:c977 Are you sure you want to change the state from "running to reboot" of the above VM? [y/N]:
The confirmation prompt can be skipped by including the -c/--confirm option in the command
Remember, VSSCLI documentation is now available in EIS - VSS - VSSCLI
Upgrade or install PyVSS as follows:
# from version v0.2.5 you can run vss upgrade # upgrade pip install vsscli --upgrade # install pip install vsscli
Docker images available: uofteis/vsscli:py27:
docker run -it -v /tmp:/data \ -e VSS_API_USER=user_here -e VSS_API_USER_PASS=user_pass_here \ -e VSS_DEFAULT_OUTPUT=json \ uofteis/vsscli bash
For more information, please refer to the official documentation site.