Search This Blog

Sunday, July 24, 2011

Installing VMware ESXi on a USB Memory Stick

1.The first thing you’ll need is a spare USB memory stick. I used 1 8GB USB drive for this. But 4GB or 2GB is also sufficient for this.
                                                                                                                                                                                                                                                                                                                                         2.  The next step is to download ESXi from VMware here and burn if off onto CD.

3. Now insert the USB memory stick into a USB port which is able to be booted.
Though at this stage make sure that your server can boot from the CD/DVD drive.

4. Insert the CD containing the ESXi install into the servers CD/DVD drive and boot or restart the server.
Choose the default options.

5. At this stage you will see a list of all your storage devices connected to your VMware ESXi host – select your USB memory stick and press 'Enter'

6. Wait while the ESXi is written down to your USB flash drive – at this point you should see it flashing away
                                                                                                                                                                                                        
7. Once the installation has completed you will receive the screen below.  At this point remove the ESXi installation CD from the servers CD/DVD drive and press ‘Enter’ to reboot the server.
IMPORTANT: Upon the server rebooting ensure that its boot priority order is set so that the USB port(s) are booted from first.


Your server should now be booting successfully off of the USB memory stick to VMware ESXi  4 – all you need to do now is configure it!

After this you have to create a VMFS file system that can be used as a data store ,

For this you need to create a VMFS file system. First run the command ,

fdisk -l                                                        
                                                                                                                                                 
Disk /dev/disks/t10.ATA_____WDC_WD10EARS2D00Y5B1__________________________WD2DWCAV5H240740: 1000.2 GB, 1000204886016 bytes                      
255 heads, 63 sectors/track, 121601 cylinders                                                                                                   
Units = cylinders of 16065 * 512 = 8225280 bytes                                                                                                
                                                                                                                                                
                                                                                  Device Boot      Start         End      Blocks  Id System      
/dev/disks/t10.ATA_____WDC_WD10EARS2D00Y5B1__________________________WD2DWCAV5H240740p1   *         1        13    102400    7  HPFS/NTFS       
Partition 1 does not end on cylinder boundary                                                                                                   
/dev/disks/t10.ATA_____WDC_WD10EARS2D00Y5B1__________________________WD2DWCAV5H240740p2            13     19123 153497600    7  HPFS/NTFS       
/dev/disks/t10.ATA_____WDC_WD10EARS2D00Y5B1__________________________WD2DWCAV5H240740p3         19123     31871 102400000    7  HPFS/NTFS       
...      
/dev/disks/t10.ATA_____WDC_WD10EARS2D00Y5B1__________________________WD2DWCAV5H240740p8         39573     51731  97659146   83  Linux 
 
And run the command
fdisk /dev/disks/t10.ATA_____WDC_WD10EARS2D00Y5B1__________________________WD2DWCAV5H240740

and create a partion , and specify the format type as "fb". This is for the VMFS file system.

In the fdisk , type "t". It will ask you for partition number. This is where that first fdisk is useful. You need to know what the new partition number is.
It will be one more than the last number on fdisk. Type this number in

You will now be prompted for the hex code for the partition type. You can also type "L" for a list of codes. The code you want is "fb". So type "fb" in the space. This will return that the partition has been changed to fb (unknown).

Now run the command to create the VMFS file system ,

vmkfstools -C vmfs3 -S storage1 /vmfs/devices/disks/vml.0100000000202020202057442d574341563548323430373430574443205744:9                                      
Checking if remote hosts are using this device as a valid file system. This may take a few seconds...                                                          
Creating vmfs3 file system on "t10.ATA_____WDC_WD10EARS2D00Y5B1__________________________WD2DWCAV5H240740:9" with blockSize 1048576 and volume label "storage1".
Successfully created new volume: 4e2c8868-54253438-de36-001aa0c2472f        
 
 
If you do not specify the VMFS file system , while creating the vmfs file system you may get the error as ,

vmkfstools -C vmfs3 -S storage1 /vmfs/devices/disks/vml.0100000000202020202057442d574341563548323430373430574443205744:9                                      
Checking if remote hosts are using this device as a valid file system. This may take a few seconds...                                                          
Creating vmfs3 file system on "t10.ATA_____WDC_WD10EARS2D00Y5B1__________________________WD2DWCAV5H240740:9" with blockSize 1048576 and volume label "storage1".vmkfstools -C vmfs3 -S storage1 /vmfs/devices/disks/vml.0100000000202020202057442d574341563548323430373430574443205744:9
/vmfs/devices/disks/vml.0100000000202020202057442d574341563548323430373430574443205744:9: Permission denied.  (Have you set the partition type to 0xfb?)       
Error: Permission denied

Now in the VMWare VSphere Client you can see the datastore.

No comments: