2.1.2 • Published 3 years ago

vmw-cli v2.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

vmw-cli

2.0 marks the first in a series of releases of the new vmw-cli tool and supercedes all previous versions.
It has been built from the ground up to be aligned with the new my.vmware.com website.
New features will become available in on-going releases.

vmw-cli is a CLI client used to login and interact with my.vmware.com.
It provides an interface for programmatic query and download of VMware product binaries.

Every product.
Every version.
Every file.

vmw-cli uses the my.vmware.com Node.js SDK here: vmw-sdk

Install

Configure authentication for my.vmware.com

export VMWUSER='<username>'
export VMWPASS='<password>'

Note: Any download attempts will be restricted to the entitlements afforded by your account.
Alternatively, if using docker commands, you can pass credentials directly to the container instead.

vmw-cli can be consumed using the Shell + Docker pre-built image (preferred), or installing the package via NPM.
By default, requested files via the cp command will be downloaded to current working directory.

via Docker: Shell Integration

Builds a shell command that links to the docker container.
Requires docker installed on your system.

docker run apnex/vmw-cli shell > vmw-cli
chmod 755 vmw-cli
mv vmw-cli /usr/bin/

Once shell integration installed, vmw-cli can be leveraged directly via the vmw-cli shell command - see Usage below

via NPM

vmw-cli requires NodeJS >= 12.x, some older Linux distros need to have NodeJS manually updated

npm install vmw-cli --global

Once installed, vmw-cli can be leveraged directly via the vmw-cli shell command - see Usage below

via Docker Manual

This is where we manually start the container using docker run with the required ENV parameters set.
This is not required if you have performed Shell Integration.
Subsequent commands are then issued using docker exec commands.

Start the container in background:

docker run -itd --name vmw -e VMWUSER='<username>' -e VMWPASS='<password>' -v ${PWD}:/files --entrypoint=sh apnex/vmw-cli

Where:

  • <username> is your my.vmware.com username
  • <password> is your my.vmware.com password
  • ${PWD} ENV will resolve to current working directory in BASH for file downloads

Then issue one or more docker exec commands:

docker exec -t vmw vmw-cli <cmd>

Clean up docker container when done:

docker rm -f vmw

See Usage for more examples

Overview

vmw-cli has been modelled to make resources on my.vmware.com resemble a file system.
This allows you to browse available downloads via the ls command, and select a file to copy to your local system.

Directory Geometry

All files are grouped into nested directory structures in the form <category>/<version>/<type> Where:

For example;

Current vmware_nsx_t_data_center file structure:

Current vmware_vsphere file structure:

And so on.

Usage

vmw-cli supports the ability to browse available files using the ls command.
You can then leverage the cp command to retrieve one of the listed files.
You must execute an ls for the desired <category> before you can issue the cp command for a file.

Get root-level category listing

$ vmw-cli ls

View files listed under vmware_nsx_t_data_center

$ vmw-cli ls vmware_nsx_t_data_center

Note: This will default to latest <version> and <type> = PRODUCT_BINARY as they are not specified.

View available versions listed under vmware_nsx_t_data_center

$ vmw-cli ls vmware_nsx_t_data_center/

View files for version 3_x under vmware_nsx_t_data_center

$ vmw-cli ls vmware_nsx_t_data_center/3_x

Note: This will default <type> = PRODUCT_BINARY as it was not specified.

View available types for version 3_x under vmware_nsx_t_data_center

$ vmw-cli ls vmware_nsx_t_data_center/3_x/

View DRIVERS_TOOLS files for version 3_x under vmware_nsx_t_data_center

$ vmw-cli ls vmware_nsx_t_data_center/3_x/DRIVERS_TOOLS

View PRODUCT_BINARY files for version 3_x under vmware_nsx_t_data_center

$ vmw-cli ls vmware_nsx_t_data_center/3_x/PRODUCT_BINARY

Download file nsx-unified-appliance-3.0.1.1.0.16556500.ova

$ vmw-cli cp nsx-unified-appliance-3.0.1.1.0.16556500.ova 
[POST] https://my.vmware.com/channel/api/v1.0/ems/accountinfo
{
	"locale": "en_US",
	"downloadGroup": "NSX-T-30110",
	"productId": "982",
	"md5checksum": "9cf49e74d7d43c11768a04fb05f92d85",
	"tagId": 12178,
	"dlgType": "Product Binaries",
	"productFamily": "VMware NSX-T Data Center",
	"releaseDate": "2020-07-16",
	"dlgVersion": "3.0.1.1",
	"isBetaFlow": false
}
[POST] https://my.vmware.com/channel/api/v1.0/dlg/download
nsx-unified-appliance-3.0.1.1.0.16556500.ova [■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■] 100% | 0.0s | 11.02/11.02 GB
MD5 MATCH: local[ 9cf49e74d7d43c11768a04fb05f92d85 ] remote [ 9cf49e74d7d43c11768a04fb05f92d85 ]

File will be downloaded to current working directory.

2.1.2

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.15

4 years ago

2.0.14

4 years ago

2.0.13

4 years ago

2.0.12

4 years ago

2.0.11

4 years ago

2.0.9

4 years ago

2.0.10

4 years ago

2.0.8

4 years ago

2.0.7

4 years ago

2.0.6

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.2.16

5 years ago

1.2.15

5 years ago

1.2.14

5 years ago

1.2.12

5 years ago

1.2.11

5 years ago

1.2.10

5 years ago

1.2.9

5 years ago

1.2.8

5 years ago

1.2.7

5 years ago

1.2.6

5 years ago

1.2.5

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.13

6 years ago

1.1.12

6 years ago

1.1.10

6 years ago

1.1.9

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago