Cannot remove hosts to dvSwitch

Hey there,

I got a dvSwitch with two hosts on that and I'm trying to remove it completely.  I managed to remove one of the hosts of the dvSwitch with ease... However, a fair didn't budge.

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

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

Anyone have any ideas?  I try to avoid a reboot at all costs, but if necessary, I'll take it down late at night.

Thank you!

I was getting the same message "the 119 resource is still in use.  DVS dvSwitch1 "119" port is still in use oucederomsurlesecondport host-host esx "when trying to extract my host of the DVS switch so I went around to it by right-clicking on the ESX host and disconnect then I was able to clear the host of the DVS switch

-

Tags: VMware

Similar Questions

  • Remove host vmnic

    I'm trying to remove a vmnic leave a host, and the PowerCLI Cmdlets reference looks like it gives me the wrong information: www.vmware.com/support/developer/PowerCLI/PowerCLI41/html/Remove-VMHostNetworkAdapter.html

    Here is what I tried:

    $network = get-vmhostnetworkadapter - vmhost Host1-name vmnic7

    Delete-VMHostNetworkAdapter - nic $network

    Cannot bind parameter 'Nic '. Could not convert the value of 'vmnic7' of type ' VMware.» VimAutomation.ViCore.Impl.V1.Host.Networking.Nic.PhysicalNicImpl' type 'VMware.VimAutomation.ViCore.Types.V1.Host.Networking. Nic.HostVirtualNic'.

    I also tried:

    $network = get-vmhostnetwork - vmhost Host1

    delete vmhostnetworkadapter nic - $network.virtualnic [7]

    Unable to validate the argument on the parameter "Nic".  The argument is null or empty.

    Any ideas?

    It can be done, just requires little code.

    Try the following, it is based on the code in dvSwitch messages.

    function Get-dvSwitch {
      param([parameter(Position = 0, Mandatory = $true)][string]$DatacenterName,    [parameter(Position = 1, Mandatory = $true)][string]$dvSwitchName)
    
      function Get-dvSwitchInThisLocation {
        param(
          [parameter(Position = 0, Mandatory = $true)]
          [VMware.Vim.ManagedObjectReference]$LocationMoRef,      [parameter(Position = 1, Mandatory = $true)][string]$dvSwitchName    )
    
        $location = Get-View $LocationMoRef    foreach($child in $location.ChildEntity){
          if($child.Type -eq "Folder"){
            Get-dvSwitchInThisLocation $child $dvSwitchName      }
          elseif($child.Type -eq "VmwareDistributedVirtualSwitch"){
            $temp = Get-View $child        if($temp.Name -eq $dvSwitchName){
              $temp        }
          }
        }
      }
      Get-dvSwitchInThisLocation (Get-Datacenter $DatacenterName).Extensiondata.NetworkFolder $dvSwitchName}
    
    function Remove-dvSwHostNic {
      param($dvSwitch, $hostMoRef, $pnic)
    
      $spec = New-Object VMware.Vim.DVSConfigSpec  $tgthost = New-Object VMware.Vim.DistributedVirtualSwitchHostMemberConfigSpec  $tgthost.Host = $hostMoRef  $currentBacking = ($dvSwitch.Config.Host | where {$_.Config.Host -eq [string]$hostMoRef}).Config.Backing  $tgthost.operation = "edit"  $tgthost.backing = New-Object VMware.Vim.DistributedVirtualSwitchHostMemberPnicBacking  $tgthost.Backing.PnicSpec = $currentBacking.PnicSpec | where {$_.PnicDevice -ne $pnic}
      $spec.Host = $tgthost  $dvSwitch.UpdateViewData()
      $spec.ConfigVersion = $dvSwitch.Config.ConfigVersion
      $taskMoRef = $dvSwitch.ReconfigureDvs_Task($spec)
      $task = Get-View $taskMoRef  while("running","queued" -contains $task.Info.State){
        $task.UpdateViewData("Info")
      }
    }
    
    $esxName = "MyEsx" $dcName = "MyDatacenter" $dvSwName = "dvSw1" $removepnicName = "vmnic3"
    $esx = Get-VMHost -Name $esxName
    $dvSw = Get-dvSwitch -datacenter $dcName -dvswitchname $dvSwName Remove-dvSwHostNic -dvSwitch $dvSw -hostMoRef $esx.ExtensionData.MoRef -pnic $removepnicName
    

    The code is a dirty thing, but it works in my test environment.

    Provide the name of ESX (i), the name of the data center, the name of the dvSwitch and Teddy that you want to remove.

    I'll add this function Remove-dvSwHostNic to my collection.

  • Cannot retrieve host associated with a substituent VMs

    Hi guys.

    This is my setup:

    vSphere 5.1

    Main site (Production)

    Cluster, 7 guests.

    Compellent primary storage (with the Manager of the own company compellent).

    vCenter own VM

    a few replicant vms (with a server of domain names).

    Secondary site (remote)

    Cluster, 3 guests

    Secondary Compellent storage (with the Manager of the own company compellent).

    vCenter own VM.

    VM site recovery manager.

    No domain name server.

    So, when I test the recovery plan is working perfectly. Yesterday, I tried an exercise in failure:

    1 - Disconect link between the Production Site and the remote location.

    2. - connect my laptop in the Remote Site lan.

    3. - connect the vSphere Client in vCenter Secondary Site.

    4 - action for run for the stimulus plan.

    but fails when try to power of virtual machines. Error:

    Error: Cannot retrieve host associated with a substituent VMs. The connection to the remote server is down.

    There is something wrong with my setup, but why? I do not know. I check and rechek but I don't see the wrong configuration.

    Plese help. Any suggestion will be appreciated.

    Another question.

    My direct area on Site of Production secondary and primary servers. Is good practice developed a third active area living in a Remote Site Server?

    Greetings.

    Reason: this problem may occur if a virtual machine with the same name as the virtual computer space reserved already exists in inventory of vCenter Site Recovery SRM.

    To resolve this problem, try one of these options and make sure that there is no conflict of virtual machine name:

    1. change the name of the virtual machine that requires the protection of the protected Site.

    2 If the virtual machine on the recovering Site is necessary, change the name of the virtual machine for recovery Site.

    3. If the virtual machine on the recovering Site is not necessary (perhaps because it's an old placeholder virtual machine or a virtual machine created by mistake), remove the virtual machine from the inventory.

  • Cannot remove data VMDK file store

    Hello

    I tried to solve a problem where we can't delete the 2 files hard below (since a ls - la in ssh)

    -rw - 1 root root 262144 Jul 31 13:55 2010 - 10 a-000001 - delta.vmdk
    -rw - 1 root root 133711265792 Jul 31 13:55 2010-10A - s001.vmdk

    I tried a rm without success:

    The virtual machine is more listed in VCentre (I tried to delete data store manager), I believe that files can be locked for a reason, but I don't know enough to determine whether it is safe to kill the s pid which seem to use the folder:

    [MS root@ESX1 server demo disk] # lsof | grep 'Disc of demo of MS Server'
    disc of demo server lsof 1317 root cwd DIR 0,18 560/vmfs/volumes/4fb703b6-bb64840f-e817-02215eccbdbb/MS 21592
    disc of demo server grep 1318 root cwd DIR 0,18 560/vmfs/volumes/4fb703b6-bb64840f-e817-02215eccbdbb/MS 21592
    disc of demo server lsof 1319 root cwd DIR 0,18 560/vmfs/volumes/4fb703b6-bb64840f-e817-02215eccbdbb/MS 21592
    bash 16678 disc of demo server root cwd DIR 0,18 560/vmfs/volumes/4fb703b6-bb64840f-e817-02215eccbdbb/MS 21592

    No results appear if I lsof files themselves.

    I can kill these processes? I have not the option to restart the server.

    I've also seen mention of restart /sbin/servicesservices. SH , but I'm hesitant because I don't know what this will do - how does affect other virtual machines running?

    I'm running ESX 4.0.0 208167 (according to VCentre) and I watched as a result of discussions among others:

    http://communities.VMware.com/message/2037529

    http://communities.VMware.com/thread/126894

    http://communities.VMware.com/thread/246141

    http://KB.VMware.com/selfservice/microsites/search.do?language=en_US & cmd = displayKC & externalId = 10051


    Any help is greatly appreciated


    [MS root@ESX1 server demo disk] # rm - rf 2010-10A - 000001 - delta.vmdk
    RM: cannot remove "2010-10A - 000001 - delta.vmdk': device or resource busy"

    I've also seen mention of restart /sbin/servicesservices. SH , but I'm hesitant because I don't know what this will do - how does affect other virtual machines running?

    You can restart the services... There will be no impact to the VMS running... also try to restart VMware vCenter services (services.msc)

    If the above does not work, then restart the host seems to be the fastest and the most secure option.

  • Cannot remove Datastore ESX 3.5

    Hi ESX veterans.

    I am a novice using ESX, and lately I just install ESX on a new Dell server, with 6 x 450 GB configured in a Raid 5 environment. I realized that once the ESX is complete, and VI client infrastructure is installed, there will be a default data store created using all available space with a block size of 1 MB.  In the latest installation of couple on older servers (which worked well), I simply remove the data store and to recreate another large block data store, so I can do a greater volume to install my OS.  But this time, I get this error:

    Configuring the host error: DestroyVmfsDatastore: cannot remove partition 2 on lun vmhba1:0:0

    I tried looked up the forums, but none seemed suggestion a resolution in my case.  (perhaps of persons using a SAN... etc, but the mine are internal HD from the server).  Some said that to do a re-scan, some have said go to maintenance mode, some said re - install all the ESX Server, which I've tried all.  But just can not remove this data store.  Acutally, I have not "mind leaving this one data store, as long as I can create a volume larger than 256 GB it contains.  Can anyone give me any suggestions?  Thank you.

    WingKChan

    Hello Wingchan,

    I don't think so that you can delete the partition your ESX Server, which is the more necessary to partition VMFS. You can delete when you have several stored VMFS mounted on your ESX. I'm assuming that the... but not sure.

    However, since you have to change the size of the block. You can try the VMFSKTOOLS command to change the size of the block. Remember that you will lose all the systems of comments that uses this data store. Please move them to the secure location if necessary.

    I put a link here to how to change the size of the block. (not my blog, obtained through Google)

    http://techblog357.blogspot.com/2008/01/ESX-Server-35-general-system-error.html

    To run this command, you must take the ESX Server console.

    Thank you

    Shan

  • Cannot remove an e-mail account - no under account settings removal tool

    Use Thunderbird 24.5.0. Not having only not under one account choice account delete option. I tried to delete an e-mail account, but cannot remove or delete it. I read your solution but no delete option in the drop-down list in the account settings. help lease

    How about you go to the Tools menu > modules and disabling the add-on!

    Not that I can find a "manually change the files' on the site of the add-on.

    I can find a manually records sort that does exactly what it says, but does not add and the columns you show. I can also find "additional folder columns" which aims to give your comments headers. The page Add on like the third picture shows a right click option or click to turn on the power on and off columns.

  • Cannot remove the ghost folder. Error message: there is no such mailbox

    When I configure Thunderbird to connect to my Alpine Webmail, I had to rearrange my folders. Cannot remove a folder titled "mail" because according to TB "there is no such mailbox" but still shows on the tab my folders. I read through the previous discussions and have tried to unsubscribe the ghost folder, but that did not work or the other. I have a Mac OSX if this affects what it is. Please let me know if you have any suggestions. Thank you.

    Hello world. I solved the problem... somehow. By removing the account of Treasury Board and put in place again, TB has been able to sync with the files that were on Alpine. The ghost folder still presented (despite not existing not not on the Alpine site), but by changing the directory to the IMAP server of "mail" to "mailbox" the ghost folder disappeared. I found myself with records who have been named oddly (most likely due to the change of the name of directory) so when I changed the IMAP server directory to "mail" it reset my files with the way they were, with the exception of the ghost folder, that was no longer there. I'm not entirely sure why it worked, but in case someone else has a similar problem, I recommend to give it a try.

    Thank you all for your comments and help.

  • Cannot remove the flash drive obsolete no matter what I do

    Have tried everything told to do but still support cannot remove the obsolete shock wave. the file is not on my computer. also when I put never activate it does for the latest version. How can I remove what it is causing crashes because the 2 versions

    Hello, please type Subject: plugins in the address bar - it should list all the available plugins, including their location on the file system.

  • Cannot remove syncing videos to the iPhone (hroniz) ed from iTunes?

    Hello.

    After to tell iTunes to sync my very old Windows Update (hronize)

    HDD XP Pro SP3 on my iPhone 4 (iOS v9.3.1), I noticed the video iPhone

    Cannot remove copies. Is it normal? I wanted to delete his

    copy to free disk space after watching them.

    Thank you in advance.

    You must connect your phone to your computer and the unsync.

  • I have kernel_task, in my mac pro book, I can see it in the activity monitor is but cannot remove ' tried everythin... I'm lost now... Please help

    I have kernel_task, in my mac pro book, I can see it in the activity monitor is but cannot remove ' tried everythin... I'm lost now... Please help

    Tried force quit.

    What happened to restart? When you restart your mac, the process begins again.

    Another option is abandonment of the process with the terminal. Just search in google for it.

  • Cannot remove iCloud backup of my old iphone

    I upgraded from an iPhone 4 to a 6 s iPhone yesterday. Activation and downloading my settings and applications from the iCloud went perfectly. I am now trying to delete the backup of the iPhone 4 on the iCloud, so I can have enough space to save my iPhone 6 s. I get a message, "this backup cannot remove because it is in use". Any suggestions?

    Hi Poppabear5,

    Congratulations on your new iPhone 6 s! I understand that you have a problem with deleting your iPhone upward iCloud. Let's see if we can understand what is happening.

    The type of message you see, looks like your iPhone 6s is not made backup upward. The best way to confirm this is to see if it is possible to make a backup with your iPhone 6s and see if Yes see a message in the sense of "this iPhone is currently being restored and will back up automatically when it's done.". If this is the case, then you want to wait for the restore before you delete the backup. Another thing to think about is if you still have your iPhone 4, make sure it is not turned on and backup. It would be considered in service as well.

    iCloud: alert messages of understanding when restoring a backup to iCloud
    https://support.Apple.com/en-us/HT203756

    Nice day

  • Novice... need a simple program to open all my doc. & post pdf file in my documents. Just upgded. for Win7, accidentally chose Win Media Cntr. don't want that & cannot remove it. Answers, thanks, Russell.

    Tech file transferred my documents to an open 500 Gig HD could not all files. Continued w/Win med Cntr. program, I accidentally chose to open my files. Cannot remove Win Med. CNTR... How?

    Hi, Russell,.

    Right-click on the file and select open with

    Select Choose program to choose the program you want to open the file

    . Doc is an extension that is associated with the Microsoft Word application

    . PDF is an extension associated with Adobe Reader

    How can I change this program opens a specific file in Windows (applies to Windows 7)

    http://www.FileInfo.com/help/windows_change_program

  • Cannot remove ilivid Control Panel and can not find any place to contact them - how to remove?

    Cannot remove Livid - Bando media using Control Panel - is there a free way to remove from the computer? cannot contact seems they don't want inquires

    Hello NickStoneburgh,

    What exactly you are trying to remove from Control Panel?  I am also having a difficulty finding a support contact for the media of Bando, but when you do a Bing search, I see others with the same question.

    When this software did get installed on your computer?  Have you installed any other software, and it has also been included?  If you can perform a system restore to a time before having this software.

    I don't know what operating system you use but have added a few links below.

    Windows 7 system restore

    What is system restore? Windows Vista

    Thank you

    James

  • Found the names not allowed on my contacts Hotmail list and cannot remove them (they do NOT appear when I look at 'Contacts')

    Found not authorized names on my Hotmail Contact list and cannot remove them (they do NOT appear when I look at 'Contacts'), but are present if I send a new email by clicking on the button 'A' and selecting 'all '. Any suggestions on how to remove the unauthorized names?

    Submit all Hotmail queries on the forum right here:

    Windows Live Solution Center
    http://windowslivehelp.com/

  • Cannot remove any Dungeon now bytes not used to message cannot find C:\windows\system 32------rundll 32 exe

    Original title: t hink I deleted add remove program,.

    t hink I deleted add remove program, computer guard me tellin memory full, cannot remove no matter what now bytes unused Dungeon is message cannot find C:\windows\system 32------rundll 32. exe does anyone know what this means and how I can now delete files and programs to make more room, comp is need a cleanup and don't know what to do, any help would be received with gratitude xx

    Hi Juleskk,

    Follow the suggestions below for a possible solution:

    Method 1: You can try the steps in the article mentioned below and check.

    Cannot find the Rundll32.exe file when you open Control Panel

    http://support.Microsoft.com/kb/812340

     

    Method 2: I also suggest that you scan your computer with the Microsoft Security Scanner, which would help us to get rid of viruses, spyware and other malicious software.

    The Microsoft Security Scanner is a downloadable security tool for free which allows analysis at the application and helps remove viruses, spyware and other malware. It works with your current antivirus software.

     

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

     

    Note: The Microsoft Safety Scanner ends 10 days after being downloaded. To restart a scan with the latest definitions of anti-malware, download and run the Microsoft Safety Scanner again.

    Important: While hard disk analysis if bad sectors are found when scanning try to repair this area, all available on which data can be lost.

    Method 3: Try the SFC (System File Checker) scan on the computer.

    To run the System File Checker tool, follow these steps:

    a. click Startand type cmd in the box start the search .

    b. right click on cmd in the list programs, and then click run as administrator.

    c. If you are prompted for an administrator password or a confirmation, type your password or click on continue

    d. at the command prompt, the following line and press ENTER:

    sfc/scannow

    See also:

    Description of Windows XP and Windows Server 2003 System File Checker (Sfc.exe)

    http://support.Microsoft.com/kb/310747

     

    File system (CFS) Checker

    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/system_file_checker.mspx?mfr=true

    Let us know if that helps.

Maybe you are looking for