raw usb drive

Discussions related to using VirtualBox on Windows hosts.
Post Reply
gamez
Posts: 5
Joined: 24. Apr 2009, 21:10
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: (K)Ubuntu 9.04

raw usb drive

Post 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.
gamez
Posts: 5
Joined: 24. Apr 2009, 21:10
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: (K)Ubuntu 9.04

Re: raw usb drive

Post 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.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: raw usb drive

Post 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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
gamez
Posts: 5
Joined: 24. Apr 2009, 21:10
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: (K)Ubuntu 9.04

Re: raw usb drive

Post 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.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: raw usb drive

Post 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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply