VMware Cloud Community
admin
Immortal
Immortal

Unable to remove vSwitch via Service Console or VI Client

I have a vSwitch that is broken, it was created via a scripted install gone wrong, but I am unable to delete it via the VI Client, see image 1 then 2.

the output of esxcfg-vSwitch -l is in the test file, any ideas how to manually edit a vSwitch to go please or is there a force command.

0 Kudos
6 Replies
mrovide
Enthusiast
Enthusiast

Hi,

As the automated install gone wrong, have you tried to reboot the Virtual Center by any chance ?

Maybe the vSwitch was added in a conf file and now it's like an "orphan for the Virtual Center

0 Kudos
Rob_Bohmann1
Expert
Expert

Have you tried restarting the hostd and vpxa processes on the host to see if it is just a display issue in VirtualCenter?

Do you see the vswitch when you point your client directly at the host?

What is the output of listing the virtual switches in the service console? esxcfg-vswitch -l

That message sounds like something was not completely cleaned up when you tried to remove it.

0 Kudos
casselc
Enthusiast
Enthusiast

You might check the esx.conf file for a /net/vswitch/child entity that looks suspicious (has no name property set, etc) and remove all related entries after making a backup of the file. Then run vmware-vim-cmd hostsvc/net/refresh or refresh networking from the VIC.

0 Kudos
SelvaMK
Enthusiast
Enthusiast

Hi,

I was wondering if you could give me the output of the following commands:

  1. esxcfg-nics -l ---> to ensure that the nics are loaded and after your script went wrong, no two switches are of same uplinks.

  2. esxcfg-vswitch -L vmnic1 64 --> just to note down the error in console

#esxcfg-vswitch -L vmnic2 64

#esxcfg-vswitch -U vmnic3 vSwitch0

#esxcfg-vswitch -L vmnic3 vSwitch0 --> Since we are sure that vmnic3 is still connected to vSwitch0, we will try to remove it and connect it to vSwitch0

- Selva

0 Kudos
Mllii
Enthusiast
Enthusiast

I am having the same issue as the OP but all my nics are attached to the broken vswitch?

I really do not want to rebuild this host. is there any one who has fixed this?

I am running ESX 3.5

0 Kudos
Mllii
Enthusiast
Enthusiast

I have fixed this by checking the esx.conf file

the line with the vSwitch name in it had a carriage return in it e.g

/net/vswitch/child[0001]/name = "vSwitch1
" 
/net/vswitch/child[0001]/numports = "1024"

0 Kudos