Problem
You have Windows Server 2003 virtual machine running on VMware vSphere 4.x or 5.x and you need to expand one of the data drives (non-system) so you proceed with increasing the size of the VMDK, log onto the Windows Server to perform a refresh in Disk Management:
… then proceed with using diskpart to extend the drive but notice that the operation fails with the following:
C:\>diskpart
Microsoft DiskPart version 5.2.3790.3959
Copyright (C) 1999-2001 Microsoft Corporation.
On computer: FILE1
DISKPART> list volume
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
Volume 0 C System NTFS Partition 18 GB Healthy System
Volume 1 D Data NTFS Partition 80 GB Healthy Pagefile
Volume 2 E DVD-ROM 0 B Healthy
DISKPART> select volume 1
Volume 1 is the selected volume.
DISKPART> extend
The volume you have selected may not be extended.
Please select another volume and try again.
DISKPART>
Solution
While there can be various reasons why message:
The volume you have selected may not be extended.
Please select another volume and try again.
… would be displayed when an attempt is made to extend the drive, one of the reasons why is if you Windows page file stored on the volume:To workaround this issue, move the page file off of the drive you’re trying to expand:
… then proceed with using diskpart to extend the volume:
C:\>diskpart
Microsoft DiskPart version 5.2.3790.3959
Copyright (C) 1999-2001 Microsoft Corporation.
On computer: FILE1
DISKPART> list volume
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
Volume 0 E DVD-ROM 0 B Healthy
Volume 1 C System NTFS Partition 18 GB Healthy System
Volume 2 D Data NTFS Partition 80 GB Healthy
DISKPART> select volume 2
Volume 2 is the selected volume.
DISKPART> extend
DiskPart successfully extended the volume.
DISKPART>
5 comments:
Diskpart doesn't allow you to extend Boot Partitions - Microsoft confirms this officially. Managed to get a Dell utility called Extpart that perfectly does does with just 1 command.
Thanks Extpart works fine !
Great article, resolved my issue!
thanks a lot.
change the pagefile location resolve my issue.
JZ
Does the Guest VM Windows Server 2003 need to be shut down to first extend the vmdk file on vSphere first and then run diskpart on the Server 2003 in order successfully extend the non-system data volume?
Thank you.
Post a Comment