# VMware Stream deployment

## Requirements

* Administrative access to you VMware vCenter/vShere console or authorization to deploy via API connection.
* To configure your Stream instance, you will need access to the Stream Command Line Interface (CLI) either via the console in your hypervisor or via SSH).
  * DHCP is enabled by default upon Stream initial boot.
  * If you don’t know the DHCP IP, you will need to use the hypervisor console.
* VMware specific information is required.
  * vSphere hostname or IP, vm name for the vSensor, datacenter hostname or IP, vmhost to deploy on, datastore, management portgroup, vswitch, # of cores.
* Optional VMware specific information for vSphere api based deployment from the Brain CLI.
  * vSphere port, resource path, hostname to assign, username, password.

{% hint style="info" %}
**Please Note:**

* For production monitoring, ensure that the Stream VM is kept running 24x7, and ensure that the hypervisor does not overcommit resources or otherwise misrepresent the resources it is providing to Stream.
* vMotion should not be enabled for Stream.
  {% endhint %}

{% hint style="danger" %}
**Special Note: Vectra supported VMware hardware versions**

* Vectra supports only versions 11 and 15 of VMware hardware.
* **DO NOT** update the hardware version if offered during deployment or any other situation.
* If you move to an unsupported hardware version, Vectra support will direct you to redeploy the VMware Stream appliance that is running an unsupported version. Downgrades are unsupported.
  {% endhint %}

## Deploying the OVA

There are two ways to deploy the OVA into your VMWare environment:

* Using your vCenter/vSphere client.
* Using the `provision vmware stream` CLI command from the Brain.

Deploying using your vCenter/vSphere client or web UI for standalone ESXi servers

vCenter/vSphere versions and clients vary.

The web UI for ESXi 6.5 and later does not have full feature support for some standard OVA features including specifying **deployment options** within an OVA. Due to this it is not possible to deploy Stream on standalone ESXi 6.5 Update 1 or later using the web UI. In these cases, it is recommended to deploy using the vCenter app or vSphere client. The Vectra CLI command `provision vmware stream` is another option.

The general process for using the vCenter application or vSphere client to deploy the OVF is as follows:

* Login and navigate to Hosts and Clusters.
* Right click on the host where Stream will be deployed and select **Deploy OVF Template**.
* A pop up will walk you through configuring the virtual appliance.
  * Browse to the OVA that was downloaded from the Vectra Brain.
  * Choose from template options provided a configuration for your deployment.
  * Give the Stream VM a name.
  * Also assign it to a datacenter, cluster, and folder appropriate for your environment.
  * Select the datastore to house the virtual environment.
  * Please do not make changes to virtual disk format (it should be thick provisioned).
  * Assign Network Adaptor 1 (MGT1) to the port group used for Stream.
  * Configure DHCP or static assignment for MGT1.
* Review the final details and enable **Power on Upon Completion** if you are ready to begin pairing.

Deploying Stream using the Vectra CLI on your Brain

The CLI tool is an easy and convenient way to deploy on vCenter/vSphere and ESXi standalone servers. To deploy using this method, follow these steps:

* Ensure any firewall allows the Brain to connect to the vCenter server (if applicable) and the ESX/vSphere server on port 443 (or alternate port if configured).
* Login to VCLI on the Brain using the `vectra` user.
* Run the `provision vmwware stream` command using the appropriate options.

Options for the `provision vmware stream` command can be displayed at the Brain CLI as below:

```
vscli > provision vmware stream --help
Usage: provision vmware stream [OPTIONS]
 
  Uses ovftool along with the supplied information to provision new stream
  instance to vCenter or a standalone ESXi hypervisor.
 
Options:
  -vs, --vsphere TEXT            IP or hostname of vCenter/vSphere instance
                                 [required]
  -vm, --vmname TEXT             Virtual machine name to assign to the vSensor
                                 [required]
  -ds, --datastore TEXT          Name of the datastore to create the virtual
                                 machine on  [required]
  -m, -mp, --mgmt_pg TEXT        Management NIC's portgroup name  [required]
  -dc, --datacenter TEXT         Name of the data center where the vsensor
                                 will be created on (vCenter only)
  -vh, --vmhost TEXT             Name of the physical host that the vSensor
                                 will be created on (vCenter only)
  -d, --dhcp                     Select DHCP or static IP, Netmask, Gateway
                                 for vSensor management (only supported on
                                 vCenter)
  -mip, --mgmt_ip TEXT           Static Management IP address (only supported
                                 on vCenter)
  -mnm, --mgmt_netmask TEXT      Static Management IP netmask (only supported
                                 on vCenter)
  -mgw, --mgmt_gw TEXT           Static Management gateway IP address (only
                                 supported on vCenter)
  -n, --dns TEXT                 Comma separated list of DNS server IP
                                 addresses (only supported on vCenter)
  -c, --cores [2|4|8|16]         Number of cores for vSensor to use (default
                                 4)
  -p, --port INTEGER             vSphere port (default is 443)
  -r, -rp, --resource_path TEXT  Folder/resource path in which a host is
                                 located, e.g. "Folder Name/Cluster name"
                                 (vCenter only). If a folder name contains a
                                 forward slash (/) replace those slashes with
                                 "%2f" (without quotes)
  -hn, --hostname TEXT           vSensor hostname to assign (only supported on
                                 vCenter)
  -u, --username TEXT            vCenter/vSphere username (you will be
                                 prompted if not provided)
  -pw, --password TEXT           vCenter/vSphere password (you will be
                                 prompted if not provided)
  --wait-for-ip                  If selected, command returns only when the
                                 sensor successfully got an IP address
  -h, --help                     Show this message and exit.
```

Command syntax:

```
vscli > provision vmware stream
Usage: provision vmware stream < -vs vsphere > < -vm vmname > < -ds datastore > < -m mgmt_pg > [ -dc datacenter ] [ -vh vmhost ] [ -d ] [ -mip mgmt_ip ] [ -mnm mgmt_netmask ] [ -mgw mgmt_gw ] [ -n dns ] [ -c cores( 2 | 4 | 8 | 16 ) ] [ -p port ] [ -r resource_path ] [ -hn hostname ] [ -u username ] [ -pw password ] [ --wait-for-ip ]
Try "provision vmware stream -h" for help
```

Example command:

```
provision vmware stream -vs “vsphere.local” -vm “Stream” -ds “esxhost2 NVMe” -m “10x3 Management Network” -dc “Oakland” -vh “Production 17” -mip 10.0.3.92 -mnm 255.255.255.0 -mgw 10.0.3.1 -n 10.0.6.10 -c 16
```

{% hint style="info" %}
**Please note:**

* The provision command uses VMware’s ovftool along with the supplied information to provision Stream.
* Customers can also choose to use VMware’s ovftool directly if that is their preferred deployment method.
  * Please refer to VMware’s ovftool instructions for this method and use the ovftool from your preferred location.
* Not all arguments are required.
  * For example, if a username or password is not specified, you will be prompted for them.
* The OVA template is shared for Stream and vSensors.
  * 16 core vSensors need 600 GB disk, Stream users can leave the disk at the default size of 150 GB.
    {% endhint %}
