Virtual hard disks (VHDs) are a type of virtual disk that can be attached to a computer and used as if it were an actual physical drive. VHDs can be created on any Windows 10-supported device, such as a USB flash drive or SD card.
The disk2vhd is a command-line tool that allows users to create and attach a VHD virtual disk in Windows 10.
Many people are unaware that Windows 10 is sufficient for connecting to and reading virtual disks in VHD format without the need to install anything else! In this tutorial, we’ll teach you how to connect a VHD virtual drive in Windows 10 utilizing a sophisticated function included in the operating system that most people, even professionals, are unaware of.
READ ALSO: How to Dual-Boot Windows on a Virtual Hard Disk (VHD)
Virtual hard disk (VHD) mounting
In the following chapters, we’ll teach you how to use Drive management to quickly load a virtual disk in VHD format on Windows. Mounted on-the-fly disks, on the other hand, will be lost the next time Windows 10 begins or restarts; to make access to the VHD file permanent, we’ll teach you how to establish a scheduled operation, which will allow you to access the virtual disk without having to repeat the mounting procedures every time.
In Windows 10, you may link VHD files.
To connect a virtual disk in VHD format to Windows 10, enter the Start menu in the bottom left corner, search disk management, open the first thing that appears in the search, and then press at the top on Action and then on Collega file VHD in the new window that appears.
Click the Browse button in the little box that appears in the middle to navigate to the location where we saved the virtual drive, pick the appropriate file, press You open, and then OK. Simply tick the box Read-only before clicking the OK button if we want the disk to be added in read-only mode (i.e., we may read the files on the drive but not add or change them).
Now that the disk is properly connected to the system, we’ll assign a letter to the new partition or partitions, and we’ll be able to access the contents of the virtual disk by opening the Start menu, searching for the File Explorer item, and finally going to the section This PC, where the new disk will appear in the Devices and Units section. If you can’t see the disk in File Explorer, it’s possible that a virtual drive letter hasn’t been given properly; to fix this, see our guide Assign / Change letter to disk drives, external drives, and USB sticks.
In Windows 10, delete the VHD file.
If we want to unmount a VHD virtual drive without having to shut down or restart the computer, all we have to do is open it again. Right-click on the virtual drive name (bottom, left) and choose Detach VHD files from the Disk Management option in the Start menu.
To disconnect the virtual drive, just click OK in the confirmation box that appears.
Make a VHD virtual disk from the ground up.
Gives Computer Management, right-click on Disk Management, and choose “Crea file VHDA window will appear, allowing you to select the VHD file size, format, and save location.
Choose VHDX as a format since it is more safe, reliable, and may be bigger and more dynamic (i.e. it grows by itself as you add files).
You should now notice another disk (Disk 2 in my instance) with it written above it in Disk Management. Unallocated and uninitialized. Right-click on the gray area of the new virtual drive and choose Initialize Disk, then pick MBR or GPT (MBR is compatible with all versions of Windows, so that’s OK).
To create a new simple volume, right-click in the white space labeled “not allocated” and choose New simple volume.
You may create additional partitions if you wish, give a drive letter to the partition, and format the virtual disk in NTFS or FAT32, just as you would with a real disk (better NTFS if you are using the virtual hard disk for backup files from your computer).
Open Windows Explorer and look for the new virtual drive that has been regarded as a USB stick.
Set the VHD disk to start automatically.
When we restart or shut down the computer, the virtual disks we mounted using Disk Management will be immediately unmounted, requiring us to repeat the procedures from the previous chapter at each boot. We’ll need to establish a scheduled job in Windows 10 if we need to access the virtual disk files on a regular basis.
To schedule the connection of the VHD virtual drive in Windows 10, go back to the Start menu, search for Scheduler, open the appropriate app, and click the right mouse button on the item Create activity.
We’ll have to act on all of the cards presented, so let’s take a few minutes and carefully follow all of the instructions in the following list:
- On the General tab, we give it a name, check the item Run regardless of users’ connections, check the item Run with the highest rights, and make sure Windows 10 is selected in the field Configure for.
- We pick the option On startup in the field Start the company under the Nel tab Activation. We tick the Activated box at the bottom of the item and then click OK.
- We’ll go to the Nel tab Actions and click New, then check Program started in the field Operation and type powershell.exe in the field Program or script.
- Always in the same window as before, we add the command Mount-DiskImage “percorso-file” to the field Add parameters (optional) (taking care to replace the file path with the one where we saved the VHD file).
- To confirm, hit OK twice at the conclusion of the setup.
The system will prompt us for our Windows account login credentials so that we may conduct this kind of scheduled action with the appropriate permissions. Let’s go directly to File Explorer -> This PC after the next reboot or start of Windows 10, so we can check if the scheduled task is working properly (we will see the virtual disk already mounted at startup).
If we don’t know how to input the file path in the above command, we may use a software called Everything, which is accessible for free on the official website.
Simply open the application once it has been installed, search for files in the “.vhd” format in the search box, right-click on the VHD virtual disk that we want to mount, and choose the item. Copy the whole route to the clipboard; now all we have to do is paste it into the PowerShell arguments box, as shown before.
Although it is not a frequent operation in the house, it is always fascinating to know that Windows 10 has a set of secret tools that can manage virtual drives (a feature reserved for corporate settings), allowing you to handle these circumstances without relying on virtualization software (the most effective are also paid and cost a lot).
If you’ve never looked at virtualization before, we suggest starting with our guidelines. What are the best programs for virtualizing operating systems? With Hyper-V in Windows 10, you may create a virtual computer.
I’ve also previously discussed how to clone a Windows drive to a VHD virtual disk.
Virtual hard disks are the most common type of storage in Windows 10. They allow you to create a disk that is then attached to your computer for use as external storage. Reference: virtual hard disk download.
Frequently Asked Questions
How do I create a VHD file in Windows 10?
To create a VHD file in Windows 10, you need to follow the following steps:
How do I create a VHD file?
To create a VHD file, you need to use the Windows Disk Management tool. You can access this tool by typing diskmgmt.msc into your Run dialog box.
How do I permanently add a VHD to Windows 10?
The easiest way to do this is by using a VHD image as a virtual hard drive.
- create vhd windows 10
- windows 10 create virtual drive from folder
- how to attach vhd permanently windows 10
- how to open vhd file
- mount-vhd assign drive letter