Thursday, March 1, 2012

How to change the boot order of a virtual machine using vmx options

In ESXi/ESX, choose the boot device using the advanced virtual machine options bios.bootOrder and bios.hddOrder.
Note: These settings override the boot order that you might have set in the virtual machine's BIOS previously.
The virtual machine's boot order can be set to any virtual NIC via ethernetX, where X is the number of the device. For example, ethernet0 or ethernet5. It can also be set to hdd, cdrom, or floppy. If set to cdrom or floppy there are multiple devices, the virtual machine tries them sequentially until it finds one to boot from. If bios.bootOrder is set to hdd, you also have to define bios.hddOrder and set a device (for example, scsi0:3 or ide1:0) to boot from.
You can also configure a list of devices. Ensure to put the list into quotation marks and seperate the devices with commas. For example:
bios.bootOrder = "ethernet5,ethernet2,hdd,cdrom,floppy"
bios.hddOrder = "scsi2:2,scsi0:1,ide1:0"

In this example, the virtual machine tries to boot with ethernet5. If there is nothing to boot from, try ethernet2. If that fails, try from the disks (hdd) defined in hddOrder, then all cdroms, and finally from all floppys.
Unlike BIOS, you can choose from all available NICs and disks, but there is a maximum of 5 NICs and 8 disks that can be used in a boot order list. If you move a bootOrder/hddOrder configured virtual machine to a host that is not running on ESXi/ESX, it might not use the boot order you expect it to upon the next restart.
To configure bootOrder for a virtual machine using the vSphere Client:
  • Shut down the virtual machine.
  • Click the virtual machine in the Inventory.
  • Click the Summary tab for that virtual machine, then click Edit Settings.
  • In the Virtual Machine Properties dialog, click the Options tab.
  • Under Advanced, click General.
  • Click Configuration Parameters.
  • Click Add Row.
  • Create two new rows.
  • Enter bios.bootOrder to the Name column and enter the devices in the Value column.
  • Enter bios.hddOrder to the Name column and enter the devices in the Value column.
  • Click OK to save the changes.
For more information read the following article from VMware

Thursday, February 16, 2012

How to convert .GHO files to .VMDK

Ghost treats virtual disks as images. You can image a machine to a virtual disk (create a vmdk file instead of a .gho file), and you can restore a machine from a vmdk file. While performing any imaging operation GHO is the default file format of ghost
VMDK files cannot be opened in Ghost explorer, You can mount a VMDK file by using ghost with switch –ad=, once it is mounted can be used in all ghost operation.
You may want to use a Physical machine's Ghost image in vmdk or otherwise, you may want to use a vmdk to prepare a Physical machine .
By performing following simple commands you can convert the GHO files to VMDK and a VMDK file to GHO.
To convert from GHO to VMDK
ghost32 -clone,mode=restore,src=my.gho,dst=myimage.vmdk -batch -sure
To convert from VMDK to GHO spliiting into 100MB chunks
ghost32 -clone,mode=create,src=my.vmdk,dst=myimage.gho -batch -sure -split=100
There are some more switch available
  • vmdktype: Used for specifying the VMDK file type , which can be Sparse or Flat
  • vmdksplit: Used for splitting the VMDK image
  • vmdksize: Used in specifying the size of vmdk file
  • vmdkAdapter: Specifying the type of disk adapter for created vmdk
To create a VMDK file form machine directly
Ghost32 –clone,mode=create,src=1,dst=myimage.vmdk  -vmdk -sure
To restore VMDK image on machine directly
Ghost32 –clone,mode=restore,src=myimage.vmdk,dst=1  -vmdk -sure
For more information read the following article.

Monday, February 13, 2012

Monday, February 6, 2012

After a host power failure, vMotion fails with the error: Module is not loaded

This issue occurs because the vMotion module fails to load automatically after a power failure. To resolve this issue, you must re-enable vMotion after the host power failure.
To re-enable vMotion:
Click the host in vCenter Server and then click the Configuration tab.
Click Properties on the vSwitch where the vMotion VMkernel port group is located.
Click the vMotion port group and click Edit.
Deselect the vMotion Enabled option.
Click OK and then click Close.
Connect to the host using SSH.
Run this command to verify if the vMotion module is loaded:
vmkload_mod -l | grep migrate
If the above command does not return any values, run this command to load the module:
vmkload_mod migrate
Run this command and verify if the vMotion module is now loaded:
vmkload_mod -l | grep migrate
Run this command to restart services:
services.sh restart
Repeat Steps 1 to 3 and select the vMotion Enabled option. This enables vMotion.
Migrate virtual machines to another host.
Reboot the host.
Run this command to verify if the vMotion module loads properly:
vmkload_mod -l | grep migrate
You must see an output similar to:
# vmkload_mod -l | grep migrate
migrate                  2    252
For more info read the following article from VMware

Tuesday, January 31, 2012

Slow logins in Windows 7

According to Microsoft the welcome screen may be displayed for 30 seconds during the logon process after you set a solid color as the desktop background in Windows 7 or in Windows Server 2008 R2
To fix this configure the value of the DelayedDesktopSwitchTimeout registry entry. This value determines the time-out interval of a session before Windows 7 or Windows Server 2008 R2 switches between sessions.
To configure the value of the DelayedDesktopSwitchTimeout registry entry, follow these steps:
Locate the following registry subkey:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\SystemDouble-click the DelayedDesktopSwitchTimeout registry entry.
In the Value data box, type 5, and then click OK.
On the File menu, click Exit.