2

My goal is to create a disk partition that my Windows computer recognises as a removable device, but is actually a virtual hard disk.

0

1 Answer 1

5

I've searched for a while, finding similar questions with partial answers (with this being the closest: Is there software to fully emulate a USB hard drive?) However, none of them clearly answered my question.

Goal: To create a disk partition that my Windows computer recognises as a removable device, but is actually a virtual hard disk.

  1. In the start menu, search for "disk management" and click on "Create and format hard disk partitions". Wait for it to load - this may take a few seconds.

  2. In the toolbar go to Action > Create VHD.

  3. Set the location to wherever you want to place the virtual hard disk on your local file system. You have to specify the filename, not just the location. This means C:/MyContainingFolder would be wrong, and C:/MyContainingFolder/virtualusb.vhd would be correct.

  4. Specify the "Virtual hard disk size" to be however big you want your USB drive to be. NOTE: I have only tested this with the VHD format for a 64GB fixed size drive. This should work for different sized drives, but my instincts tell me that a variable size hard disk might confuse the system when mounted as removeable storage.

  5. Once this VHD (virtual hard drive) has been created, you should see it in the disk management screen. Right click and click "Intialize disk" and select the MBR (Master Boot Record) partition style. Note: GPT may work, but again I've only tested with MBR.

  6. Right-click on "Unallocated" and select "New Simple Volume..." and create a new simple volume, and follow the simple volume creation wizard to completion.

  7. Go to File Explorer and right-click -> "Eject" the volume.

  8. Install ImDisk. I got my version from SourceForge, but since I haven't verified or tested the file I'm not going to link it here. Windows Defender detected no issues as of 01/12/2023.

  9. Navigate to where you installed ImDisk (default is C:/Program Files/ImDisk) and run MountImg.exe. It will require administrator privileges.

  10. For "Image File", enter the location of your .vhd file (e.g. C:/MyContainingFolder/virtualusb.vhd)

  11. Assign a drive letter of your choice, tick the "Removable" box, and keep the device type as "Hard Disk". Press "OK", et voila!

I hope people find this helpful!

I'm writing these steps mostly from memory, as I don't like to faff around with disk partitions just for the sake of a tutorial. For the first 6 steps, I used the following resource to both create my virtual hard drive, and as a reference for this guide: https://bardimin.com/en/windows-en/how-to-create-a-virtual-usb-flash-drive-in-windows-10/

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .