Following Build last week, I wanted to try running Universal Apps on a Raspberry Pi 2, but the setup instructions mention having to provision the SD card from a physical Windows 10 machine. It must be physical because the OS needs raw access to the SD card, and only Windows 10 is able to flash the card. Not having a spare machine to put Windows 10 on, I thought I was going to have to wait.
Despite what the instructions say though, it is possible to create the SD card from a VM; it’s just a bit more fiddly. Here’s what worked for me on a laptop with an integrated SD card reader running Windows 8.1, with a Windows 10 VM running inside VMWare.
First put the micro SD card into the host machine, then go to Computer Management -> Disk Management. You need to un-mount the card, so right click that SD card drive, select “Change Drive Letters and Paths”, then remove any drive letters registered to it.
Next, open a command prompt on the host machine, and type “wmic diskdrive list brief” to list the installed drives, and remember the DeviceID for the SD card.
In VMWare, power off the Windows 10 VM (which has to be build > 10069 by the way), then in VMWare settings for that machine, add a new hard disk. I chose SCSI and unselected “Independent Mode”. Select “Use a Physical Disk” and choose the device with the DeviceID that you just noted down. Be super careful to get the right one, or you’ll be giving direct access to a different drive, which will very likely get screwed up. Choose “Use entire disk”, and at the next screen let VMWare use whatever file name you like. Select “Finish”, then click “OK” to complete adding the SD card. Now power on the VM, which should have access to the card (you can ignore its warning about poor performance booting from SCSI disks).
In the VM, open a command prompt and run diskpart, then type “list disk” to get the drive number.
At this point you can go back to following the instructions at http://ms-iot.github.io/content/win10/SetupPC.htm from step 7.
Now. Time to make something fun :-).
[General warning: this information might become out of date fairly quickly – in particular, hopefully at some point Microsoft will just release an ISO which you can write straight to an SD card from any OS]