
Let know how to add disk space to existing windows VM
Step 1: Expand the Virtual Hard Disk (.vhdx file)
The first step is to increase the size of the virtual disk file itself from the Hyper-V host. This adds the unallocated space that you’ll later absorb into the C drive.
Open Hyper-V Manager: On the host machine running Hyper-V, open Hyper-V Manager.
Shut Down the VM: Locate the VM you want to modify, right-click it, and select Shut Down. This is a mandatory step for disk expansion in Hyper-V to prevent data corruption.
Open Settings: After the VM is off, right-click it again and choose Settings….
Edit the Disk: In the left-hand pane, under the “Hard Drive” section, select the virtual disk you want to expand.
Choose “Edit”: Click the Edit button. This will open the Edit Virtual Hard Disk Wizard.
Expand the Disk: Follow the wizard prompts:
Select Expand.
Enter the new, larger size for the disk.
Finish the wizard.
Your virtual disk now has more space, but it’s not yet visible to the operating system inside the VM.
Step 2: Extend the Partition Inside the Windows VM
Now that the underlying disk has been expanded, you can log in to the VM and use Windows’ built-in tools to extend the C drive partition.
Start the VM: Go back to Hyper-V Manager, right-click the VM, and choose Start.
Log In: Log in to the VM using an account with administrator privileges.
Open Disk Management: The easiest way to open this tool is by right-clicking the Start button and selecting Disk Management.
Locate Unallocated Space: You’ll see your C drive partition, and next to it, there will be a new section of Unallocated space (often shown with a black bar above it).
Extend the Volume:
Right-click on the C drive partition (the blue bar).
Select Extend Volume….
The Extend Volume Wizard will appear. Click Next.
The wizard will automatically select all the available unallocated space. Confirm the amount of space and click Next.
Click Finish to complete the process.
The C drive will now reflect the new, larger size, and you can close Disk Management. The space is now usable.
