> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/v/vmware-nsx.md).

# VMware NSX

VMware NSX is a network virtualization and security platform. OctoXLabs reads the virtual machine inventory of the NSX fabric from NSX Manager. IP and MAC addresses are not part of this endpoint, so assets are correlated by host name.

## Use cases

* List the virtual machines known to the NSX fabric.

```
Adapters = vmware-nsx
```

## Before you begin

### Network

| Source              | Destination                                    | Port                        | Protocol |
| ------------------- | ---------------------------------------------- | --------------------------- | -------- |
| OctoXLabs connector | NSX Manager (use the cluster VIP in a cluster) | 443 (default, configurable) | HTTPS    |
| OctoXLabs connector | HTTP proxy (optional)                          | Set in **Proxy**            | HTTP     |

### Required permissions

| Scope or role       | Permission | Needed for                            |
| ------------------- | ---------- | ------------------------------------- |
| Auditor (read only) | Read       | `GET /api/v1/fabric/virtual-machines` |

Basic authentication must be enabled on NSX Manager. It is enabled by default but a hardening policy can turn it off.

## Create credentials in VMware NSX

{% stepper %}
{% step %}

### Check Basic authentication

Open an SSH session to NSX Manager as `admin`. Run `get service http`. The output must contain `Basic authentication: enabled`.
{% endstep %}

{% step %}

### Enable it if needed

If it is disabled, run `set service http basic-authentication enabled`. The setting is cluster wide and needs no restart.
{% endstep %}

{% step %}

### Create a read only user

Use a dedicated user with the **Auditor** role. Local users (`admin`, `audit`) use their plain name. A remote user from an identity source uses `user@domain`, where the domain matches the source under **System > Users and Roles > LDAP**.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter     | Required | Type    | Default | Description                               |
| ------------- | -------- | ------- | ------- | ----------------------------------------- |
| IP            | Yes      | Text    |         | Address of NSX Manager, without a scheme. |
| Port          | No       | Integer | 443     | API port.                                 |
| Username      | Yes      | Text    |         | Account name.                             |
| Password      | Yes      | Text    |         | Account password.                         |
| Is Secure     | No       | Boolean | True    | Use HTTPS.                                |
| Per Page      | No       | Integer | 1000    | VMs per page. NSX accepts 0 to 1000.      |
| Fetch Devices | No       | Boolean | True    | Collect the VM inventory.                 |
| Proxy         | No       | Text    |         | Proxy in `host:port` format.              |
| Timeout       | No       | Integer | 30      | Seconds to wait for API responses.        |

## Troubleshooting

| Error message               | Cause                                                            | Fix                                                             |
| --------------------------- | ---------------------------------------------------------------- | --------------------------------------------------------------- |
| 403 Forbidden (HTTP status) | A remote user was given without the matching `user@domain` form. | Use `user@domain` where the domain matches the identity source. |

## Change history

{% hint style="info" %}
Available starting from version 6.7.2.
{% endhint %}
