Moving from ESX 3 or 4 to ESXi 4.x

Moving from ESX 3 or 4 to ESXi 4.x

This script allows you to install ESXi 4.x installable over the top of an ESX installation without erasing your local datastore or trashing any virtual machines. It does not preserve any settings. I've tested it with both ESX 3.5 and ESX 4.0 and have been able to save the VMFS datastore in both instances. Your mileage may vary however, and if you're worried about your virtual machines, make sure that you have backed them up prior to attempting the installation!

ALWAYS BACK UP CRITICAL DATA!

Steps:

  1. boot the ESXi 4.x installer

  2. switch to the trusted shell using Alt-F1 (username is "root" in ESX 4.1. In ESX 4.0 and 3.5 type "unsupported")

  3. use scp to copy the script to the host. The command should look like "scp user@host:path/to/save_vmfs.py ."

  4. use fdisk to figure out the disk names on the system with the command "fdisk -l"

  5. run the command "python save_vmfs.py -s <disk name>" (in my case the disk name is mpx.vmhba1:C0:T0:L0)

  6. write down the geometry information that is printed out. You shouldn't need to use it, however if the power kicks out in the middle of your installation or if something goes bad you'll need it to restore the datastore. If the datastore couldn't be saved it should give you a warning message saying it's not going to work. *** IF YOU DON'T WRITE THIS DOWN YOU COULD LOSE YOUR DATASTORE *** (and double check it too!)

  7. switch back to the installer using Alt-F2

  8. continue with the installation and install onto the disk you opted to save the datastore *** DO NOT REBOOT WHEN INSTALLATION IS COMPLETED! ***

  9. before rebooting after the installation has completed, switch back to the shell (Alt-F1)

  10. re-run the python script, but this time use the command "python
    save_vmfs.py -r <disk name>". It will then rewrite the partition
    table with the VMFS datastore you already had on the disk.

If you are unfortunate enough to have the power yanked during your installation, or if you accidentally reboot before restoring, just boot back into the ESXi installer, re-copy the script to the install environment (described above) and use the command "python save_vmfs -r -g <start>,<end> <disk name>".

Attachments
Version history
Revision #:
1 of 1
Last update:
‎09-27-2010 02:13 PM
Updated by: