cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
22257
Views
2
Helpful
23
Replies

Orphaned 1Kv dvSwitch?

nashwj
Level 1
Level 1

Had someone that cleared the configuration on their VSM the other day without saving it first (was doing an initial configuration).  Basically, somehow a new VSM that was brought up to be secondary became primary and replicated a blank configuration to the existing VSM.  Now it's back to a clean switch.  The problem is that the original dvSwitch and port-groups still show in vCenter.  Can we clear those out to start a new installation.  I've done an uninstall when the 1Kv was alive..that's easy..but never without removing things via the VSM first.

23 Replies 23

sachthak
Level 1
Level 1

Hi there:

To recover the old switch you can execute the following steps:

  • Bring up the new VSM (or use the existing one in your case)
  • Restore the startup config (or at least restore the switchname)
  • You can use the command "vmware vc extension-key <extension-id>" to have a new CP connect to the existing DVS.
  • The extension id here in this command should be the same one that is tied down to the DVS.
  • You can find the key using the MOB
    • Go to the VC's mob by pointing your browser to it [Eg: https://<VC_IP_ADDR>/mob]
    • Go to rootFolder 'group-d1'
    • Find your datacenter from 'childEntity' containing Datacenter-IDs [When you click on a datacenter, you will find a name associated with it]
    • From your datacenter, go to networkFolder [Eg: group-n6]
    • From the network folder select the child entity [Eg:group-n373]
    • In the 'childEntity' click on your dvs [eg: dvs-7]
    • Under the DVS "config" attribute, you can find the extension key in use
  • Once you key in this extension key, verify the new extension key on the CP using "show vmware vc extension-key".
  • Now delete the extension key present on the VC using MOB. (Unregister extension API).
  • Goto the extension manager [https://<VC_IP_ADDR>/mob/?moid=ExtensionManager]
  • Click on Unregister extension [https://<VC_IP_ADDR>/mob/?moid=ExtensionManager&method=unregisterExtension]
  • Paste "Cisco_Nexus_1000V_<DVS TO RECOVER's KEY>" (your extension key attached to the DVS) and click on "Invoke Method"
  • Now you are ready to re-register the extension. If you are getting the .xml file through the browser, make sure you refresh the browser before downloading the XML file.
  • Re-register the extension
  • Do 'connect' for your svs connection

This should reconnect you to your old dvs and re-sync the current VSM's config with the VC.

Hope this helps

thanks,

sachin

Thank you very much for that information.  I plan to try that when onsite next week.  Since this site doesn't really care about the existing dvSwitch and port-groups (nothing using them) is there an easy way to just delete all that from vCenter and the ESX hosts?

As far as I know, the only way to recover or delete an orphaned dvs is to re-attach it to a VSM.

After reattaching 'no vmware dvs' will get rid of it if desired.

sachin

OK, I'm testing this in our lab right now.  Everything works just fine until I try to reconnect.  When I do that I get:

ERROR:  [VMware vCenter Server 4.0.0.0 build-208111] Cannot create a DVS of extension key Cisco_Nexus_1000v_1487245285 that is different than that of the login user session 1487245285.  The extension key of the Distributed Virtual Switch (dvsExtensionKey) is not the same as the login session's extension key (sessionExtensionKey)..

What did I miss?  The key (1487245285) that I retrieved via MOB matched that of the plugin key that was already in vCenter.  It appeared that removing the extension key worked.  I got a new XML file from the VSM (with the same extension number) and re-added it to vCenter.  I closed/re-opened the vCenter client and the old plug-in/extension was gone.  All I see is the new one.

I even tried setting the UUID to match that in MOB but I get the same message.

You don't need to modify the UUID.  That will be pushed from vCenter.

Your problem is with your extension keys.  Do the following.

1.  Remove any existing extension keys in vCenter.  (Copy and paste them into Notepad prior to removing them just in case).  Ensure when you re-open the Extension manager that there are NO registered extension keys now.

2.  Restart the vCenter Server Service.

3. Ensure the new 1000v's switchname is EXACTLY the same as the original/old one.


4. Download and register the existing extension key of your rebuild VSM in vCenter (don't modify it)

(At this time you'll see it reconnect the svs connection)

5. Issue a "no vmware DVS" and it should remove from vCenter.

Let me know if this fixes your issue.

Robert

To quickly clarify before debugging further:

Did you set the new extension key to the full "Cisco_Nexus_1000v_1487245285" or just "1487245285"?

thanks,

sachin

I put in just "1487245285" before but figured that out right after I posted.  So I went back, set it to Cisco_Nexus_1000v_1487245285...cleared the existing extension keys/plugins, restarted the vCenter client, made sure there were no registered keys/plugins, and re-registered the new XML (that shows the corrected name in the file).  Same error except where it says 1487245285 in the first one it says Cisco_Nexus_1000v_1487245285 in the new error.

The dvSwitch shows up as "nexus1kv" in vCenter and my switchname is "nexus1kv" on the VSM.  It lets me create a new switch fine (if I change the name) but won't attach to the existing.  The process you give is pretty straightforward so I'm not sure what is missing.


nexus1kv(config-svs-conn)# show vmware vc ex
Extension ID: Cisco_Nexus_1000v_1487245285

nexus1kv(config-svs-conn)# connect
ERROR:  [VMware vCenter Server 4.0.0 build-208111] Cannot create a DVS of extension key Cisco_Nexus_1000V_1487245285 that is different than that of the login user session Cisco_Nexus_1000v_1487245285. The extension key of the Distributed Virtual Switch (dvsExtensionKey) is not the same as the login session's extension key (sessionExtensionKey)..

Attached two files.

OK...I just redid this in the lab and it worked fine.  So the only thing I can figure is I wrote the original extension key wrong.  If that happens, is there any way to figure out what the dvs is using after revoking the key in MOB?

Even if the key is revoked, I believe the config attributes of the DVS object will still show the extension associated with the given DVS.

You're right, it does.  I checked it...had the right extension key.  So I re-did the process again and got the same error.  Any other suggestions?

Hey, if anyone is in building 12 in RTP walk down.  I'm sitting in a conference room at a customer PoC.  Can see it yourself.

Was looking at the error message again, the key is case sensitive:

The correct extension key is Cisco_Nexus_1000V_1487245285 (capital V)

nexus1kv(config-svs-conn)# show vmware vc ex
Extension ID: Cisco_Nexus_1000v_1487245285

Is that the case in the current setup as well?

thanks,

sachin

Yep!  That was it.  I was just coming back to say that...I found it a minute ago.  That was it.  I guess I got it right (accidentally) on the second test.

Perfect.  Thank you both very much for your help.  Customer will be very pleased.

Hi all,

Didn't want to start a new thread, but having a bit of a strange issue here with a similar thing. I am trying to step through this process as well, and only registered extension we can see in vCenter is Cisco_Nexus_1000V_644329928.

So, on my 1KV (hostname matches) -

N1KV-VSM1# sh vmware vc extension-key
Extension ID: Cisco_Nexus_1000V_644329928

But when I issue a connect...

N1KV-VSM1(config-svs-conn)# connect
ERROR:  [VMware vCenter Server 4.0.0 build-208111] Cannot create a DVS of extension key Cisco_Nexus_1000V_1307729650 that is different than that of the login user session Cisco_Nexus_1000V_644329928. The extension key of the Distributed Virtual Switch (dvsExtensionKey) is not the same as the login session's extension key (sessionExtensionKey)..

Any ideas? Hopefully just something I am missing. The 1307729650 isn't even the old extension key. It was Cisco_Nexus_1000V_1156611851, so not sure where that new number is coming from.

Hi Ryan,

Are you able to reconnect to the dvs if you change/reregister the key to match the Cisco_Nexus_1000V_1307729650 value and then try to connect?

Thanks,

sachin

Review Cisco Networking for a $25 gift card