VMware Cloud Community
1ppInc
Contributor
Contributor
Jump to solution

Can't Remove Host from dvSwitch

Hey There,

I had a dvSwitch with two hosts on it and I'm trying to remove it completely. I was able to remove one of the hosts from the dvSwitch with ease... however, the other one just won't budge.

I recieve an error stating: "Cannot complete a Distributed Virtual Switch operation for one or more host members. DVS operation failed on host2, error during the configuration of the host: DVPort "1421" on DVSwitch "DvsPortset-0" is still in use: got (vim.fault.PlatformConfigFault) exception.

Now... There is no port "1421" on the dvSwitch. All port groups have been removed. "Everything" has been removed from the dvSwitch...

Anyone have any ideas? I'm trying to prevent a reboot at all costs, but if necessary I will take it down late evening.

Thanks!

1 Solution

Accepted Solutions
XavierE
Enthusiast
Enthusiast
Jump to solution

I was getting the same message "The resource 119 is still in use. DVS dvSwitch1 port "119" is still in use on host esx-host port <not-found>" when trying to remove my host from the DVS switch so I went around it by right click on the ESX host and disconnect then I was able to remove the host from the DVS switch

-


If this was helpful please assign points--

View solution in original post

22 Replies
1ppInc
Contributor
Contributor
Jump to solution

when I run esxcfg-vswitch -l I get the following: (you can see that pesky DVPort ID 1421 claims to be in use... How do I get rid of that?)

DVS Name Num Ports Used Ports Configured Ports Uplinks

dvSwitch 256 2 256

DVPort ID In Use Client

1677 0

1421 1

655 0

1000 0

271 0

1545 0

1546 0

1548 0

782 0

1165 0

Reply
0 Kudos
rbos3
Enthusiast
Enthusiast
Jump to solution

Hi 1ppInc,

Have you tried deleting the vDS using CLI? Sometimes there's just something hanging or buggy, leaving crap behind at your ESX server.

I'll be hearing from you!

René

---

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!

---

--- If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks! Visit my blog at http://snowvm.com ---
Reply
0 Kudos
athlon_crazy
Virtuoso
Virtuoso
Jump to solution

You probably managed to remove vDswitch and port group from "vCenter -&gt; Home -&gt; Inventory -&gt; Networking" but I doubt it will automatically remove your existing "virtual port" (vmkernel).

Have you check if anything left behind under "vCenter -&gt; ESX host -&gt; Configuration -&gt; Network -&gt; Distributed Switch -&gt; Managed Adapter?

vcbMC-1.0.6 Beta

vcbMC-1.0.7 Lite

http://www.no-x.org
Reply
0 Kudos
1ppInc
Contributor
Contributor
Jump to solution

rbos3 - I'm not all to familiar with how to remove vDS using the CLI, I was trying to search google but came up empty handed. Any ideas on how I can go about doing that?

athlon_crazy - Under the host config for the vDS it states "No physical adapters from this host are connected to this distributed virtual switch.

As well, before I removed anything, I moved all Service Consoles and vmk's back to the vSwitch0 on each host.

Reply
0 Kudos
1ppInc
Contributor
Contributor
Jump to solution

This is still a problem. For some reason I just can't get it to drop that port.

The dvSwitch will not remove this host...

Guess I will have to schedule some downtime to reboot this ESX host. Any other ideas?

Reply
0 Kudos
alienjoker
Enthusiast
Enthusiast
Jump to solution

Hi 1ppInc,

I experienced the exact same problem, but was able to remove the dvSwitch after I had removed any trace of it from the Virtual Machines. Thoroughly check all your VM network configurations and make sure none of them are still configured to use the "Invalid backing" device which relates to the old dvSwitch you're trying to remove. Until all your VMs on the host have been reconfigured to use a vSwitch, you'll struggle to remove the dvSwitch completely.

Let me know how you get on.

Thanks

Reply
0 Kudos
kopper27
Hot Shot
Hot Shot
Jump to solution

try this using vmware client and log in to that ESX host (root - pass) and try remove the host from its vDS configuration

sometimes vCenter has too much authority and won't let you remove a host just be carefull and if this is a production enviroment move theVMs

Choose Host &gt; Configuration &gt; Networking &gt; Distributed Virtual Switch and click Remove.

1ppInc
Contributor
Contributor
Jump to solution

alienjoker,

I went through all of those VMs on the remaining host... they are all configured to use the local vSwitch. I can't find any hosts set to use the dvSwitch and none claim they are using any ports.

kopper27, I attempted that a few days ago and it wouldn't remove it, Same error.

When I am connected directly to the ESX host, I notice in the recent tasks... every 5 minutes on the second, this message appears: Delete ports - Error during the configuration of the host: Unable to delete DVPort "", for the following reasons:

That's it, no reason.

Any more ideas?

Reply
0 Kudos
1ppInc
Contributor
Contributor
Jump to solution

I tried this too, but it did nothing.

Reply
0 Kudos
1ppInc
Contributor
Contributor
Jump to solution

There must be some sort of way to kill an open port on a vDS, dont you think? I can barely find any documentation on this stuff, like the net-dvs command...

Any other ideas guys. I'm super lost.

