How to resize Windows partitions after VMware disk expansion
If a VMware HDD becomes small, you can enlarge it using vmware-vdiskmanager. Unfortunately you can only expand a virtual disk. If you want to reduce the size of a virtual disk, this disk have to be a "growable" disk which corresponds in vmware-vdiskmanager to "-t 0" or "-t 1". After expanding a virtual disk image with vmware-vdiskmanager and booting Windows, the operating system still shows the outdated small size of the disk. Now you have to tell Windows that the disk partition became larger. There is an onboard tool called "diskpart" which you have to execute with admin privileges to expand a NTFS partition to the full size of the disk. To accomplish this, you have to do the following after calling diskpart from the command prompt or using Windows PowerShell:
list disk
% to show available disks
list volume
% to show available volumes
% now select the corresponding disk and volume; in my case these are disk "0" and volume "0"
select disk 0
select volume 0
% now extend the selected disk; the size parameter is specified in MB
% using the following command, you can extend disk 0 by 666 MB
extend disk=0 size=666
% using the following command, you can extend the NTFS partition to the full size of disk "0"
extend disk=0
Following the steps above you can maximize the usage of a NTFS partition.
Unforunately you can't extend boot or system drives in Windows XP or Windows 2003...
ReplyDeleteNo problem if you use GParted afterwards. You can download the Live CD of GParted here:
ReplyDeletehttp://gparted.sourceforge.net/livecd.php
This tool can resize (among others) NTFS partitions. So just mount the ISO, boot from it, resize the partition (make sure that your windows was shut down clean, or it won't work), and be very happy :-)
Thanx for your great help to my convinience. This gparted works like a charme. Great comment helps a lot in a VM environment.
ReplyDeleteRoger