Tuesday, January 27, 2009

How to Increase/Enlarge Hard Drive Space in a VM

Cannot enlarge hard drive space?

First of al, to enlarge your hard drive space, you will need to turn off the VM. Highlight your VM and under disk, click EDIT and there should be a link to enlarge your drive space. This option will be disabled if you have taken snapshots of your VM. So in this case, delete/collapse the snapshots and then enlarge the drive space.

If you breaking your VM into 2GB chunks, you will need to do it from the command line.

The command line to do it is this:
vmware-vdiskmanager

The full syntax is this (assuming you want to increase it to 10GB and your disk filename is myDisk.vmdk located in F:/VMs/MyVm/):
vmware-vdiskmanager -x 10GB "F:/VMs/MyVM/myDisk.vmdk"

You will need to run the command from VMWare directory - in VMWare Server 2.0, the directory is located at "C:\Program Files\VMware\VMware Server". So open a command prompt, navigate to the VMWare dir and execute the command above.

The command will run for a while and after it is done, it will give you a message indicating whether the expansion is successful or not.

Now once the diskspace is increased, you will need to expand the file system to its max capacity. Running the command above or through the VMWare interface only increase the max capacity of the disk, but the size of the allocated size used by the VM is still at the old size. There are several ways to do this:
1. Mount your VMDK file to you host machine using vmware-vdiskmount and then expand it using DISKPART from your host OS (vmware-vdiskmount is only available for VMWare Infrastructure & Workstation). I think you can download it from here but I have never tried to use it with VMWare Server - so try at your own risk.

2. Mount your VMDK to another VM (it has to be the same harddrive controller - SCSI/IDE) and then expand it using DISKPART from your second VM. To mount the VMDK into your second VM, follow these steps: a) Make sure both VMs are shut down b) Highlight/Focus on your second VM and click "Add Hardware" under "Commands" box, select "Hard Disk", then select "Use an Existing Virtual Disk". Browse to your first VM VMDK file and make sure the type is the same as your expanded VM under "Virtual Device Node". c) After completing the wizard, you should see the mounted drive under Hard Disk within your hardware list. d) Start your second VM e) Run DISKPART.

3. You can also use 3rd party tools such as Partition Magic or other similar tools.


Related Posts:
VMWare Server Experience
Win XP 64 bit and VMWare Server
-- read more and comment ...

Wednesday, January 14, 2009

XP 64 and VMWare Server

With Windows XP 64 bit Edition, I wanted to install VMWare Server 2.0 - the installation failed. It will do all the installation preparation and then close itself without installing anything.

Googling it around using keywords like "XP64 VMWare Server" did not yield any meaningful results (at least not in the first 4 pages or so). I almost thought that XP 64 is not compatible with VMWare Server 2.0 - but the readme says it should be OK.

After asking around, my boss at work told me that there is patch/hotfix from Microsoft that I need to install to get this working. The patch is about multiple processors and virtualization that requires processor management.

There is a KB article about this: KB896256 and you can download the patch from there.

If you are running AMD processors, you also want to apply this hotfix & drivers from AMD.
And here is the rest of it.
-- read more and comment ...