Manage Virtual Hard Disks (VHD)
**
With Disk Management you can create, attach, and detach virtual hard disks. Virtual hard disks (VHDs) are disk image file formats that have similar functionalities to a physical hard drive and are designed primarily for use with Hyper-V virtual machines.
View a VHD in Disk Management
VHDs appear just like physical disks in Disk Management. When a VHD has been attached and made available to the system for use, it appears blue. If the disk is detached and made unavailable, its icon reverts to gray.
Create a VHD
Note
To complete the following steps, you must be a member of the Backup Operators or Administrators group.
To create a VHD, follow these steps:
Open Disk Management. In the search box on the taskbar, enter Computer Management, and select Disk Management.
On the Action menu, select Create VHD.
After the Create and Attach Virtual Hard Disk dialog box opens, specify the location on the physical computer where you want the VHD file to be stored.
- Under Location, select the Browse button and locate the folder you want to store the VHD.
- Enter a name for the drive in the File name field.
- Select Virtual Disk files (*.vhd) from the Save as type dropdown menu.
- Select Save.
Enter the file size under Virtual hard disk size.
Select Dynamically expanding or Fixed size under Virtual hard disk type.
Select OK to finish.
Attach a VHD
To make a VHD available for use (either one you've created or another existing VHD), follow these steps:
Open Disk management. In the search box on the taskbar, enter Computer Management, and select Disk Management.
On the Action menu, select Attach VHD.
After the Attach Virtual Hard Disk dialog box opens, select the Browse button, and find your .vhd file.
Now that you've selected the .vhd file, you return to the Attach Virtual Hard Disk dialog box. Select OK.
Detach a VHD
When you detach a VHD, you make it unavailable. You don't delete the VHD or any data stored on it.
Open Disk management. In the search box on the taskbar, enter Computer Management, and select Disk Management.
Right-click the disk, select Detach VHD, and then select OK.
Additional considerations
- The path specifying the location for the VHD must be fully qualified and can't be in the \Windows directory.
- The minimum size for a VHD is 3 megabytes (MB).
- A VHD can only be a basic disk.
- A VHD is initialized when it's created, and creating a large fixed-size VHD might take some time.