{"id":808,"date":"2013-11-26T11:21:12","date_gmt":"2013-11-26T17:21:12","guid":{"rendered":"http:\/\/benincosa.com\/blog\/?p=808"},"modified":"2014-11-19T11:23:55","modified_gmt":"2014-11-19T17:23:55","slug":"1000v-in-and-out-of-vcenter","status":"publish","type":"post","link":"https:\/\/benincosa.com\/?p=808","title":{"rendered":"1000v in and out of vCenter"},"content":{"rendered":"<p><!--?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?--><\/p>\n<div>I was setting up the Nexus 1110 (aka: virtual service appliance, aka: VSA) with one of our best customers and as we were doing it the appliance rebooted never to come up again without completely reinstalling the firmware from the remote media. \u00a0Most of this was probably my fault because I didn&#8217;t follow the docs exactly, and I think we can now move forward, but it made me realize I hadn&#8217;t written down an important way to reconnect to an orphaned 1000v from a new virtual supervisor module (VSM).<\/div>\n<div>Here&#8217;s the situation: \u00a0When you lose the 1000v that is connecting into vCenter, there is no way to remove the virtual distributed switch (VDS or DVS) that the 1000v presented to vCenter. \u00a0You can remove hosts from the DVS but you can&#8217;t get rid of that switch.<\/div>\n<div><a href=\"http:\/\/benincosa.com\/blog\/wp-content\/uploads\/2013\/11\/n1kv-1.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-809\" title=\"n1kv-1\" src=\"http:\/\/benincosa.com\/blog\/wp-content\/uploads\/2013\/11\/n1kv-1.jpg\" alt=\"\" width=\"234\" height=\"65\" \/><\/a><\/div>\n<div>In the above picture, there is my DVS. \u00a0If I try to remove it, I get the following error:<\/div>\n<div><a href=\"http:\/\/benincosa.com\/blog\/wp-content\/uploads\/2013\/11\/n1kv-2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-810\" title=\"n1kv-2\" src=\"http:\/\/benincosa.com\/blog\/wp-content\/uploads\/2013\/11\/n1kv-2.png\" alt=\"\" width=\"366\" height=\"46\" \/><\/a><\/div>\n<div>In my case, I didn&#8217;t want to get rid of it, I just wanted to reconnect a new VSM that I created with the same name. \u00a0But this operation can be used to remove the 1000v DVS from vCenter as well.<\/div>\n<div>So here&#8217;s how you do it:<\/div>\n<div><strong>Adopt an \u00a0Orphaned Nexus 1000v DVS<\/strong><\/div>\n<div>Install a VSM. \u00a0I usually do mine manually, so that it doesn&#8217;t try to register with vCenter or one of the hosts. \u00a0Don&#8217;t do any configuration, other than an IP address. \u00a0Just get it so that you can log in. \u00a0Once you can log in, if you did create an SVS connection you&#8217;ll need to disconnect. \u00a0In mine, I made an svs connection and called it venter. \u00a0To disconnect from vCenter and erase the svs connection run:<\/div>\n<blockquote>\n<div># config<\/div>\n<div># svs connection vcenter<\/div>\n<div># no connect<\/div>\n<div># exit<\/div>\n<div># no svs connection venter<\/div>\n<\/blockquote>\n<div>Trivia: What does SVS stand for? \u00a0&#8220;<a href=\"http:\/\/www.cisco.com\/en\/US\/docs\/switches\/datacenter\/nexus1000\/sw\/4_0\/install\/software\/guide\/install_n1000v.html#wp177552\">Service Virtual Switch<\/a>&#8220;<\/div>\n<div><strong>Step 2. \u00a0Change the hostname to match what is in vCenter<\/strong><\/div>\n<div>Looking at the error picture above, you can see there is a folder named nexus1000v with a DVS named nexus1000v. \u00a0To make vCenter think that this new 1000v is the same one, we need to change the name to match what is in vCenter<\/div>\n<blockquote>\n<div>nexus1000v-a(config)# conf<\/div>\n<div>nexus1000v-a(config)# hostname nexus1000v<\/div>\n<div>nexus1000v(config)#<\/div>\n<\/blockquote>\n<div><strong>Step 3. \u00a0Build SVS Connection<\/strong><\/div>\n<div>Since we destroyed (or never built) the SVS connection in step 1, we&#8217;ll need to build one and try to connect. \u00a0The SVS connection should have the same name as the one you created when you first made you SVS. \u00a0So if you called your SVS &#8216;vCenter&#8217;, or &#8216;VCENTER&#8217;, or &#8216;VMware&#8217; then you&#8217;ll need to name it the same thing. \u00a0I named mine &#8216;vcenter&#8217; so that&#8217;s what I use. \u00a0Similarly, you&#8217;ll have to create the datacenter-name the same as what you had before.<\/div>\n<blockquote>\n<div>nexus1000v(config)# svs connection vcenter<\/div>\n<div>nexus1000v(config-svs-conn)# remote ip address 10.93.234.91 port 80<\/div>\n<div>nexus1000v(config-svs-conn)# vmware dvs datacenter-name Lucky Lab<\/div>\n<div>nexus1000v(config-svs-conn)# protocol vmware-vim<\/div>\n<div>nexus1000v(config-svs-conn)# max-ports 8192<\/div>\n<div>nexus1000v(config-svs-conn)# admin user n1kUser<\/div>\n<div>nexus1000v(config-svs-conn)# connect<\/div>\n<div>ERROR:\u00a0 [VMware vCenter Server 5.0.0 build-455964] Cannot create a VDS of extension key Cisco_Nexus_1000V_1169242977 that is different than that of the login user session Cisco_Nexus_1000V_125266846. The extension key of the vSphere Distributed Switch (dvsExtensionKey) is not the same as the login session&#8217;s extension key (sessionExtensionKey)..<\/div>\n<\/blockquote>\n<div>Notice that when I tried to connect I got an error. \u00a0This is because the extension key in my Nexus 1000v (that was created when it was installed) doesn&#8217;t match what the old one is. \u00a0The nice thing, is I can actually change that, and that is how I make this new 1000v take over the other one.<\/div>\n<div><strong><br \/>\n<\/strong><\/div>\n<div><strong>Step 4. \u00a0Change the extension key to match what is in vCenter<\/strong>.<\/div>\n<div>To see what the current extension-key is (or the offending key is) run the following command:<\/div>\n<div>nexus1000v(config-svs-conn)# show vmware vc extension-key<\/div>\n<div>Extension ID: Cisco_Nexus_1000V_125266846<\/div>\n<div>That is the one we need to change. \u00a0You can see the extension-key that vCenter wants from the error message we saw in the previous step. \u00a0In the previous step it showed that the extension key we wanted was &#8216;Cisco_Nexus_1000V_1169242977&#8217;. \u00a0So we need to make our extension-key on the 1000v match that. \u00a0No problem:<\/div>\n<blockquote>\n<div>nexus1000v(config-svs-conn)# no connect<\/div>\n<div>nexus1000v(config-svs-conn)# exit<\/div>\n<div>nexus1000v(config)# no svs connection vcenter<\/div>\n<div>nexus1000v(config)# vmware vc extension-key Cisco_Nexus_1000V_1169242977<\/div>\n<\/blockquote>\n<p>Now we should be able to connect and run things as before.<\/p>\n<p><strong>Step 5. (Optional) Remove the 1000v<\/strong><\/p>\n<p>If you&#8217;re just trying to remove the 1000v because you had that orphaned one sitting around, we simply disconnect now from vCenter<\/p>\n<blockquote><p>nexus1000v(config)# svs connection vcenter<br \/>\nnexus1000v(config-svs-conn)# no connect<br \/>\nnexus1000v(config-svs-conn)# connect<br \/>\nnexus1000v(config-svs-conn)# no vmware dvs<br \/>\nThis will remove the DVS from the vCenter Server and any associated port-groups. Do you really want to proceed(yes\/no)? [yes] yes<\/p><\/blockquote>\n<p>Now, the orphaned Nexus 1000v is gone.  If you want to remove it from your vCenter plugins then you will have to navigate the managed object browser and remove the extension key.  Not a big deal.  By opening a web browser to the host that manages vCenter (e.g.: http:\/\/10.93.234.91 ) then you can &#8220;Browse objects managed by vSphere&#8221;.  From there go to &#8220;content&#8221; then &#8220;Extension Manager&#8221;.  To unregister the 1000v plugin, select &#8220;UnregisterExtension&#8221; and enter in the vCenter Extension key.  This will be the same extension key that you used in step 4. (In our example: Cisco_Nexus_1000V_1169242977 )<\/p>\n<p>Hope that helps!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was setting up the Nexus 1110 (aka: virtual service appliance, aka: VSA) with one of our best customers and as we were doing it the appliance rebooted never to come up again without completely reinstalling the firmware from the remote media. \u00a0Most of this was probably my fault because I didn&#8217;t follow the docs&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[990,147,1],"tags":[206,209],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/808"}],"collection":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=808"}],"version-history":[{"count":2,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/808\/revisions"}],"predecessor-version":[{"id":2754,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/808\/revisions\/2754"}],"wp:attachment":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=808"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=808"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}