VMware Workstation API remote access

I was really excited by Adam’s great Ansible Module for VMware Workstation. To use this Module from my Development Environment, VMware Workstation API remote access is necessary. You can configure the REST API service to provide HTTP access locally and HTTPS access both locally and remotely.


The VMware Workstation documentation highlights the use of a self-signed certificate. Another option is the use of a signed certificate generated with XCA. If you use a signed certificate you should use a PEM chain instead of a single certificate.

Configure REST API HTTPS - Secure Connection
Configure REST API HTTPS - Certificate Chain

In both setups (self-signed certificate or signed certificate) you need to export the certificate (chain) and the private key as a PEM file. The vmrest utility needs both files and the “public” IP as input to start the VMware Workstation API remote access.

vmrest.exe -c C:\Users\marku\Documents\mk-nb-01.lab.local.crt -k C:\Users\marku\Documents\mk-nb-01.key -i

vmrest.exe -c C:\Users\marku\Documents\mk-nb-01.lab.local-chain.pem -k C:\Users\marku\Documents\mk-nb-01.key -i
VMware Workstation API remote access

Execute Playbook with HTTPS

With the latest commits to Adam’s GitHub Repository, you are able to consume the VMware Workstation Pro API remotely via HTTPS even with self-signed certificates.

- name: VMw WS API
  hosts: localhost
  gather_facts: no
    - name: "Get infos"
        api_url: ""
        api_port: "8697"
        validate_certs: no
        username: "admin"
        password: "Passw0rd!1"
      register: vminfos
    - name: "Output"
          var: vminfos
VMware Workstation API - Ansible Playbook


    • Markus Kraus 19. October 2020
  1. detteiu 3. November 2020

Leave a Reply