Access SD Card on Linux from Windows using VirtualBox

In order to use SD Card from Host OS (Windows) on Guest OS (Linux) through Oracle VirtualBox, follow below steps.

Step 1 – Get the Device ID of your SD card reader.
On Command Line enter below command

wmic diskdrive list brief

It will show something like this

C:\Users\rizwan>wmic diskdrive list brief
Caption                      DeviceID            Model                        Partitions  Size
WDC WD5000BPKT-75PK4T0       \\.\PHYSICALDRIVE0  WDC WD5000BPKT-75PK4T0       3           500105249280
Micro SD SCSI Disk Device    \\.\PHYSICALDRIVE1  Micro SD SCSI Disk Device    1           3964584960

So Device ID of SD Card is \\.\PHYSICALDRIVE1

Step 2 – Create VMDK file
Create the VMDK file which will link to the SD card, open a command windows as Administrator

C:\Users\rizwan>"C:\Program Files\Oracle\VirtualBox\VBoxManage" internalcommands createrawvmdk -filename "c:/Hard Disks/sdcard.vmdk" -rawdisk "\\.\PHYSICALDRIVE1"

Step 3 – Attach RAW Disk to VM
Next attach the raw disk VMDK to guest VM within the VirtualBox UI

  1. Ensure the Guest VM is not running.
  2. Ensure VirtualBox is not running
  3. Start VirtualBox by right-clicking on it and choosing “Run as administrator”
  4. Open the settings area for the guest VM
  5. Click on “Storage” in the toolbar
  6. Next to the controller click on the icon to “Add Hard Disk”
  7. Select “Choose existing disk”
  8. Navigate to the c:/Hard Disks/sdcard.vmdk and select it
  9. You should now be returned to the Storage tab and see your sdcard.vmdk in the list.

Step 4 – Start the VM
Depending on whether you have a GUI or not the SD card may or may not automatically mount. If you need to mount is manually it is simply exposed as another standard block device, so on my guest this was exposed as /dev/sdb.

  1. Posted by Alex Ianovski
    • Posted by Rizwan Ansari
    • Posted by
    • Posted by Nick Turney
  2. Posted by helios
    • Posted by Rajat
    • Posted by Rizwan Ansari
    • Posted by Erik
  3. Posted by Daniel
  4. Posted by Ben
  5. Posted by Angelica
  6. Posted by Ganindu
  7. Posted by sohil
  8. Posted by Nrusingh
  9. Posted by Queenie Egley
  10. Posted by Dutchboy688
  11. Posted by Eugene
  12. Posted by Ashvin
  13. Posted by Henry Xia

Leave a Reply

Your email address will not be published.