For NSX Data Center for vSphere deployments, you can enable HA for NSX Edge nodes and specify host groups in which the nodes will be placed.

Prerequisites

  • Verify that your edge cluster has at least two hosts. If not, you might receive an anti-affinity error.

  • If you want to specify edge host groups, create and configure the host groups in vSphere.

Procedure

  1. Log in to the OpenStack Management Server as viouser.
  2. If your deployment is not using a custom.yml file, copy the template custom.yml file to the /opt/vmware/vio/custom directory.
    sudo mkdir -p /opt/vmware/vio/custom
    sudo cp /var/lib/vio/ansible/custom/custom.yml.sample /opt/vmware/vio/custom/custom.yml
  3. Open the /opt/vmware/vio/custom/custom.yml file in a text editor.
  4. Uncomment the nsxv_edge_ha parameter and set its value to True.
  5. If you want to use edge host groups, uncomment the nsxv_edge_host_groups parameter and set its value to the two edge host groups that you created, separated by a comma (,).
  6. Deploy the updated configuration.
    sudo viocli deployment configure

    Deploying the configuration briefly interrupts OpenStack services.

  7. Log in to the controller node as viouser.
  8. If you specified host groups, update your environment to include them.
    sudo -u neutron nsxadmin -o nsx-update -r edges --property hostgroup=all
  9. If your environment already includes NSX Edge nodes, enable HA on those nodes and migrate them to the specified host groups.
    1. Enable high availability on each existing NSX Edge node.
      sudo -u neutron nsxadmin -r edges -o nsx-update --property highAvailability=True --property edge-id=edge-node-id

      To find the ID of an NSX Edge node, you can run the sudo -u neutron nsxadmin -r edges -o nsx-list command.

    2. Migrate all existing edge nodes to the specified host groups.
      sudo -u neutron nsxadmin -r edges -o nsx-update --property hostgroup=all

      If you want to migrate only specific edge nodes, you can use the following command:

      sudo -u neutron nsxadmin -o nsx-update -r edges -p edge-id=edge-node-id -p hostgroup=True

Results

Edge HA is enabled for the desired nodes. If you specified edge host groups, current and future edge nodes are created in those groups.

What to do next

You can update the edge host groups in custom.yml after the original configuration. After deploying custom.yml, run the following commands to update the environment:

sudo -u neutron nsxadmin -o nsx-update -r edges --property hostgroup=clean
sudo -u neutron nsxadmin -o nsx-update -r edges --property hostgroup=all

Then perform Step 9 again to migrate edge nodes to the new host groups.