You can generate an AMI of a VM with the NSX agent installed on it.

About this task

There are two ways in which you can generate an AMI of a VM with the NSX agent installed on it:

Option 1: You can generate AMIs from a VM that has the NSX agent installed on it but not configured. You can use an install script option to set up this VM for AMI-generation.

Option 2: You can also remove configurations from a VM that has been previously configured, in order to generate AMIs using it.

Procedure

  1. By using an install script option while installing the NSX agent on the VM:
    1. Enter the following command:
      • On a Windows VM:

        .\nsx_install.ps1 –noStart true
      • On an Ubuntu VM:

        sudo 
        ./install_nsx_vm_agent.sh –-no-start
    2. Go to this VM in AWS and create an AMI.
  2. By removing NSX agent configurations from a Windows or Linux VM to enable AMI generation:
    1. Open the NSX-T CLI: sudo nsxcli
    2. Enter the following commands: hostname> set debug
      • hostname> set debug
        hostname> clear nsx-vm-agent state
        
    3. Go to this VM in AWS and create an AMI.

What to do next