VMware NSX – Unable to delete NSX logical switch due to VMware View replica virtual machines

Last week I encountered a situation in the Nubera demo environment where I had to delete a NSX logical switch. Before you can delete the logical switch, it is required that it is not used anymore. This means no virtual machines, distributed logical routers interfaces or edge interfaces can be connected to it anymore.

In general this does not pose a problem. However in the Nubera demo environment we have a running VMware Horizon View instance with a linked clone pool and therefore replica virtual machines. One of these replica virtual machines was connected to the ‘to be deleted’ switch.

The problem

Changing the network interface of the VMware View replica virtual machine seemed trivial. Just go to the settings of the VM and connect the network interface to another logical switch, right? Since I was busy with VMware NSX, I was logged in on the vSphere web client. When I successfully located the replica, I noticed that I was not able to edit the settings of the replica.

vsphere web client vcenter

Unable to edit replica settings via the vSphere web client

This was a problem. Since I did not wanted to dig into the VMware View installation, I decided to check the ‘normal’ vSphere C# client and so I connected it to vCenter. Unfortunately the result was the same: I was not able to edit the settings of the replica virtual machine. This was a setback since it blocked me from removing my unneeded switch.

vsphere client vcenter

Unable to edit replica settings via the vSphere C# client

The solution

I was a bit reluctant to go to the VMware View installation and remove View pool corresponding to the replica VM. This however would solve my problem since this would get rid of the replica and free my logical switch.

Before going this route, I decided to connect the vSphere C# client directly to the ESXi host on which the replica virtual machine resides. To my great joy I was able to edit the settings of the replica VM and connect the network interface to another switch.

vsphere client works

Replica settings can be edited when the vSphere C# client is directly connected to the ESXi host

Conclusion

Connecting the network interface of a VMware View replica virtual machine to another logical switch is possible when you connect directly to the corresponding ESXi (using a vSphere C# client) and edit the settings of the replica.

yannickstruyf