I have a few Raspberry Pi boards now, and I find using the linux tool dd the easiest way to prepare SD cards for them.
Until now I would usually find myself dusting off an old laptop that runs a real installation of Ubuntu 12.04 (Precise Pangolin) in order to be able to do this.
My particular setup with VMs is as follows:
Host machine: Dell Precision M6600 Mobile Workstation
Host OS: Windows 7 Professional 64-bit Service Pack 1
VMware Workstation 8.0.6
Guest OSs: Multiple Linux distributions, but particularly Ubuntu 12.04 and Debian 7
With a previous laptop that I had the SD card reader was, presumably, actually connected to the USB controller as when I inserted SD cards into the slot it would automatically appear as a Removeable Device that I could connect to a guest VM. This does not happen with the SD card reader in the Dell M6600. For information it is listed in Device Manager as "O2Micro Integrated MMC/SD controller."
I had a bit of a random, Eureka! moment the other day when I was thinking about something else entirely. As the SD card reader is not a USB device then presumably Windows is treating it as a physical disk?
To test this theory I opened Computer Management (press the Win Key or open the Start Menu and start typing Computer Management) and had a look. The device was listed, although still as a removeable device:
The next step then would be to see what VMware thought about connecting it to a VM as though it were a physical disk.
In VMware, go to "Edit virtual machine settings" (my VM was powered down at the time) for your VM then in the Hardware tab click Add.
Select Hard Disk, click Next. Choose Use a physical disk (for advanced users), click Next.
Choose the correct Device, the numbers in the list correspond to the numbers in Computer Management. In my case it is PhysicalDrive2. Make sure Use entire disk is selected, click Next.
Accept the default file name for the .vmdk file, click Finish. It will then add the disk, click OK to leave the VM settings dialog.
At this point I powered on the VM, in this case it's running Ubuntu 12.04. Running sudo fdisk -l in a terminal gave an encouraging output:
Disk /dev/sdb: 15.9 GB, 15931539456 bytes
255 heads, 63 sectors/track, 1936 cylinders, total 31116288 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 8192 31116287 15554048 c W95 FAT32 (LBA)
A quick test, writing the latest Raspbian image to the SD card, confirms that it is working:
tom@tom-virtual-machine:~$ sudo dd if=Desktop/2014-01-07-wheezy-raspbian.img of=/dev/sdb
5785600+0 records in
5785600+0 records out
2962227200 bytes (3.0 GB) copied, 375.895 s, 7.9 MB/s
Selecting Action > Refresh in Computer Management shows the new partition structure:
All that remains is to shut the VM down and remove the 'Hard Disk.' Then you can eject the SD card and use as normal.