Using Custom Ansible with VIO5 to replace T0 router

I think there is a rite of passage where all NSX administrators delete their T0 Router. While this is a faux pas and you shouldn’t do this, in reality it happens. I deleted our T0 router in a somewhat serious production environment. This was underpinned by VMware Integrated OpenStack. When I created the new T0 router, the UUID was no longer matching what VIO expected. When VIO service restarted via upgrade, power cycle, et el, it would fail to start neutron services as it could find the T0 router with the old UUID. Deep within the database and configuration of VIO it harboured a long lost knowledge of a T0 router long forgotten!

This blog will show you how to update the deployment with the correct T0 router ID using custom properties.

On the VIO OMS server create the custom.yml file under /opt/vmware/vio/custom/ folder. Place nsxv3_default_tier0_router: in and add the UUID value for the current T0 router. The file should look like below:

  [email protected]:~$ cat  /opt/vmware/vio/custom/custom.yml
nsxv3_default_tier0_router: 1663d49a-59cf-41ca-9480-65ee753d9991

Once done you will need to run `viocli deployment configure’. This will reconfigure your deployment and scoop up the customisation you’ve made. In this case, my new T0 router UUID.

  [email protected]:/var/lib/vio/ansible/custom$ sudo viocli deployment configure
Using Customization file /opt/vmware/vio/custom/custom.yml
Customization data:

{nsxv3_default_tier0_router: 1663d49a-59cf-41ca-9480-65ee753d9991}

Configuring deployment VIO5...
[100 %] [###################################################]
Success: Completed configuration.
Configuring post deployment VIO5...
[100 %] [###################################################]
Success: Completed post deployment configuration.
Running custom playbook for deployment VIO5...

This takes about 20 minutes. Once it is done your environment has been saved from rampart clicking and the old chaos Burkey!

Leave a Reply

Your email address will not be published. Required fields are marked *

*