Resizing a VMware disk for WinXP

This WindowsXP installation in VMware Server virtual machine was low on diskspace. So I looked at vmware-vdiskmanager which comes with VMware Server to resize the boot disk. The fact that my VMware disk was split into 2 GB slices (sigh) did not matter at all:

# ls -lgoh *vmdk
-rw------- 1 1.9G 2009-04-22 20:25 winxp-s001.vmdk
-rw------- 1 2.0G 2009-04-22 20:25 winxp-s002.vmdk
-rw------- 1 706M 2009-04-22 20:25 winxp-s003.vmdk
-rw------- 1  457 2009-04-22 20:11 winxp.vmdk

# vmware-vdiskmanager -x 6GB winxp.vmdk
Using log file /tmp/vmware-root/vdiskmanager.log
The old geometry C/H/S of the disk is: 9752/16/63
The new geometry C/H/S of the disk is: 12483/16/63
Disk expansion completed successfully.

# ls -lgoh *vmdk
-rw------- 1 1.9G 2009-04-22 20:25 winxp-s001.vmdk
-rw------- 1 2.0G 2009-04-22 20:25 winxp-s002.vmdk
-rw------- 1 706M 2009-04-22 20:25 winxp-s003.vmdk
-rw------- 1 415M 2009-04-22 20:25 winxp-s004.vmdk
-rw------- 1  457 2009-04-22 20:11 winxp.vmdk
I guess these are sparse images, growing dynamically in size. Now, we still have to tell WinXP that its boot disk has been resized. As it is the boot disk and we cannot use WinXP magic, I've decided to go with the GParted LiveCD. However, booting failed with strange SCSI errors. Chaning the VMware SCSI driver helped: simply set/add scsi0.virtualDev = "lsilogic" to your .vmx file - now GParted was booting and I was able to resize the parition. After doing that I found a resize-windows.txt on the LiveCD, stating that WinXP may have a problem when partition sizes change. Well, too late for that no as I already resized the disk. Luckily, WinXP was booting (after a chkdsk run has been forced), presenting me with a 6GB C: drive - nice :)