In case you want to access usb attached storage media from a virtual machine (vm) running inside virtualbox there are 3 choices:

  1. Make the usb connection available to the vm.
  2. Make a shared folder to access data on the usb storage device.
  3. Give the vm direct access to the usb disk.

Using a shared folder has the advantage that configuration is straight forward (menu Device/Shared folder …). But

  • the host must handle the filesystem used on the usb storage device
  • the guest must have guest additions installed
  • performance is a bottleneck

Usb inside guest also has performance drawbacks.

So it is worth to fiddle with the command line to get direct access to disk partitions.

  • ls /dev/disk*
  • this displays all disk partions seen by OSX
  • in case finder displays the partition to be used by the vm (that is, OSX has automatically mounted this partition) you have to deactivate this partition with the OSX disk utility program
  • VBoxManage internalcommands createrawvmdk -filename yourpath/newdisk1.vmdk -rawdisk /dev/disk1
  • this creates a vmdk file which can be opened by virtualbox disk manager; this file gives access to disk1
    Use host I/o-Cache has to be enabled for the controller of this disk!

If the vm cannot be started because of disk access error the partitions of disk1 have to be deactivated again with the hard disk utility program.

The system disk /dev/disk0 would need root access rights; other disks can be accessed as user.

Leave a Reply