The NSX Agent installation script provides configurable options. This table lists these options.

NSX Agent Install Script Options for Windows VMs

Table 1.

Option

Description

-gateway <ip|dns>

NSX public cloud gateway IP or DNS name.

Specify this option if you want to use an IP address for the PCG. The default DNS name of the PCG is nsx-gw.vmware.local which is used if this parameter is not specified.

-noStart true

You can create an AMI of the VM after the NSX agent is installed on it. Run the install script with this option. Then from the AWS console, create an AMI of this VM.

-downloadPath <path>

This is the path to the directory in which the files should be downloaded. If the path includes escape characters, enclose them in single quotation marks.

Default = %temp%

-silentInstall <true/false>

If this is set to true, the script runs a silent installation.

Default is false

-noSigCheck <true/false>

This allows you to specify whether to check the signatures on the binaries or not.

Default = false

-logLevel <value>

This allows you to specify the log level for NSX components

Default = 1

Verbose = 3

-operation <install/uninstall>

This allows you to specify the operation to perform: install or uninstall

Default = install

-bundlePath <path>

This allows you to specify the local path to the NSX VM agent bundle

Default option is to download the bundle from PCG.

Uninstalling NSX agent from a Windows VM

  1. Remote log in to the VM using RDP.

  2. Run the installation script with the uninstall option:

    \nsx_install.ps1  -operation uninstall

NSX Agent Install Script Options for Linux VMs

Table 2.

Option

Description

--gateway <ip|dns>

NSX public cloud gateway IP or DNS name.

Specify this option if you want to use an IP address for the PCG. The default DNS name of the PCG is nsx-gw.vmware.local which is used if this parameter is not specified.

--no-start

You can create an AMI of the VM after the NSX agent is installed on it. Run the install script with this option. Then from the AWS console, create an AMI of this VM.

Uninstalling NSX agent from a Linux VM

Remote log in as root and run the following commands on the VM:

Note:

To log in to a VM in overlay mode using SSH, use port 8888.

  1. Stop NSX services:

    service nsx-agent stop
    service nsx-agent clear-everything
    Note:

    In overlay mode, SSH connection will be lost. Log in to the VM again to complete the uninstallation.

  2. Uninstall packages:

    apt-get -y purge libgoogle-glog0
    apt-get -y purge libjson-spirit
    apt-get -y purge nicira-ovs-hypervisor-node
    apt-get -y purge nsx-agent-public-cloud
    apt-get -y purge nsx-aggservice
    apt-get -y purge nsx-host-public-cloud
    apt-get -y purge nsx-logical-exporter public-cloud
    apt-get -y purge nsx-public-cloud-vm-cli
    apt-get -y purge openvswitch-common
    apt-get -y purge openvswitch-datapath-dkms
    apt-get -y purge openvswitch-pki
    apt-get -y purge openvswitch-switch
    apt-get -y purge python-openvswitchVerify 
  3. Clear configurations and dependencies:

    apt-get -y autoremove
    apt-get -y autoclean
    apt-get -y clean
    
  4. Clean up directories:

    rm -rf /config/vmware
    rm -rf /etc/vmware
    rm -rf /opt/vmware
    rm -rf /run/vmware
    rm -rf /var/log/vmware
    rm -rf /var/vmware
  5. Go to the VM in the AWS console and remove the nsx:network tag from the VM or interface.