Expanding disk size in Windows VM using diskpart

Dheeraj kumar
May 17, 2021

Expand the volume within the OS using diskpart utility

When you have expanded the disk for the VM, you need to go into the OS and expand the volume to encompass the new space. There are several methods for expanding a partition. This section covers connecting the VM using an RDP connection to expand the partition using DiskPart.

  1. Open an RDP connection to your VM.
  2. Open a command prompt and type diskpart.
  3. At the DISKPART prompt, type list volume. Make note of the volume you want to extend.
  4. At the DISKPART prompt, type select volume <volumenumber>. This selects the volume volumenumber that you want to extend into contiguous, empty space on the same disk. Ex: select volume 1
  5. At the DISKPART prompt, type extend [size=<size>]. This extends the selected volume by size in megabytes (MB).Ex: extend size=125000

--

--