Page 1 of 1

raw usb drive

Posted: 24. Apr 2009, 21:24
by gamez
Hi,

I have a fresh install of VB 2.2.0 under XP SP3 with guest Ubuntu 9.04.

I would like to make an USB drive accessible to the guest in "raw mode": the drive is "formatted" with truecrypt and has no visible filesystem, so I was wondering what are the steps to make this drive visible in the guest and have it accessed with truecrypt from within ubuntu: via USB, via shared folders, via HDD, createrawvmdk...? I know how to work with truecrypt under ubuntu, I just don't know how to map/mount the usb drive.

Any help / idea is appreciated.

g.

Re: raw usb drive

Posted: 24. Apr 2009, 21:59
by gamez
Well, it's not that complicated after all.

As explained in 9.10.1 of the user manual, use internal command createrawvmdk to create a vmdk decription file for your drive (may it be usb or IDE internal or whatever, it only needs to be visible in the windows system control drive manager); there is no filesystem nor partition needed on the drive to create the vmdk map file.

The vmdk file can then be attached to the ubuntu guest image as an additional drive, e.g. IDE primary slave.

If you boot ubuntu, the usb becomes visible under /dev/sdb for example and can be opened from truecrypt via Select Device.

g.

Re: raw usb drive

Posted: 24. Apr 2009, 22:11
by Sasquatch
It's a bit overkill the way you've done it, but possible. Have you tried to give the VM access to the USB device instead? Add an empty filter to the VM settings, boot the VM and plug in the USB stick. That should make VB grab the device. Let it install it's driver for VB USB. It might need a replug of the device, as Windows has a nasty habbit of keeping it busy which causes VB to fail to grab it properly. This should only happen once.

Re: raw usb drive

Posted: 24. Apr 2009, 22:42
by gamez
I tried that, but failed to get any further than adding the USB filter to the guest image configuration. BTW the drive is always mounted in windows, so I don't know what you mean by "VB grabbing the device". How can I test that the usb filter is active and working from the guest, how do I access from Ubuntu the device (btw it's a harddisk drive, not a stick)?

Thx, g.

Re: raw usb drive

Posted: 24. Apr 2009, 23:36
by Sasquatch
By "grabbing the device" is just what it means. You can add the mass storage device, be it a stick or external hard drive, to the VM directly. You will access it just like you would access it on a bare metal install.

Now with the solution you got, you can't access the drive on the Host if the Guest is working with it, else you will lose the data as accessing the same file system from two separate systems can, and will, cause severe data loss, as is written in the Manual.