Syed Jahanzaib – Personal Blog to Share Knowledge !

August 30, 2012

Vmware ESXi 5.0 Update1 Autostart breakup Fix !

Filed under: VMware Related — Syed Jahanzaib / Pinochio~:) @ 4:19 PM

In my company, we have two virtual servers based on Microsoft Hyper-V & Free version of ESXi 4.0 running 10 guest OS. We did planned to convert all of our physical machine to virtual to get benefit from underutilized modern hardware. Last week I decided to move our Domain Controller & ADC to virtual (which were installed on IBM Xseries physical serve machines).

As a rule of thumb, always test any new / trial product in LAB before deploying it on production server, following this theory I installed Vmware ESXi 5.0 Update 1 on vmware workstation 7.x and found out a BUG that guest vm’s do not auto start anymore when the host ESXi starts (In previous versions i.e 4.x , they auto start normally if they are set to autostart). This is a bug for the FREE version of the hypervisor. (For example if you have installed the FREE License key provided by vmware)

After some googling, I found out that There were some changes made in the way the ESXi APIs are accessed in Update 1 that unfortunately breaks the Guest VM Auto Start feature.

Here is a quick workaround to give you the autostart functionality in traditional Linux style.

If you haven’t done so already, Do Enable SSH on the ESXi host server. This can be easily done using Sphere client.

  • Connect to ESXI using Vsphere client.
  • Goto Configuration Tab | Security Profile | in Services, click on Properties
  • Highlight SSH | Select Options | Service Commands | Start
  • Use any SSH client like PuTTY) to log into your host server. As showed in the image below

In my case, I only wanted to auto start only single guest vm  (Which is my test DC)  So first We need to get the VM ID’s for the virtual machines. Use the following command to do so. Make note of the ID numbers in the first column

Use the following command to get the VM ID of the machine you want to start.

vim-cmd vmsvc/getallvms

You will get results something like below ( I only have one test machine, so only one entry is visible)

Vmid          Name                                File                               Guest OS         Version   Annotation
1      TestPC-4-Autostart   [store] TestPC-4-Autostart/TestPC-4-Autostart.vmx   win2000AdvServGuest   vmx-08

The VM ID for test pc guest OS is 1

Use vi to edit /etc/rc.local  – & Insert the following startup lines above the IF statement and save.

vim-cmd vmsvc/power.on 1

[VI TIP: to enable editing, press i , now add your lines, to save, press ESC, now press shift+: & type wq and press enter]
As showed in the image below . . .

Save & Exit.

Now reboot the ESXi host server.

After reboot completes, you will see the target guest OS Auto starting this time.

Auto Start All VM’s guest OS

TIP: If you want to start all vm’s you need to add them as follow

vim-cmd vmsvc/power.on 1
sleep 180
vim-cmd vmsvc/power.on 2
sleep 180
vim-cmd vmsvc/power.on 3
sleep 180

Change the ID number as per your configuration. Now after starting 1st VM, ESXi HOST will wait 180 Seconds (3 minutes) to start second one and so on. You can change this number as per your hardware/software load.

I hope you will find it useful.

#
#
#

Regard’s
Syed Jahanzaib

Windows 2003 x86 3 GB RAM limitation


Recently we did some memory upgrade on one of our server pc. It had 2 GB of RAM and we upgrade it to 6 GB . As you know, 32 bit (known as x86) Operating System only support 3.2 GB RAM maximum. After installing RAM into system, In the BIOS it showed correct amount of memory, but in Windows OS (32bit) it shows only 3.2 GB of RAM as showed in the image below.

To fix this issue, add the following syntax at the end in boot.ini [(found in c:\) , in [operating systems] section.

/PAE

For example

Windows 2003 boot.ini sample

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, Enterprise" /noexecute=optout /fastdetect /PAE

Save & exit. Now reboot the system and this time, you will see proper result. as showed in the image below

.
Regard’s
Syed Jahanzaib