Please pardon the late response. Just adding breadcrumbs for anyone who came across this problem.
Need access to CLI or the host.
#List the switches
esxcfg-vswitch -l
#Delete the uplink first
esxcfg-vswitch --del-dvp-uplink=vmnic1 --dvp=<dv_port_id> <dvs_name>
#Delete the dvs
net-dvs -d <dvs_name>
# Destroy the port set
vsish -e set /net/portsets/DvsPortset-X/destroy destroy
# Delete DB of any dvs
rm -f /etc/vmware/dvsdata.db
# Reboot
reboot
Original Message:
Sent: Jan 15, 2022 10:53 AM
From: Filip_nagata
Subject: 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?