How would I create a virtual usb storage device?

Is it possible to create an emulated or virtual usb storage device in fedora?

I run a few virtual machines using virt-manager, and have found the easiest and best way for me to transfer files to and from the guests systems is to use USB pass-through with a flash drive. It works fantastically, and I am really happy with it except for the fact that it requires a physical usb stick plugged into my laptop.

I am aware there are other options like network based transfer protocols, but I am interested in exploring this usb drive option.

So, does anyone know if it is possible to do something like this so that it would show up on the “Select USB devices for redirection” menu in virt-manager but not actually require a physical usb device plugged into my laptop?

Thanks.

2 Likes

I am unsure what you feel the benefit of this would be.

It is quite easy to create a virtual disk then mount and use that.
It is also quite easy to just have a directory on the host that you would place files in and treat that directory as your ‘virual USB device’.

Anything else just seems to add complexity to what you are asking.

I use the bridging network form rather than NAT and each VM is thus just another IP on the virbr0 device and net that is created by default. With that I can simply ssh between the VMs or use rsync to transfer files without need of any external devices.