We are going to looks at very simple process of extending the disk for a virtual machine. This Is one of the most common scenarios for any IT support staff.
Starting in Windows Server® 2012 R2, Hyper-V provides you with the ability to resize a virtual hard disk while the virtual machine is still running.
Let’s take a look, you will need access to hyper-v host with hyper-v Manager role installed. You can also do it from a remote machine where you have hyper-v Manager installed and hyper-v host added in it.
To expand the size of a virtual hard disk
You can expand the storage capacity of the virtual hard disk using the following procedure:
1) On the Windows Start screen, click the Server Manager tile.
2) On the Tools menu, click Hyper-V Manager.
3) Under Virtual Machines, select the virtual machine with the virtual hard disk that you want to expand.
4) In the Actions pane, click Edit Disk to start the Edit Virtual Hard Disk Wizard.
5) On the Before you Begin page, click Next.
6) On the Locate Virtual Hard Disk page, click Browse.
7) Navigate to your virtual hard disk. Select your virtual hard disk. Click Open.
8) Click Next.
9) On the Expand Virtual Disk page, enter the new virtual hard disk size.
Note : The size is specified in gigabytes with a maximum size of 64TB for any virtual hard disk.
10) Click Next.
11) On the Completing the Edit Virtual Hard Disk Wizard page, click Finish.
Expand the volume of a virtual hard disk connected to a virtual machine
After expanding a virtual hard disk, it is necessary to configure the disk management within your virtual machine operating system so that it can see the new disk space. This space is currently residing as an unallocated volume created in the virtual disk.
These instructions assume a virtual hard disk has been expanded and that it is connected to a Windows Server® 2012 R2 virtual machine.
1. On the Windows Start screen, click the Server Manager tile.
2. On the Tools menu, click Hyper-V Manager.
3. Under Virtual Machines, double click the virtual machine.
4. Enter credentials and login to the virtual machine.
5. To start Disk Manager, start the Server Manager.
6. On the Tools menu, click Computer Management.
7. Under Storage, click Disk Management.
8. On the middle pane, locate the existing volume in use by the virtual machine.
9. Right click the disk and click Extend Volume.
10. On the Welcome to the Extended Volume Wizard, click Next.
11. On the Select Disk page, click Next.
12. On the Completing the Extended Volume page, click Finish.
The operating system within the virtual machine will now see the expanded disk capacity.