Using diskpart.exe with Hyper-V to setup storage

  • Find the appropriate disk.
    After logging in for the first time choose option 13 in HVConfig.cmd. This will open the command prompt if one isn’t already opened in the background already. Type the following command to list the disks in your system:
    diskpart.exe
    DISKPART> list disk

     

  • Convert the disk.
    When you only have one disk in your system you would choose to convert disk 0 to a dynamic disk:
    DISKPART> select disk 0
    DISKPART> convert dynamic

     

  • Reboot.
    Reboot your server to convert the disk.

     

  • Create the volume for the Virtual machines.
    You can now create the volume that spans the unused space on your disk. Use the following commands:
    diskpart.exe
    DISKPART> select disk 0
    DISKPART> create volume simple

     

  • Find the appropriate volume.
    After you created the volume you need to format it. Find the right volume by typing
    DISKPART> list volume

     

  • Format the drive and assign a drive letter.
    The last step is to format the volume with NTFS and assign a drive letter. Use the folloing commands:
    DISKPART>
    select volume 2
    DISKPART> format fs=ntfs label="Hyper-V Guests
    " quick
    DSKPART>
    assign letter=h
    DISKPART> exit
  • Leave a Reply

    Please log in using one of these methods to post your comment:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out /  Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out /  Change )

    Connecting to %s