{"id":375,"date":"2011-05-06T16:05:41","date_gmt":"2011-05-06T22:05:41","guid":{"rendered":"http:\/\/benincosa.com\/blog\/?p=375"},"modified":"2014-11-19T11:25:16","modified_gmt":"2014-11-19T17:25:16","slug":"ucs-emulator-on-esxi","status":"publish","type":"post","link":"https:\/\/benincosa.com\/?p=375","title":{"rendered":"UCS emulator on ESXi"},"content":{"rendered":"<div id=\"_mcePaste\">&#8220;Recently we put the UCS emulator on our ESXi server to kick the tires and check out the API. \u00a0The Emulator can be downloaded from <a href=\"http:\/\/developer.cisco.com\/web\/unifiedcomputing\/ucsemulatordownload\">Cisco<\/a>. \u00a0(You need to register to download it).<\/div>\n<p>The emulator is to be used with VMware Player out of the box. \u00a0That was fine, but we wanted to take a look at it together so we used xCAT to provision a stateless ESXi server. \u00a0Now you may happen to have VMware vCenter running in which case it would be very easy for you to import the image to run on ESXi simply by importing it in with the GUI. \u00a0But we are a bit more fearless in that respect, not to mention short on hardware. \u00a0So we just provisioned our ESXi server and didn&#8217;t bother installing a license nor adding it to vCenter. \u00a0This was just for a quick test, so no I don&#8217;t feel unethical about it.<\/p>\n<p>But the problem is: \u00a0How to import the file? \u00a0And how to tell what was going on?<\/p>\n<p>No problem. \u00a0We just used some ESXi vim-cmd-fu to make it happen. \u00a0Here&#8217;s what we did:<\/p>\n<h3>1. \u00a0Make a new vmfs for VMs to live on.<\/h3>\n<p>We skipped this step by just using xCAT to provision another VM on the ESXi host. \u00a0We used &#8216;datastore1&#8217; as the storage and easily made it.<\/p>\n<h3>2. \u00a0scp the untarred file to the esxi server:<\/h3>\n<pre>scp -r UCSPE\/ node001:\/vmfs\/volumes\/datastore1\/<\/pre>\n<h3>3. \u00a0Copy make the disk files work under ESXi<\/h3>\n<p>There are three disks in the emulator. \u00a0We just copied them:<\/p>\n<pre>cd \/vmfs\/volumes\/datastore1\/UCSPE\/\r\nvmkfstools -i UCSPEa-s001.vmdk -d zeroedthick UCSPEa-s0011.vmdk\r\nvmkfstools -i UCSPEb-s001.vmdk -d zeroedthick UCSPEb-s0011.vmdk\r\nvmkfstools -i UCSPEc-s001.vmdk -d zeroedthick UCSPEc-s0011.vmdk<\/pre>\n<h3>4.  Change the UCSPE.vmx file<\/h3>\n<p>We need to point to the new disks now.  Theere were three lines we had to change:<\/p>\n<pre>scsi0:1.present = \"TRUE\"\r\nscsi0:1.fileName = \"UCSPEa-s0011.vmdk\"\r\nscsi0:2.present = \"TRUE\"\r\nscsi0:2.fileName = \"UCSPEb-s0011.vmdk\"\r\nscsi0:3.present = \"TRUE\"\r\nscsi0:3.fileName = \"UCSPEc-s0011.vmdk\"<\/pre>\n<p>You also need to change the network. \u00a0By default, we have the &#8220;VM Network&#8221; that we can communicate on:<\/p>\n<pre>ethernet0.networkName = \"VM Network\"<\/pre>\n<p>For good measure, add the VNC port so you can watch what&#8217;s going on:<\/p>\n<pre>remotedisplay.vnc.enabled = \"TRUE\"\r\nremotedisplay.vnc.port = \"5900\"<\/pre>\n<p>And that should be it for the *vmx file.<\/p>\n<h3>5. \u00a0Power it on<\/h3>\n<p>This is the easy part:<\/p>\n<p>Register the VM:<\/p>\n<pre>vim-cmd solo\/registervm \/vmfs\/volumes\/datastore1\/UCSPE\/UCSPE.vmx UCSPE<\/pre>\n<p>Check the ID:<\/p>\n<pre>vim-cmd vmsvc\/getallvms<\/pre>\n<p>My id for this machine is 16. \u00a0So lets power it on:<\/p>\n<pre>vim-cmd vmsvc\/power.on 16<\/pre>\n<p>If there are problems, (like failures) then you usually have to troll through the \/var\/log\/messages file. \u00a0Hopefully I didn&#8217;t forget anything and this just worked for you!<\/p>\n<p>Now that you have it up, you should be able to watch it on VNC and then eventually log in using the userid: cliuser and password: cliuser. \u00a0Since we had a DHCP server, we watched the logs to see what IP address it came up with. \u00a0Then we grabbed the mac address and put it in our DHCP config statically (using xCAT of course!)<\/p>\n<p>I&#8217;m very happy Cisco made this available. \u00a0In the past while doing testing on IBM or HP blades, we had to actually have live hardware to test on. \u00a0With the UCS Manager outside and on a VM, we can do a lot of testing with no hardware at all. \u00a0Then once the real stuff comes: \u00a0Look out! \u00a0We&#8217;re ready for it!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;Recently we put the UCS emulator on our ESXi server to kick the tires and check out the API. \u00a0The Emulator can be downloaded from Cisco. \u00a0(You need to register to download it). The emulator is to be used with VMware Player out of the box. \u00a0That was fine, but we wanted to take a&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[990,916],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/375"}],"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=375"}],"version-history":[{"count":5,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/375\/revisions"}],"predecessor-version":[{"id":2793,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/375\/revisions\/2793"}],"wp:attachment":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}