Vmware esxi Disk footprint why is it so big?

Posted by Simson on October 28th, 2009

Everything you ever wanted to know about the VMware ESXi footprint.

The flagship hypervisor from VMware actually comes in two different form-factors: classic VMware ESX with a Linux-based management console and thin VMware ESXi that can boot from a small embedded flash drive. Even though ESXi is available for free, it is functionally equivalent to classic ESX when fully licensed and managed by vCenter Server.

VMware ESX 3i, as it was originally known in the VI3 era, was just a tiny 32MB. With VMware vSphere 4, the name changed slightly to VMware ESXi 4, and grew to about 60MB — still extremely small for a fully-functional hypervisor with HA, VMotion, DRS, and all the other vSphere features.

While ESXi is less than 60MB, installing it actually requires a 1GB flash device. This raises a question:

VMware claims that ESXi is small — why does it require so much storage?

Unlike a general purpose operating system, ESXi was designed to be deployed as an image — similar to a router. The “installer” merely paves your empty storage device with some partitions. In fact, there are two separate partitions created for ESXi images — this allows administrators to roll back to a known-working environment if an update is not successful. In order to be prepared for the future, these two partitions are several times larger than the data they contain.

Not only does a 1GB flash device contain the ESXi hypervisor, it also provides VMware Tools for various supported operating systems and a copy of the vSphere Client which administrators can download and install to their workstations. These components are not executed by the hypervisor at all — they can be obtained through other means, but it is very convenient to have them right on the host.

Take a look at this visual to better understand the partition layout:
Gparted
Partition 4 enables the actual booting from flash
Partition 5 contains files that make up the VMware ESXi image
Partition 6 is used to store a future update to the image file
Partition 7 is for a core dump
Partition 8 contains tools, drivers, and the Windows-based vSphere Client installer
In case you are curious, here are the contents of that last partition:

ESXi Extras
As you can see, it contains a bunch of Windows executables and ISO images for your various guests.

How to Increase the Hard Disk Size of Guest OS

Posted by Simson on August 20th, 2009

The original copy of these instructions is located here –> http://vmetc.com/2007/11/07/increase-the-size-of-a-virtual-disk/

When I need to increase the size of a virtual disk (.vmdk), you use the console command vmkfstools and the Gparted LiveCD. If you did not know, Gparted is an open source Partition Magic Alternative. Available on sourceforge.net
These steps are for a Windows VM. They should work for any OS, however.
1. Download the Gparted LiveCD ISO. You will need to save it to a location you can use it to boot the VM, like uploading it using the VI client to the ESX host’s data store.
2. Shutdown the virtual machine you want to resize
3. Log into the ESX Server via Putty, or however you can get to the console.
4. Use vmkfstools to increase the size of the .vmdk For example if you had a VM named “MyOS” in a folder called “myVMFS” and you wanted to increase it from 20GB to 24GB you would type (it is case sensitive):
vmkfstools -X 24g /vmfs/volumes/myVMFS/myOS.vmdk
or
vmkfstools -X 24576m /vmfs/volumes/myVMFS/myOS.vmdk
5. Boot the VM to the Gparted ISO
6. Once the Gparted partition editor loads, click your disk in the partition list
7. Click the Resize/Move button
8. Drag the arrow to extend the size of the partition. Be sure to work out the free space before and/or after the partition by sliding the whole partition either left or right.
9. Next click the Apply button to start the resizing process.
10. After it completes click the Close button
11. Reboot the VM without the Gparted ISO to the VM’s OS.
12. You will have to wait for a chkdsk on the reboot. Then Windows will reboot again.
13. Check your new disk size in My Computer and Disk Manager!

As an alternative to steps 3 & 4, you can resize the disk using the VI client GUI by choosing to Edit Settings, then click on the HD you want to resize, type in the new size, click OK. Again, the VM has to be powered off in order to do this. Doing this still requires you to run the Gparted utility to resize a partition, otherwise you will only be able to ADD a partion using the new space. If the disk you are resizing happens to be a non-system disk, you may be able to extend the partition within Windows to use the new space.

Another way to do this is to use a “ghost” program:

1) Add a second HDD to the vm. The end size you want. In you’re case 40Gb.
2) Restart VM and boot off a bootable ghost disk.
3) Use ghost program to clone disk 1 to disk 2.
4) After this is done power off VM.
5) Remove 1st HDD and set the 2nd drive to drive 1 in Virtual device node under edit VM settings.
6) Power up vm and that should be it.

The above steps were mostly taken from the discussion boards on this site and tweaked slightly for readability and spelling.


Copyright © 2007 Free Cookies for Linux & Windows. All rights reserved.