In the process of importing a vSphere VM into VMware Integrated OpenStack, connecting to the vAPI endpoint fails with an error.

Problem

Running DCLI to connect to the vAPI endpoint results in ERROR: Unable to connect to the server.

Cause

The vAPI service is not running.

Solution

  1. Log into the OpenStack Manager Server as root.
  2. Check the status of the vAPI service.
    systemctl status vapi

    The service appears inactive.

    vapi.service - VIO vAPI
       Loaded: loaded (/etc/systemd/system/vapi.service; disabled; vendor preset: enabled)
       Active: inactive (dead)
  3. Restart the service.
    systemctl restart vapi
  4. Check the status of the vAPI service again.
    systemctl status vapi

    The service appears to restart.

    vapi.service - VIO vAPI
       Loaded: loaded (/etc/systemd/system/vapi.service; disabled; vendor preset: enabled)
       Active: active (running) since Wed 2018-06-27 04:46:00 UTC; 1s ago
      Process: 1983 ExecStartPre=/bin/mkdir -p /var/log/vmware/vapi (code=exited, status=0/SUCCESS)
     Main PID: 1985 (twistd)
       CGroup: /system.slice/vapi.service
               └─1985 /usr/bin/python /usr/bin/twistd --nodaemon --pidfile= -n web --port=9449 --wsgi vmware.vapi.wsgi.application
    
    Jun 27 04:46:00 vio-oms-01.mgt.sg.lab systemd[1]: Starting VIO vAPI...
    Jun 27 04:46:00 vio-oms-01.mgt.sg.lab systemd[1]: Started VIO vAPI.
    ...

What to do next

With the service started, retry connecting to the VMware Integrated OpenStack vAPI endpoint. See Import Virtual Machines into VMware Integrated OpenStack.