13

I have installed Virtual Box on Machine and setup a Ubuntu 9.10. And I have an external hard drive formatted for Linux. But when I hook up the external hard drive, my Ubuntu 9.10 can't see the external hard drive.

How can I setup the external hard drive for my Ubuntu 9.10 environment?

3 Answers 3

9

In the settings for your virtual machine, ensure USB is enabled and add a USB device filter so it can only be picked up by the virtual machine when it's running:

alt text

3
  • Thanks. But what kind of filter I should add to allow me to read/write to this external hard drive? I tried 'Generic', but it does not work. I tried 'New Filter', it does not work either.
    – hap497
    Dec 24, 2009 at 7:14
  • There should be preset filters if you have the device plugged in. It will show up as an option when you click on the usb cable with the + on it.
    – user1931
    Dec 24, 2009 at 7:39
  • 2
    I get "no device available"
    – gcb
    Dec 14, 2013 at 8:52
5

If USB does not work for you like it doesn't for me, or if your drive is not USB, but eSata... you may need to access the device raw.

it is possible, but not available on the usual interface.

http://www.virtualbox.org/manual/ch09.html#rawdisk

READ THE ABOVE INFO! you may lose data if not!

here is the reference for people who already read the above and just want the reference (i know it will probably be me a few months...)

VBoxManage internalcommands createrawvmdk -filename sdd.vmdk -rawdisk /dev/sdd

then go to the interface, with the machine OFF (not suspended) and add a new disk, chose the vmdk you just created, boot it and done.

0
0

Adding some infos I had to research for a similar task and adding to the answer of gcb, where using usb is not an option. So make sure to read his post first. (i cannot comment his post)

Since createrawvmdk is deprecated you can use createmedium instead, that has this syntax and creates a vmdk-file pointing to the physical Drive:

VBoxManage createmedium disk --filename <path_and_filename>.vmdk --format=VMDK --variant RawDisk --property RawDrive=\\.\PhysicalDrive123

On Windows you'll find your PhysicalDrive-Number by opening Disk Management (i.e. PhysicalDrive2). On linux it'll be "sudo fdisk -l" and the property "RawDrive=/dev/sda". For MacOS have a look on http://www.virtualbox.org/manual/ch09.html#rawdisk

Under Windows, it's possible that you'll get some Errors like VBOX_E_FILE_ERROR / VERR_ACCESS_DENIED / etc., when the VBox-service hasn't started with enough privileges. It can be enough (it was for me) to stop the service "VBoxSDS" through the task-manager and let the VirtualBox-Manager start it automatically by calling the command mentioned above. For some others i read that they had to specifically start the service with the right account.

I hope that answer shortens the search for other users.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .