Tuesday, February 28, 2012

Attempting to add a host to VirtualCenter produces a license error

Details

When you are attempting to add an ESX host to VirtualCenter, VMware Infrastructure (VI) Client displays an error message similar to the following:
There are not enough licenses installed to perform the operation.

Solution

The above error message may be caused by one of these problems:
  • The VirtualCenter Server is in an unlicensed state. VirtualCenter may be unlicensed because the edition selected during the installation is not the purchased edition.
  • There is a problem with a virtual machine on the ESX host.

Correcting the VirtualCenter Server license state

To correct the VirtualCenter Server license state:
  1.    Launch VI Client and log in to VirtualCenter.
  2.    Choose Administration > VirtualCenter Management Server Configuration


  3.    For VirtualCenter Server Edition, choose the edition that is not currently configured and click OK.


This is especially true if you purchased and uploaded VirtualCenter Foundation license and selected VirtualCenter Enterprise during installation.
If the VirtualCenter Server licensing is correct, the problem may be with a virtual machine on the ESX host.

Verifying and correcting issues with a virtual machine on an ESX host

To verify and correct a problem with a virtual machine on the ESX host: 
  1. Log on to the ESX host service console with root privileges.
  2. View the vpxa.log file. Run the command:

    more /var/log/vmware/vpx/vpxa.log

    Examine the log for messages for warnings similar to:

    [2008-06-16 12:37:59.350 'App' warning] ============BEGIN FAILED METHOD CALL DUMP============
    [ + 0 msc 'App' warning] Invoking [GetLayout] on [vim.VirtualMachine:336]
    [ + 0 msc 'App' warning] Fault Msg: "A general system error occured: Failed to serialize result"
    [ + 0 msc 'App' warning] ============END FAILED METHOD CALL DUMP============
    [ + 1 msc 'App' error] [vm.GetLayout] Received exception in GetLayout: vmodl.fault.SystemError
     

    The example shows the source of the problem is the error Failed to serialize result.
  3. View the hostd.log file. Run the command:

    more /var/log/vmware/hostd.log

    The output appears similar to:


    [2008-06-16 09:44:12.052 'vm:Win2000.vmx' verbose] Retrieved current power state from foundry 0
    [ + 1 msc 'vm:Win2000.vmx' verbose] Retrieved Summary info
    [ + 29 msc 'vm:Win2000.vmx' error] Disk was not opened successfully. Backing type unknown.
    [ + 31 msc 'App' warning] Failed to serialize result of method vim.VirtualMachine.GetLayout: Not initialized: vim.vm.FileLayout.DiskLayout[] disk.diskFile
    [ + 31 msc 'Vmomi' info] Activation [N5Vmomi10ActivationE:0xacfe360] : Invoke done [GetLayout] on [vim.VirtualMachine:336]
    [ + 31 msc 'Vmomi' info] Throw vmodl.fault.SystemError
    [ + 31 msc 'Vmomi' info] Result:
    (vmodl.fault.SystemError) {
    reason = "Failed to serialize result"
    msg = ""
    }
    Search for Failed to serialize result errors. This example shows that a virtual machine file Win2000.vmx is experiencing problems.
     
  4. Determine the full path to the virtual machine. Run the command:

    vmware-cmd -l
    For example:

    # vmware-cmd -l
    /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/AD-SVR-PRM/Win2000-1.vmx
    /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/IIS-XPR/Win-2003.vmx
    /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/ajax-test/Win2000.vmx
    In this example, the last line of output lists the full pathname to the problematic virtual machine.
     
  5. Unregister the virtual machine. Run the command:

    vmware-cmd -s unregister /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/ajax-test/Win2000.vmx
    Note: This does not apply any power operations to the virtual machine. The virtual machine continues to run unaffected. You cannot, however, manage the virtual machine from VI Client until you re-register it.
      
  6. Restart the ESX management agents. For more information, see Restarting the Management agents on an ESX Server (1003490).
  7. Add the ESX host to the VirtualCenter Server.
  8. Re-register the virtual machine. Run the command:

    vmware-cmd -s register /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/ajax-test/Win2000.vmx

Verifying and correcting issues with a virtual machine on an ESXi host

