Create a Virtual USB disk drive and connect it to Virtual Box
Solution 1
I know this was asked almost forever ago, but it has a lot of views so maybe my answer will help someone. I am looking into this at the moment and I don't think that the imdisk solution will work because imdisk is the software used to mount the drive. VirtualBox doesn't have any knowledge of how to handle an 'ima' file.
If you try mounting a real USB drive, you can see that the USB drive is unmounted from the Windows Explorer shell and then the USB device is assigned to the virtual machine. In Virtualization terms, this is called 'passthrough'. The reason why this works is you are giving the guest direct access (for the most part) to the hardware and the guest OS knows how to use it.
The best that you could do in this case is probably set up a virtualbox shared folder in the mounted 'ima' container. In this case, you could use it for storage, but you wouldn't be able to set it up as a bootable device for your guest.
Solution 2
Just in case someone's still stuck with this:
Create a VHD with windows Disk Management (click on a partition where you want to save the vhd image, then goto menu and do 'create vhd', select fixed size and vhd not vhdx)
Download free daemon tools 10 lite, then click on mount VHD with options and select 'removable drive'
Tested to work with Windows Recovery Drive creation which wants a pendrive to write the bootable win pe system (around 500 mb so 1GB vhd is fine)
And for VMware/VBox select from menu to mount this virtual drive there and unmount from host win system.
Tried Imdisk toolkit, PowerISO, Ultra ISO but they dont work for such virtual removable/usb pendrives, only for writeable CD/DVD
Imdisk is supposed to mount vhd as removable (option is there) but always says invalid format for VHD. (Creating vhd with imdisk seemed to want paid version)
I had been wanting a virtual pendrive image mount system since ages because many apps start wanting to create bootable pendrives, specially if you are testing multiboot pendrive type of stuff, and i had to keep erasing and writing on my 5-6 pendrives; and hyper-v/vmw/vbox all have at times required some such thing.
Related videos on Youtube
Nanobrains
Updated on September 18, 2022Comments
-
Nanobrains over 1 year
I have created a virtual USB removable disk using imdisk http://www.ltr-data.se/opencode.html/ using commands http://diddy.boot-land.net/firadisk/files/imdisk.htm (eg.
imdisk -a -s 2104515b -m R: -f C:\my_disk.ima -p "/FS:NTFS /C /Y"
to create my_disk.ima and format it as compressed ntfs drive then mount to r:)but How I can mount it to Virtual Box, it does not appear inside add USB Filter
-
Raystafarian almost 11 yearsYou should only reference the links, but post the details of what you did, in case the links go down. If you explain what commands you used, it may help users determine a solution.
-
Nanobrains about 10 yearsIdea was to make a local folder inside a windows drive act like a Virtual USB drive, so I used imdisk to create virtual USB drive from a local folder. To the windows it appears to be a virtual USB drive. It should appear as a USB drive to the virtual box as well, when I go to Virtual Box->Settings->USB->the virtual USB drive should appear as an option in drop down menu and I should be able to add it, but it does not appear there in the drop down menu, so what I am trying to figure out is how to make it appear as a USB drive to the Virtual Box.
-
-
Admin almost 2 yearsYes, finally a solution! This is the only option really working as usb pendrive. Thanks, Amitabh!