7

I'm trying to insert a SD card into my laptop (it's got a side slot for one) and have it show up on the guest machine running in a virtual box.

Host: Windows 7 64 for x86 Guest: Ubuntu 64bit

I want to configure things such that when I insert the SDcard into my laptop and my virtual box session is running I want to be able to see the device show up in /dev/sdX on my virtual machine.

Anyone know a way to do that? None of the settings seem to deal with SD cards.


EDIT:
It was suggested I create a rawdisk with the VBoxManager.exe with elevated privlages, I attempted it, but it fails for other reasons:

C:>"Program Files\Oracle\VirtualBox\VBoxManage" internalcommands createrawvmdk -filename MySSDDisk.vmdk -rawdisk \.\PHYSICALDRIVE3
VBoxManage.exe: error: Failed to create the VirtualBox object!
VBoxManage.exe: error: Code CO_E_SERVER_EXEC_FAILURE (0x80080005) - Server execu tion failed (extended info not available)
VBoxManage.exe: error: Most likely, the VirtualBox COM server is not running or failed to start.

1
  • Aren't SD cards shown up as USB devices in VirtualBox? Is it necessary for you that it is always the same /dev/sdX? And finally did you consider using a shared folder? Commented Aug 5, 2013 at 6:59

1 Answer 1

2

From the Windows host determine the physical drive

wmic diskdrive list > drives.txt
notepad drives.txt

Once you know your drive, you can attach it as a raw disk. Example below uses PhysicalDrive2. The following command must be done with elevated privileges:

VBoxManage internalcommands createrawvmdk -filename MySSDDisk.vmdk -rawdisk \\.\PhysicalDrive2

Attach the disk to the Virtual box and you should see the /dev/sdx when you start up Ubuntu

3
  • Got to give a +1 for the idea, but seems like it's not working for some reason. I'll have to dig into the failure unless you know why it's giving a server execution failure
    – Mike
    Commented Aug 8, 2013 at 16:00
  • Mike did you try also \\.\PhysicalDrive3 (no caps, and extra slash)? But you might be running into some other exotic thing.
    – Sentient
    Commented Aug 8, 2013 at 22:22
  • Yeah, slashes and/or caps don't seem to effect the end result at all
    – Mike
    Commented Aug 12, 2013 at 15:34

You must log in to answer this question.

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