To verify and correct a problem with a virtual machine on the ESXi host, follow these steps: 
Note: The following steps require the vSphere CLI or the VMware RCLI. For more information, see vSphere Command-Line Interface.
  1. Open a browser, and go to:

    http://<hostname>/host/

    where <hostname> is the name of the ESXi host
     
  2. Enter the appropriate credentials.
  3. Click on the vpxa.log link, and search for Failed to serialize result errors:
    [2008-06-16 12:37:59.350 'App' warning] ============BEGIN FAILED METHOD CALL DUMP============
    [ + 0 msc 'App' warning] Invoking [GetLayout] on [vim.VirtualMachine:336]
    [ + 0 msc 'App' warning] Fault Msg: "A general system error occured: Failed to serialize result"
    [ + 0 msc 'App' warning] ============END FAILED METHOD CALL DUMP============
    [ + 1 msc 'App' error] [vm.GetLayout] Received exception in GetLayout: vmodl.fault.SystemError

     
  4. Click on the hostd.log link, and search for Failed to serialize result errors:
    [2008-06-16 09:44:12.052 'vm:Win2000.vmx' verbose] Retrieved current power state from foundry 0
    [ + 1 msc 'vm:Win2000.vmx' verbose] Retrieved Summary info
    [ + 29 msc 'vm:Win2000.vmx' error] Disk was not opened successfully. Backing type unknown.
    [ + 31 msc 'App' warning] Failed to serialize result of method vim.VirtualMachine.GetLayout: Not initialized: vim.vm.FileLayout.DiskLayout[] disk.diskFile
    [ + 31 msc 'Vmomi' info] Activation [N5Vmomi10ActivationE:0xacfe360] : Invoke done [GetLayout] on [vim.VirtualMachine:336]
    [ + 31 msc 'Vmomi' info] Throw vmodl.fault.SystemError
    [ + 31 msc 'Vmomi' info] Result:
    (vmodl.fault.SystemError) {
    reason = "Failed to serialize result"
    msg = ""
    }

    Make note of the virtual machine referenced in the hostd.log file. This example above shows a virtual machine file Win2000.vmx is experiencing problems.
     
  5. Using the vSphere command line interface, run the command:

    vmware-cmd <connection options> -l

    The output appears similar to:

    /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/AD-SVR-PRM/Win2000-1.vmx
    /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/IIS-XPR/Win-2003.vmx
    /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/ajax-test/Win2000.vmx
    In this example, the last line of output lists the full pathname to the problematic virtual machine as identified in the example in step 4.
      
  6. Unregister the virtual machine. Run the command:

    vmware-cmd.pl <connection options> -s unregister /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/ajax-test/Win2000.vmx
    Note: This does not apply any power operations to the virtual machine. The virtual machine continues to run unaffected. You cannot, however, manage the virtual machine from VI Client until you re-register it.
      
  7. Restart the ESXi management agents. For more information, see Restarting the Management agents on an ESX or ESXi Server (1003490).
  8. Add the ESXi host to the VirtualCenter Server.
  9. Re-register the virtual machine. Run the command:

    vmware-cmd.pl <connection options> -s register /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/ajax-test/Win2000.vmx
     
For additional information or if the issue persists, see Not enough licenses installed (1005265) or Cannot connect ESX server to VirtualCenter (1005562). (Source kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003623)

Installing Windows XP on ESX using LSI Logic driver

I get a lot of questions concerning the deployment of Windows XP on ESX. By default, ESX will use the LSI Logic driver when deploying a new Windows XP virtual machine. The LSI Logic driver is not found on the CD-ROM media, so Windows XP will not continue with the installation if this driver is not found.
The steps:
  • Create a new Windows XP Virtual Machine
  • Upload a Windows XP .iso file to your datastore/ISOstore (preferably a VLK version) and link it via the CD-ROM options in your Virtual Machine. Make sure it is connected / at power on
  • Go to http://www.lsilogic.com/cm/DownloadSearch.do and search for a driver for the LSI20320-R controller.
  • Extract all files in the symmpi_wXP_1201800.ZIP
  • Use a program such as WinImage to create an LSILogic.flp file and include the extracted files in the .flp image.
  • Upload the newly created LSILogic.flp to your datastore/ISO store
  • Link the .flp file via the Floppy options => use existing floppy image in datastore in your Virtual Machine. Do NOT connect it yet.
  • Power On your Windows XP machine. The installation of Windows XP should begin.
  • During setup, press F6 to select additional SCSI drivers
  • Now is the time to connect your floppy and use S during Windows Setup when prompted to connect to the floppy drive.
  • The LSILogic drive should appear. Press ENTER to continue
  • Setup will continue as normal
  • Install VMware tools
  • Done!
NOTE: when using the BusLogic driver instead, you can download & use a preconfigured .flp file from the VMware site: http://download3.vmware.com/software/vmscsi-1.2.0.4.flp. Follow the same procedure as described above. The driver should be name VMware SCSI Controller in Windows XP. (Source: virtrix.blogspot.com/2007/09/vmware-installing-windows-xp-on-esx.html)

New VM receives NTLDR is missing

NTLDR is missing
Press Alt + CTLR + DEL

I just received this after creating a VM (in my case Windows XP) on ESX 3.5. I jump back to the server and fire up the VM and receive the same NTLDR is missing message.

Step 1. Check the summary or the .vmx to make sure there is no floppy drive present.

Step 2. Load BIOS (F2) during the VM power on and check to see if it recognized the drives.

Step 3. Boot to a mounted O/S disk (Bootable Windows XP). Load the recovery console. If you are able to get to the recovery console, your VM disk .vmdk’s are recognized. You may then want to try the following Microsoft recommended steps.

“Issue the following commands at the recovery console”

FIXMBR C:
FIXBOOT C:
COPY x:\I386\NTLDR C:\
COPY x:\I386\NTDETECT.COM C:\
BOOTCFG /rebuild

Step 4 If the recovery console was unable to recognize any drives, which led me to believe that something was still wrong in the .vmx config file. I check and had two .vmdk files (one 12GB and one 15GB). The .vmx was referencing the wrong names. I updated the names to point to the existing .vmdk files and the VM powered up just fine.

Not sure when or how the scsi0 and scsi1 got pointed to invalid .vmdk names but good to know none the less. (Source: www.jesswatts.com/it/vm-receives-ntldr-is-missing)

Indonesian Greeting on Voyager Golden Record

In September 5th 1977, NASA launched space probe named Voyager 1. The mission to observed our solar systems and beyond. It's still trave...