How do I shrink a VHD in Hyper-V?

How do I shrink a VHD in Hyper-V?

In a nutshell, in order to shrink or compact virtual hard disks, you should do the following:

  1. Open Hyper-V Manager.
  2. Launch the Edit Virtual Hard Disk Wizard.
  3. Specify the virtual hard disk whose size you want to reduce.
  4. Select the action you want to perform (Shrink or Compact).
  5. Click Finish to accept the changes.

How do I reduce the size of fixed VHD?

Compact the VHDX File Click on the Edit button. Click Next. Select Compact and then click Next. This will reduce the phyiscal size, but not the logical size of the VHDX file.

How do I resize a VHD disk?

In order to resize the system drive on the new VHD file, you use the Windows tool, Diskpart. Within Diskpart, set the disk (usually disk 1) and respective partition (usually there is only one) and then issue the ‘extend’ command.

Can you shrink a Hyper-V disk?

You can resize any of Hyper-V’s three layout types (fixed, dynamically expanding, and differencing). However, you cannot resize an AVHDX file (a differencing disk automatically created by the checkpoint function). Resizing a virtual disk file only changes the file. It does not impact its contents.

How do I shrink the size of a virtual machine?

If your virtual machine is running Windows OS, use the Disk Manager diskmgmt. msc (the Shrink Volume operation is available in all supported Windows versions; sdelete tool is used in older Windows versions to reduce the partition size) or third-party tools (like Acronis Disk Director).

Can you expand a fixed VHD?

The Resize-VHD cmdlet changes the maximum physical size of a virtual hard disk. It can expand both VHD and VHDX files but can shrink only VHDX files.

How do I increase the size of a Hyper-V disk?

Expanding the Hyper-V virtual hard disk is easy When the Settings page appears, click on the virtual hard disk you want to expand and click the Edit button. This will launch the Edit Virtual Hard Disk Wizard. When prompted by the wizard, choose the Expand option and then specify the new size for the virtual hard disk.

How do I increase the disk size in Hyper-V?

This operation is performed in the following way:

  1. Right-click the VM and select Connect. Start the virtual machine and log in.
  2. Enter DISKMGMT.
  3. Right-click the C: drive and select Extend Volume.
  4. Select the available amount of space by which you want to extend the volume.
  5. Check that you have selected the correct settings.

How do I increase disk space in Hyper-V?

Expansion of VM’s Hard Disk from Hyper-V Server

  1. To expand the Hard Disk, Right Click on your Virtual Machine>Click on Settings>Select SCSI>Select the Virtual Hard Drive that you want to extend and Click Edit.
  2. You will then be taken to the “Edit Virtual Hard Disk” wizard to locate the Virtual Hard disk.