Win 10 IoT Core
Recently been looking at using a Raspberry Pi 3 for a modestly work-related project.
Since the rest of our platform is running on Windows 10 IoT Enterprise (aka Windows 10 Enterprise LTSB), I thought I'd give IoT Core a look in the hopes that almost no porting would be required. The hardware compatibility list deserves special mention here because there is far more RaspPi accessories available than are actually supported by Win10.
For various reasons I'm not going to have hardware for over a month, so I'm trying to give things a whirl via virtualbox. This blog post seems to be referenced numerous places as the reference to get an x86/x64 ISO of IoT Core running in a VM. But, between using some tool from the XNA developer forums and glossing over several details I started looking for other sources.
This post from a year and a half ago gave me another view as it goes over running IoT Core in VMWare. It pointed me towards investigating VHD and dism. A series of MS blogs also gave me a bit better understanding of their usage: this, this, and this.
What follows is what I did in the end to get things running.
Start by downloading IoT Core. You want the ISO for MinnowBoard MAX or whatever else is x64. Mount that and run the msi. Some stuff is installed to c:\Program Files (x86)\Microsoft IoT\.
Next, need to create a VHD image:
Once it finishes writing, right-click the drive in Disk Management and select "Detach VHD".
Since the rest of our platform is running on Windows 10 IoT Enterprise (aka Windows 10 Enterprise LTSB), I thought I'd give IoT Core a look in the hopes that almost no porting would be required. The hardware compatibility list deserves special mention here because there is far more RaspPi accessories available than are actually supported by Win10.
For various reasons I'm not going to have hardware for over a month, so I'm trying to give things a whirl via virtualbox. This blog post seems to be referenced numerous places as the reference to get an x86/x64 ISO of IoT Core running in a VM. But, between using some tool from the XNA developer forums and glossing over several details I started looking for other sources.
This post from a year and a half ago gave me another view as it goes over running IoT Core in VMWare. It pointed me towards investigating VHD and dism. A series of MS blogs also gave me a bit better understanding of their usage: this, this, and this.
What follows is what I did in the end to get things running.
Installation
Image Creation
Start by downloading IoT Core. You want the ISO for MinnowBoard MAX or whatever else is x64. Mount that and run the msi. Some stuff is installed to c:\Program Files (x86)\Microsoft IoT\.
Next, need to create a VHD image:
- Launch Disk Management
- Action -> Create VHD
- Enter a location for the file
- Use 8 GB for "Virtual hard disk size"
- I left everything else as default
- Note the name of the drive that was created (in my case it was "Disk 1")
C:\> dism /Apply-Image /Image-File:”C:\Program Files (x86)\Microsoft IoT\MinnowBoardMax_x64\flash.ffu” /ApplyDrive:\\.\PhysicalDrive1 /SkipPlatformCheck
Where PhysicalDriveN is the "Disk N"- the VHD.Once it finishes writing, right-click the drive in Disk Management and select "Detach VHD".
VM Configuration
In VirtualBox (I'm using 5.1.26), create a new VM:
- Version "Windows 10 (64-bit)"
- Memory size 2048
- "Use an existing virtual hard disk file" and browse to the VHD
After the VM is created, right-click it and select "Settings". On the System tab check "Enable EFI (special OSes only)".
Start the VM and after brief startup you should be greeted with:
Sweet, sweet victory!
Detours
There were a few miss-steps along the way.
Despite every reference I found calling out the need to boot with EFI, I managed to overlook that by the time I finally got around to setting my VM up. Should you do the same, on startup the VM will fail immediately:
FATAL: No bootable medium found! System halted.
After that, once I enabled EFI I was dropped into a UEFI shell:
Luckily, I stubbled upon the setup guide for the MinnowBoard MAX which provided the necessary hint. Guessing that the first device listed was the correct device I tried:
Only, it wasn't there. There was only an efi file for x64- it was trying to boot a 64-bit OS. I'd followed the old blogs and picked "Windows 10 (32-bit)" when setting up the VM. Nuking that VM and setting it up as "Windows 10 (64-bit)" like in the instructions above did the trick.
Astute readers might have noticed my host OS is OSX. The Windows 10 portions were also done within the confines of VirtualBox.
Luckily, I stubbled upon the setup guide for the MinnowBoard MAX which provided the necessary hint. Guessing that the first device listed was the correct device I tried:
Shell> fs0:
fs0:> efi\boot\bootia32.efi
Only, it wasn't there. There was only an efi file for x64- it was trying to boot a 64-bit OS. I'd followed the old blogs and picked "Windows 10 (32-bit)" when setting up the VM. Nuking that VM and setting it up as "Windows 10 (64-bit)" like in the instructions above did the trick.
Astute readers might have noticed my host OS is OSX. The Windows 10 portions were also done within the confines of VirtualBox.