Expanding a disk in a Hyper-V environment

My name is Ito and I am an infrastructure engineer.

When it comes to virtual environments for Windows, there's Hyper-V.
The convenient thing about virtual environments is that you can change the specs later.

However, the procedure for adding disks is a little more complicated than for CPUs and memory.
So, here are the steps for adding disks to Hyper-V!

The procedure can be broadly divided into two steps

  • On the Hyper-V side
  • Working in a virtual OS

Procedure on Hyper-V side

First, on the Hyper-V side, increase the capacity of the virtual HDD used for the virtual OS

*To expand the virtual HDD, you must shut down the virtual OS.*

The following steps will be taken after shutdown

Locate the VHD file

Check the location of the HDD you are using for the virtual OS

Check the settings of the target virtual OS.
The boxed area is the location of the VHD file.
SnapCrab_NoName_2016-7-14_20-23-13_No-00_071416_082652_PM

Expanding a VHD file

Once you have confirmed the location of the VHD file, you can actually expand it

From the Hyper-V management screen, click "Edit Disk."
SnapCrab_NoName_2016-7-13_19-5-29_No-00_-_Copy_071416_083318_PM

Select the location of the VHD file you found earlier
SnapCrab_NoName_2016-7-14_20-28-35_No-00

"Extend"
SnapCrab_NoName_2016-7-13_19-6-13_No-00

Determine the size of the VHD file after expansion
SnapCrab_NoName_2016-7-13_19-6-13_No-00

The VHD file has now been expanded.
However, although the VHD file has been expanded, it has not yet been expanded on the virtual OS side.
It is recognized by Windows, but no partitions have been allocated.

So you need to expand the partition in the OS

Working in a virtual OS

We will start up the virtual OS that was shut down and expand it

From "Server Manager", go to "Storage" - "Disk Management".
(For client OS, it is "Computer Management".)

Since you are expanding the disk capacity, you will probably have some "unallocated" space
SnapCrab_NoName_2016-7-13_19-12-58_No-00

Right-click the drive you want to expand and select "Extend Volume."
SnapCrab_NoName_2016-7-13_19-13-12_No-00

The Extend Volume Wizard will appear.
If you want to extend the entire volume, just click "Next" to complete the wizard.

Done!!!
SnapCrab_NoName_2016-7-14_21-29-18_No-00

Points to note

Generally, you can only a drive that has unallocated space to its right

your partitions are set up as "C drive, D drive, unallocated" and
you want to expand the C drive, you will first need to delete the D drive.

Be careful as it's quite a hassle

If you found this article helpful , please give it a like!
21
Loading...
21 votes, average: 1.00 / 121
46,900
X facebook Hatena Bookmark pocket

The person who wrote this article

About the author