Monday, July 12, 2010

Hyper-V and Diskpart to extend an existing virtual hard disk

Using Hyper-V make sure that the virtual disk is not partitioned. If you want a new partition instead of partitioning the disk create a new disk and add it to the virtual machine.

If however the existing disk space is not enough we may need to increase the disk size using Hyper V Manager

1. Open Hyper V Manager
2. On the list of Virtual Machine make sure the machine whose disk is to be extended is shut down
3. Right click the machine and choose settings
4. On the settings dialog chose the Hard Drive (IDE Controller)
5. Under the Virtual hard disk click on the edit button
6. Under Choose action select expand
7. Under the Configure Disk change the new size to the desired value and save the changes
8. Using the Hyper V Manager Start the virtual machine.
9. If the virtual disk is a partition the newly allocated size would come up as unallocated space in Disk Management
10. We can add this to last partition created on the disk using diskpart
11. Open a command prompt (hopefully with administrative access)
12. Type Diskpart
13. Type list volume
14. Select the volume nearest to the unallocated space in the Disk Management utility discussed previously by giving the command select volume
15. Type extend
The partition would have absorbed the newly unallocated space.

Happy Extending
Anton

No comments:

Post a Comment