Reply
0 Kudos
XavierE
Enthusiast
Enthusiast
Jump to solution

I was getting the same message "The resource 119 is still in use. DVS dvSwitch1 port "119" is still in use on host esx-host port <not-found>" when trying to remove my host from the DVS switch so I went around it by right click on the ESX host and disconnect then I was able to remove the host from the DVS switch

-


If this was helpful please assign points--

microkid
Hot Shot
Hot Shot
Jump to solution

Yes! This helped me too. Disconnected the host and delete the vdswitch. Great!

Reply
0 Kudos
XavierE
Enthusiast
Enthusiast
Jump to solution

Glad to hear it worked for you as well. Let's continue help each other, don't forget to assign points 😃

Reply
0 Kudos
1ppInc
Contributor
Contributor
Jump to solution

Appreciate all of the input and sorry for abandoning the post for a while.

I attempted some of the remedies that everyone submitted and none of them worked for me. I was still unable to remove the dvSwitch regardless of what I did.

I ended up rebooting the host and voila, dvSwitch was able to be removed. I didn't want to get to that step, but it was a last resort effort that needed to be done.

Thanks again for all the input.

1parkplace

Reply
0 Kudos
swiftyb
Contributor
Contributor
Jump to solution

I joined the forums just to say thanks to - you have solved hours of heartache! Thank you very much!!

I had a vSphere host which i disconnected from the vds (host was connected, i removed one port but forgot the other, deleted the .vds data folder from the machine - stupid move) removed the hosts from vcentre then bingo! removed the vds!

Kahlid74
Contributor
Contributor
Jump to solution

I also had this issue however, I was getting an error about "Shadow/Zombie port" in existence. I disconnected the Host and was then able to successfully remove the host from the dvSwitch. When I reconneted the host it gave me two warnings about the host and it not being in the dvSwitch. I removed the host from the vCenter instance and then logged directly into the host.

What was odd then was that the host still thought it was part of the dvSwitch even without being in vCenter. I've rebooted the host but if it's still part of the dvSwitch I'm going to try to forcefully remove it from the CLI.

Update - Once I rebooted the Host, the dvSwitch still showed up but had no ports and was just a grey box. I clicked the remove button and voilla, gone as gone can be. I wonder ifit has something to do with the service console being on a dvSwitch and it's use/integration with vCenter.

Reply
0 Kudos
PeterVG
Contributor
Contributor
Jump to solution

Yeah, disconnecting the host did the trick for me as well. Tnx for the tip !!

Does anybody know if it is possible to remove a host from a dvSwitch via the CLI ?? I've been looking around, but can't seem to find anything on this subject...

Tnx in advance for any help !!

Grtz, Peter

theemax
Contributor
Contributor
Jump to solution

Same here, i had same issue  and what ever i did, would remove "ghost port", even reboot.

Disconnect and reconnect to vCenter did it.

thx Guys!

eMax

Reply
0 Kudos
sg222
Contributor
Contributor
Jump to solution

Hi there,

pretty old thread, but still the one which exactly deals with the problem we have today.

Situation:

4 node esx cluster, running on vsphere 4.1i update 3, build 800380, using vmware HA and vmware drs - fully automated.

vCenter running on version 5.0

Distributed vSwitch with 4 uplinks on each host, running as a 4.1.0 dvSwitch.

Today we tried to evacuate on of our hosts to maintain it tomorrow.

The vCenter scheduled all migrations and suddenly stopped doing anything. We found out, that it tried to migrate 4 vms to the same host (normally no problem), but this host had issues with the distributed switch.

Checking the hosts network settings seems to show normal values, but checking directly connected to the host with vsphere client, the host reported "This host has no physical adapters connected to distributed switch".

This message was weird, as the already running vms were all online.

With vmware support we had to stop vcenter service as it had a lot of issues configuring the dvswitch on the "problem" host. After restart of service at least vcenter was available again and showed, that all tasks concerning vm-migrations were cancelled.

After that we evacuated the problem host and removed all uplinks from the dvswitch. Reboot and connected the vmnics to the dvswitch again.

Still the host could not determine which of his vmnics are connected to the dvswitch. Therefore i removed all uplinks again, disconnected the host from vcenter, removed the host from dvswitch and rebooted it again.

After boot i connected the host again to vcenter. Now the host can determine which uplinks are connected, but it can't determine which portgroups should be availabe on this dvswitch!

I migrated a test-vm to this host and it remained online and reachable, but on the host i see in the vm-settings, checking the portgroup "Invalid Backing" - and i'm connected as root. In advanced settings i can see the correct dvswitch-port, but not the portgroup.

After 1 h the host got the right port-group showing up in network settings, dvswitch section. So i migrated some other vms to it, vms of other portgroups. But now, after finally 2 more hours the host still can't determine the new (and used) portgroups, but the vms are online.

Does someone has an idea on that?

Our vCenter does not see any problems, but i think all hosts should see their right network-settings. All other hosts in that cluster see correct data.

Attachements:

invalid_backing_host.jpg

a look on vm-settings directly connected to the problem esxi host

vcenter_information.jpg

a look on vm-settings on vcenter

Reply
0 Kudos