VMware Cloud Community
Filip_nagata
Contributor
Contributor

How to delete a distributed switch?

Hi, In ESX 7.0.2, I've got a VDS that I can't seem to cleanup. This is the output from "esxcfg-vswitch -l":

DVS Name Num Ports Used Ports Configured Ports MTU Uplinks
DSwitch 11776 1 512 1500

DVPort ID       In Use Client
0               0
1               0
2               0
3               0
4               0
13              0
12              0
h-1             0

Various attempts to do "something":

[root@] esxcfg-vswitch -d DSwitch
Not a valid virtual switch or it is a DVSwitch: DSwitch
[root@] esxcfg-vswitch -d --dvswitch DSwitch
Not a valid virtual switch or it is a DVSwitch: DSwitch
[root@] esxcfg-vswitch -d -v 0 DSwitch
Error, only one command can be performed at a time.
[root@] esxcfg-vswitch -d -v 0 -s DSwitch
Error, only one command can be performed at a time.

Every command combination I've found on the web simply fails for one reason or another. All of the uplinks and users of the vDS have been removed via the CLI but the switch itself is another story.

Clues?

Reply
0 Kudos
7 Replies
alantz
Enthusiast
Enthusiast

From the vcsa (vsphere web client) you would typically remove the host from the DVS, not command line from the cli from the host. I'm sure there is a way to do it command line, but I just use the GUI.

--Alan--

 

 

 

Reply
0 Kudos
Filip_nagata
Contributor
Contributor

That would require that the vDS was visible in the web front end - it isn't.

Reply
0 Kudos
andespoint
Contributor
Contributor

Reply
0 Kudos
Filip_nagata
Contributor
Contributor

No, it does not, because as I said in the previous post, the distributed switch is not visible from the web client.

Reply
0 Kudos
a_p_
Leadership
Leadership

Only a guess.
Does one of your VMs have active snapshots from a state, when it was connected to a port group on that vSwitch?

André

Reply
0 Kudos
alantz
Enthusiast
Enthusiast

service network restart 

to cleanup that which is wrong with networking ?  

--Alan--

 

Reply
0 Kudos
Filip_nagata
Contributor
Contributor

The solution I ended up using was just to reinstall the host as there were no VMs running on it.

Reply
0 Kudos