Virtual USB into a VM?

Soldato
Joined
15 May 2010
Posts
10,111
Location
Out of Coventry
I'm looking for a easily repeatable way of running some software on a VM, extracting the output and restoring its snapshot - without installing the likes of VMtools.

Ideally, this would take the form of creating a virtual USB drive, mounting it on the VM, and then unmount and shutdown/restore snapshot.

As far as I'm aware, VMware doesn't allow this, but I may be wrong.

Does anyone have any ideas? Apparently QEMU something like this, but I have no experience with that software
 
Run the software off a network share? Or on an ISO which you mount into the VM for the duration of the test?
 
Run the software off a network share? Or on an ISO which you mount into the VM for the duration of the test?

I don't want the malware to spread back to the host, so a network share is probably a bad idea. An ISO could work, can the VM write back to the mounted image? It will need to write back several GB
 
I don't want the malware to spread back to the host, so a network share is probably a bad idea. An ISO could work, can the VM write back to the mounted image? It will need to write back several GB
ISO is read-only.

Since you want to be able to write, then what you need to do is create a 2nd VMDK for the VM which can be made independent (so it doesn't get snapshotted), and you could mount this VMDK on another VM to copy files to/from it if needed. Still pretty risky though (Windows will query the drive when you mount it, and who knows what malware is capable of these days). If you don't care about the contents of this drive, then you can make it non-persistent, so that when you shut down the VM, all changes to this drive are lost.
 
Back
Top Bottom