Thursday, October 23, 2008

ESXi and the undocumented Tech Support Mode

KB Article 1003677 talks about this thing called Tech Support Mode. This is a command-line interface that can be used with VMware ESXi Hosts to assist with the troubleshooting process.

For information on the Architecture of VMware ESXi, please see the Architecture of VMware ESXi Whitepaper which goes into great detail explaining how ESXi is designed and how it differs from classic ESX Server.

When you use Tech Support Mode, you have access to a command line shell that allows you to do things like restart services, but this mode should ONLY be used while working with VMware Technical Support to troubleshoot an issue.

To use Tech Support Mode:

  1. Log in to your ESXi host at the console.
  2. Press Alt+F1 to switch to the console window.
  3. Enter unsupported to start the Tech Support Mode login process. Note that no text will appear on the console window.
  4. Enter the password for the root user. Tech Support Mode is now active.
  5. Complete tasks in Tech Support Mode.
  6. Enter the command exit to exit Tech Support Mode.
  7. Press Alt+F2 to return the server to DCUI mode.

After logging in to Tech Support Mode, you will see the following where you can run the commands:


Some people equate Tech Support Mode with the Service Console of classic ESX Server. There are some that think ESXi relies on Tech Support Mode for Management and that ESXi is no different than classic ESX Server. This is not true. This "busybox" interface of ESXi is NOT necessary for ESXi to function. In fact you can easily disable Tech Support mode, and ESXi will run just fine.

To disable Tech Support Mode:

  1. Connect VMware Infrastructure Client (VI Client) to an ESXi host or a VirtualCenter Server.
  2. Browse to a host in the inventory list.
  3. Click the Configuration tab.
  4. Click the advanced Settings link.
  5. Click "VMkernel" in the left-hand side pane.
  6. In the list of parameters, deselect VMkernel.Boot.techSupportMode.
  7. Restart the ESXi host. Before restarting the host, you should shut down virtual machines on that host or migrate them to another host using VMotion or cold migration.

With Tech Support Mode disabled, you can press Alt+F1, and switch to the console window, but when you type in unsupported, you will NOT be able to enter the special Tech Support Mode (it has been disabled and is not running) as shown by the following:


Since you can run ESXi with Tech Support Mode disabled, you can see that ESXi doesn’t rely on this, and it is nothing like the Console OS of classic VMware ESX 3.

Friday, October 10, 2008

Keeping your Disks Aligned

Update: I just wanted to add that Andrew Bull helped me with this, so thank you Andrew for the help.

I think that VMs run well. They are speedy and responsive, but sometimes you just want to eek out the best in performance.

Everyone knows that when you create a VMFS Volume through VirtualCenter (or is it vCenter now), the VMFS partition is properly aligned.

But what about the actual Virtual Disk? If you create a VMDK on that properly aligned VMFS, it is created as aligned, but the partition inside the VM won't necessarily be aligned. With Windows OSs, if you simply run through the base install, you don't get aligned disks. So what you need to do is create the partition on the disk before you install the OS on that disk. Now because I can use templates, if I create a VM with properly aligned disks, I can then use this VM as a template and create many VMs off of this template knowing that all of these VMs will be properly aligned.

Here is what I have done when creating and setting up the alignment.

First of all, I created a VM with Windows 2003 and updated it to the latest service packs and hotfixes. I call this VM adminvm, why, why not?

Now, let's say I want to create a new VM called vmlab-dns01. First thing I would do is create the VM the same way I would any Virtual Machine. After the VM is created, I would edit the settings of my adminvm and Add the Virtual Disk of vmlab-dns01 to this Virtual Machine by performing the following steps:

1) Edit Settings of adminvm


2) Add New Hard Disk


3) Choose to use Existing Disk


4) Browse to the [VMFS] directory_of_vm and choose the Virtual Disk


5) Click through taking the defaults and Press OK to exit when you get to this screen


6) Boot the adminvm, login, and open a command prompt and run the following commands


diskpart <- launches the disk partitioning environment

list disk <- shows which disks diskpart sees

select disk 1 <- disk 1 is the disk I added to mine, but yours could be different

create partition primary align=64 <- creates a primary partition aligned on the 64KB Offset

list disk


7) Shutdown the Virtual Machine

8) Remove the Virtual Disk from the configuration of adminvm


Now I can boot vmlab-dns01 and start installing my operating environment knowing that I have a properly aligned Virtual Disk. Here is what that looks like when installing my Windows Server 2008 DCE Core VM:



To create the aligned partition, the diskpart commands I used were the following:


list disk

select disk 1

create partition primary align=64


I hope this helps you in your VM best practices