I have had to deal with extending System Partition VMDKs within our environment, but this can get tricky especially with 2003 Server and below. Hope this helps…Note that Data drives can be extended without issue on 2012 and below.
2008 and above
1. Open your VIC and edit the settings of the VM that you would like to modify.
2. Change the system disk to the new size (Usually Hard disk 1).
3. Log into your VM using the console or RDP.
4. There are two ways to do the extend. If it is 2008 R2 and above I usually do option 1. 2008 Standard and below I use option 2.
a. Open Server Manager.
b. Click Disk Management.
c. Usually you will have to do a rescan to see the unallocated space. Right click Disk Management and click Rescan Disks.
d. Right click the drive that you wish to expand (should show unallocated space) and click Extend Volume.
e. Click OK on the Extend Volume Wizard and then again click OK on the Select Disks screen. Now click Finish to complete the wizard.
f. You should now see the drive is larger.
a. Click Start –> Run and then type cmd. Right click on the command prompt application and choose Run as Administrator.
b. Type diskpart.
c. Type list volume.
d. Select the system partition by typing select volume #.
e. You should see an asterisk by the selected volume. Type extend.
f. The drive should now be extended. Type exit.
2003 Server and Below
1. Have a 2008 R2 Helper machine that you will use to expand the drive.
2. Power down the 2003 Server VM.
3. Edit the settings and add space to the system partition.
4. Power on the 2003 Server VM.
5. Click Start –>All Programs –> Administrative Tools –> Computer Management.
6. Click Disk Management. You should see the unallocated space, but if you do not then right click Disk Management and click Rescan Disks. Just verify…don’t do anything with the space yet.
7. Shutdown the 2003 Server VM.
8. Edit the 2003 Server VM within the VIC and note the location of the disk on the datastore. Click remove on the drive that you would like extended by clicking on the X next to the hard disk. DO NOT CHOOSE DELETE FILES FROM DATASTORE or REMOVE FROM VIRTUAL MACHINE AND DELETE FILES FROM DISK. This is different wording depending on the Full VIC or the Web VIC. Click OK.
9. Now find your 2008 R2 helper VM within the VIC and then edit the settings.
10. Where it says “New Device” choose Existing Hard Disk from the menu. Click Add.
11. Using the information that you noted before, find the location of the 2003 Server disk that you removed before, select the disk, click OK.
12. Cick OK and this will mount the 2003 Server disk on your 2008 R2 helper VM.
13. Log into the 2008 R2 helper VM with the console or RDP.
14. Click Start –> Run and then type cmd. Right click on the command prompt application and choose Run as Administrator.
15. Type diskpart.
16. Type list volume.
17. Select the system partition by typing select volume #.
18. You should see an asterisk by the selected volume. Type extend.
19. The drive should now be extended. Type exit.
20. Go back into the VIC and edit the 2008 R2 helper VM.
21. Click the X next to the Hard disk that you added earlier to this machine. Again, DO NOT CHOOSE DELETE FILES FROM DATASTORE or REMOVE FROM VIRTUAL MACHINE AND DELETE FILES FROM DISK.
22. Edit the 2003 Server and then from the “New device” menu click Existing Hard Disk and then click Add.
23. Find the vmdk that you just extended then click OK. Click again on the settings screen.
24. Power on the 2003 Server and you should see the additional space. You might get a message indicating that a reboot is needed. If requested, do the reboot.
Random Issues I Have Run Across
I did have an issue the other day with one our our 2008 Standard Servers. When I went to extend the drive it gave me a weird error. The parameter is incorrect.
I give thanks to the Lord every day for the googles. I found a great post by Jonathan Medd that gave the simple fix for this. When you are in diskpart, select the volume # that you are extending and then use the command extend filesystem.