Unable to Remove Host from vSphere Distributed Switch (The resource ‘105’ is in use)


We were performing the migration to new Distributed Switches (running a later version) ready for our vCenter 7.x and ESXi 7.x upgrade and when attempting to remove a host from a distributed switch we got this error:

The resource '105' is in use.
vDS DSwitch port 105 is still on host esxiserver1 connected to < none > nic=4000 type=vmVnic

VMware has an article KB76959 that describes this issue, however in our case rather than the VM (or template) name being shown in the error string making it obvious where to look to resolve the issue, we saw < none >.

It would appear that somehow a template got removed but its inventory item still remained within vCenter, so the template itself is gone but the connection of this template to a Distributed Switch port still remained.

Luckily the following steps allowed us to successfully detach the phantom template from the Distributed Switch and therefore remove the Distributed Switch from the host.


Let’s say within your error message above it is showing port 590 on the Port Group 1, then this is the group and port with a problem. Essentially the Distributed Switch database is out of synch with reality.

You’ll also see because the template has been removed there is nothing shown in the “Connectee” column, if your problem template or VM is listed in that column, this makes things easier, you can go and disconnect the VM NIC port, and/or power it on and vMotion it between a couple of ESXi hosts to force it to resync the port status.

However in our case performing the below steps resolved the issue. Once the “Auto-Refresh” is switched “on” for the port, you’ll notice in the task list loads of messages showing it refreshing the information.

Leave it running for around 15-30 seconds (this was all that was needed in my case) and then switch “Auto-Refresh” to off.

Now attempt to remove the Host from the Distributed Switch again and hopefully it should be successful.




Image Attribution

Leave a Reply

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