A. Mikkelsen

VMware ESX scripts, commands, tools and other nice to know things that will make your virtualization days easier!!!!

Browsing Posts in ESX Migrate/Upgrade

Friday I was at a customer to upgrade their ESXi 4.0 (free) to version 4.1.
This should have been an easy task, download CD, burn it and install.

This wasn’t the case, the new ESXi 4.1 wouldn’t install, it kept freezing during the extract of the cim.vgz file.
The problem occurred on both the Dell custom of ESXi 4.0 U1 and the standard ESXi 4.1.
We googled and googled but didn’t find a solution – in the end we blamed the error on the old bios version 1.1.4.

To my luck the customer still had the CD we installed the server with 9 months ago – ESXi 4.0.

We installed ESXi using the old CD and then everything was working – but we still needed to upgrade to ESXi 4.1.

So now what to do …….

Normally you use the hostupdate utility or the Remote CLI but the hostupdate utility is not included in the free version of ESXi and the we didn’t want to install the Remote CLI on the computer.
To my luck I had the hostupdate utility installed but i kept getting this error when trying to upgrade the ESXi host.

“Failed to read the upgrade package metadata.xml”

The solution to our problem was:

  1. Since it was a ESXi free with out support, we decided to use the “ESXi command line interface”, witch is unsupported.
    Follow this guide to enable it (http://www.bauer-power.net/2010/04/vmware-esxi-hack-to-allow-ssh.html).
  2. Download and extract the upgrade ZIP file from VMware.
  3. From the VIclient, upload the extracted files to the host datastore, using the “datastore browser”
    - I uploaded the files to a folder named “upgrade”
  4. Put the ESXi host in “Maintance Mode”
    - Since it is a ESXi, this can only be done when all VM’s are powered off.
  5. Connect the the ESXi console using ex. Putty.exe.
  6. Navigate to the upgrade directory.
    cd /vmfs/volumes/local-datastore/upgrade
  7. Begin the upgrade process
    esxupdate update -m metadata.zip
    
  8. When the upgrade is finished, reboot the host.
    reboot
  9. To verify the new build number:
    - Connect to the host using the VIclient
    - Select the host
    - Choose the “Summery” tab
    - Verify that the ESXi version number and build has been updated

Just found this very interesting article http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1013109 describing a problem with Windows 2008 and ESX 4 virtual hardware version 7.

In short the article states that you might have the disks go offline in a Windows 2008 VM if you

  • Upgrade virtual hardware from version 4 to 7
  • Installing a new VM with virtual hardware 7

There is two ways to get around this (taken from the VMware KB 103109)

————————

This can be resolved by changing the SAN Automount Policy on the system. See the Microsoft article http://support.microsoft.com/kb/973834 to change the SAN Policy to online.
The SAN policy is defined within the VDS environment of the system and is represented by the following values:
  • VDS_SP_UNKNOWN = 0×0
  • VDS_SP_ONLINE = 0×1
  • VDS_SP_OFFLINE_SHARED = 0×2
  • VDS_SP_OFFLINE = 0×3
On Windows Server 2008 Enterprise and Windows Server 2008 Datacenter, the default SAN policy is VDS_SP_OFFLINE_SHARED. On all other Windows Server 2008 editions, the default SAN policy is VDS_SP_ONLINE.
To query current SAN policy from the command line, start DISKPART and issue a SAN command:
C:\>DISKPART.EXE
DISKPART> san
SAN Policy : Offline Shared

DISKPART> exit

Alternatively, you can set the disk to Online after the hardware version upgrade.
To set the disk to Online:
  1. Log in to your system as an Administrator.
  2. Click Computer Management > Storage > Disk Management.
  3. Right-click the disk and choose Online.

Today when I needed to upgrade my VC database from MSSQL2000 to MSSQL 2005 i came upon these quick guides.

http://blog.core-it.com.au/?p=27

http://spininfo.homelinux.com/news/VirtualCenter/2008/01/06/Howto_Move_Migrate_Design_VC_DB_from_SQL2000_to_SQL2005__

If you want to perform an offline upgrade of an ESX 3.x host to the new vSphere  host there are a few ways.

Using a DVD:

/root/esxupgrade.sh storage1

Using the DVD ISO:

esxupgrade.sh -i /vmfs/volumes/storage1/esx4.iso /vmfs/volumes/storage1

storage1 – should be a VMDK local datastore attached to the host.
storage1 – should be at least 8.4GB in size.

Read the full guide here.

Read this post before upgrading.

Eric Siebert has writen a very good and explaining guide on how to troubleshoot snapshots on ESX 3.x.

Virtualization administrators can use snapshots on VMware ESX to travel back in time and figure out what went wrong with their virtual machines (VMs). But what do you do when your snapshots start acting funny? In this tip, we’ll troubleshoot potential problems that may come up when using snapshots on ESX.

Read it here or read my local copy.

Looking for a guide to upgrade your VMware ESX enviroment to ESX 3.5 and VC 2.5, then this guide from RTFM Education is a must read.

http://www.rtfm-ed.co.uk/?p=482

The people over at Lostcrations have created the first known third party plugin to VC 2.5.

It enables you to SVmotion your VM’s VMDK’s between different storage locations

Take a look at it

http://www.lostcreations.com/code/wiki/vmware/viplugins/svmotion

Just stumbled upon this nice tool to do SVmotion from a Windows server

http://communities.vmware.com/thread/122847?tstart=0

A. Mikkelsen

The people at www.virtualization.info have put together a list of the new features in ESX 3.1.0.
http://www.virtualization.info/2007/08/vmware-esx-server-31-virtualcenter-21.html

The only thing now is when will it be released.

A. Mikkelsen

During an upgrade of an ESX 2.5.4 environment to ESX 3.0.1 I had a problem with one of the VM’s.
Every time I tried to clone or migrate a specific VM I got the same error over and over.
“Host does not support the virtual hardware version of the virtual machine”I realized that the VM originally was build on a GSX server.
I opened the vmx file and saw that the hardware versions were not updated properly.
The 2 hardware parameters in the vmx file is config.version = “x” and virtualHW.version = ”x”. Where x is a number based on the host OS.
For a GSX these numbers are 6 and 2.
For an ESX 2.5.x these numbers are 6 and 3.
This meant that when the VM was moved from GSX to ESX 2.5.x the virtual hardware wasn’t upgraded properly.

The resolution was to completely uninstall the VMware Tools in the VM and make a complete reinstallation of the VMware Tools. Here after it is possible to upgrade the Virtual Hardware.
Now the migration of the VM to an ESX 3.0.1 host will run smoothly.

Powered by WordPress Web Design by SRS Solutions © 2010 A. Mikkelsen Design by SRS Solutions