Virtually Prepared

…leaving your physical world virtually behind

Browsing Posts tagged ESXi

VMware’s ESXi offers a lightweight, powerful and securely tightened hypervisor which quite frankly comes from the school of “It just works”. However there are times when you need quick access to the console rather than firing up an iLO session to simply SCP a file from one DC to another at host level.

Anyway, whatever the reason here’s how to get PuTTY access to an ESXi host and enable SCP.

At the ESXi console (local or via iLo) perform the following:

  • Press ALT + F1, (the screen will clear)
  • Type “unsupported” and press ENTER (without the quotes), note – the text will not locally echo
  • Provide the ‘rootpassword and press ENTER
  • cd /etc and press ENTER
  • Use ‘vi‘ to edit inetd.conf
  • Remove the ‘#” from the beginning of the SSH lines
  • Save and quit
  • Type services.sh restart and press ENTER
  • Type? ps aux | grep inetd to get the Process ID
  • Type kill -HUP Process ID

Done.

Remember to edit the /etc/inetd.conf file after you’ve finished to return it to the default state.

Ok, here’s another real world scenario worthy of a mention. Not really because it’s rocket science but more to get it into the search engines as a recent customer visit revealed they couldn’t find a step by step guide whilst trawling the web.

Here’s mine.

ESX 3.x and 4.x

  1. Ensure the virtual machine has been shut down gracefully and is powered off.
  2. Remove the hard disk from the virtual machine within the VMware Infrastructure client but DON’T delete the disk, just remove the entry.
  3. Using PuTTy, an iLO, RSA or something else with remote control access login to an ESX host that has access to to the data store where the virtual machine is located.
  4. Navigate to the virtual machine <DIR>.
  5. Use the ‘mv‘ command and rename the two VMDK files for example:
    1. mv win2k3-prn1.vmdk win2k3-print1.vmdk
    2. mv win2k3-prn1-flat.vmdk win2k3-print1-flat.vmdk
  6. Using VI (or a similar editor) open the win2k3-print1.vmdk file.
  7. You’ll notice a reference to the win2k3-prn1-flat.vmdk, this will need amending to reflect the new name.
  8. Save and close the file.
  9. Logout of the ESX host and return to your VMware Infrastructure Client.
  10. Add a hard disk to the virtual machine by browsing to the newly renamed file.

Well done, that was it.

Hey, what about ESXi?

The hidden service console will have to be used. WARNING, VMware will not support any activities undertaken using this console unless you have been directed to do so by them.

Review VMware’s KB Article for full and further information about this feature: KB 1003677.

  1. At the ESXi console press ALT + F1
  2. Type in the word ‘unsupported‘ and press ENTER, no text will be echoed when typing so don’t get it wrong.
  3. Provide the ‘root‘ password when prompted.
  4. Complete the tasks as directed above.
  5. Once complete, type in ‘clear‘ and press ENTER to hide all recent text display.
  6. Type in ‘exit‘ and press ENTER to logout.
  7. Press ALT + F2 to return the familiar ESXi console.

That’s all for now.