VMware vSphere

 View Only
Expand all | Collapse all

Can't Remove Host from dvSwitch

  • 1.  Can't Remove Host from dvSwitch

    Posted Oct 22, 2009 11:21 PM

    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!



  • 2.  RE: Can't Remove Host from dvSwitch

    Posted Oct 23, 2009 12:51 AM

    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



  • 3.  RE: Can't Remove Host from dvSwitch

    Posted Oct 23, 2009 06:52 AM

    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!

    ---



  • 4.  RE: Can't Remove Host from dvSwitch

    Posted Oct 23, 2009 02:59 PM

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

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

    vcbMC-1.0.6 Beta

    vcbMC-1.0.7 Lite



  • 5.  RE: Can't Remove Host from dvSwitch

    Posted Oct 23, 2009 05:25 PM

    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.



  • 6.  RE: Can't Remove Host from dvSwitch

    Posted Oct 30, 2009 05:56 PM

    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?



  • 7.  RE: Can't Remove Host from dvSwitch

    Posted Nov 06, 2009 12:51 PM

    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



  • 8.  RE: Can't Remove Host from dvSwitch

    Posted Nov 06, 2009 02:52 PM

    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 > Configuration > Networking > Distributed Virtual Switch and click Remove.



  • 9.  RE: Can't Remove Host from dvSwitch

    Posted Nov 06, 2009 06:35 PM

    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?



  • 10.  RE: Can't Remove Host from dvSwitch

    Posted Nov 06, 2009 07:05 PM

    I tried this too, but it did nothing.



  • 11.  RE: Can't Remove Host from dvSwitch

    Posted Nov 09, 2009 10:04 PM

    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.



  • 12.  RE: Can't Remove Host from dvSwitch
    Best Answer

    Posted Nov 25, 2009 05:38 PM

    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--



  • 13.  RE: Can't Remove Host from dvSwitch

    Posted Dec 14, 2009 01:29 PM

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



  • 14.  RE: Can't Remove Host from dvSwitch

    Posted Dec 14, 2009 01:38 PM

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



  • 15.  RE: Can't Remove Host from dvSwitch

    Posted Apr 01, 2010 10:38 AM

    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!



  • 16.  RE: Can't Remove Host from dvSwitch

    Posted Jun 08, 2010 01:56 PM

    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.



  • 17.  RE: Can't Remove Host from dvSwitch

    Posted May 21, 2018 06:39 PM

    After spending the last two hours trying to gracefully remove a host from a vDS this is what did the trick.



  • 18.  RE: Can't Remove Host from dvSwitch

    Posted Apr 25, 2019 01:50 PM

    Very helpful. Thanks for this.

    One note, we actually had to delete the vmkernel adapter on that dvswitch, disconnect host, reconnect host, and then hit remove on the dvswitch again (still receiving error), and then it just fell off.

    After that we were able to add the dvswitch back to the host.



  • 19.  RE: Can't Remove Host from dvSwitch

    Posted Dec 14, 2009 05:04 PM

    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



  • 20.  RE: Can't Remove Host from dvSwitch

    Posted Nov 05, 2010 01:41 PM

    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



  • 21.  RE: Can't Remove Host from dvSwitch

    Posted Jan 07, 2011 06:33 PM

    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



  • 22.  RE: Can't Remove Host from dvSwitch

    Posted Dec 05, 2012 04:27 PM

    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



  • 23.  RE: Can't Remove Host from dvSwitch

    Posted Dec 05, 2012 04:53 PM

    Update:

    Dumb "trick":

    I migrated vms to the problem host. The host did not get the right port groups of these vms and showed "invalid backing" and no portgroup available in drop down (vm-settings) on host.

    To update the host i had to use the vcenter:

    - open settings of a vm already running on problem host

    - select the network card

    - open the drop down to select the portgroup and select the correct portgroup (again, as it was already active) !

    - vcenter marks this as a change in configuration and "deploys" the new config to the underlying host

    result:

    - the problem host was now aware of all portgroups which i reactivated in vm-settings and showed up the right dvswitch-settings. I had to repeat the process for one vm in each portgroup (not all vms) and after that - all vms were shown up right!

    dumb, but worked fine for me... damn dvswitch.

    new update: the problem host knew that he has a distributed vswitch, and it worked all fine, all vms were online. But it did not get the whole list of portgroups of the dvswitch from vcenter. The vcenter did not push the whole configuration onto the esx host.

    I had to migrate one vm out of each portgroup onto the problem host and repeat the procedure in vcenter - confirming its portgroup by reselecting it and confirm config clicking ok. After that the vcenter pushed the portgroup to the problem host. That dvswitch still has a lot of issues concerning vcenter connectivity.