Steps I went through to install a Windows Insider Preview VHDX on a Macbook Pro using UTM. I needed Windows because I was developing an app to submit to the Microsoft Store. With the following setup I was able to develop an electron-based app and submit it to the Microsoft Store.
- Download the VHDX from Windows Insider Previews. You need to register for the Insider Program and sign in.
- under
Select edition
select the Canary channel and press Confirm - select language and confirm
- press Download
- under
- Open UTM and press + to create a new virtual machine
- Virtualize
- Windows
- select the VHDX checkbox and provide the path
- accept all other defaults
- (optional) tick OpenVM in order to move the VM to an external drive
- after settings are saved and you are returned to setup, use the move icon on the window bar to move your VM to an external drive
- (optional) change the default name and add a description
- (optional) increase the drive size from 64 GB to a larger size
- Click the play button to start the VM
- the BIOS screen will appear, at the prompt press any key to set up Windows from the VHDX
- once Windows setup starts open a terminal to install the spice tools because the setup procedure requires internet
- Shift + Fn + F10 to get terminal
dir D:
to check if the spice tools are mounted on the D: drive; if they are not trydir E:
etc- install the spice tools:
D: [spice tools exe]
and reboot - continue setting up Windows
- if a restart is required, do not press a key at the BIOS prompt or setup will start over
- if you are asked whether to allow Microsoft access to diagnostics etc answer yes to all these - this is the whole point of making previews publicly available and your Windows might not run optimally if you do not cooperate with this
- In Windows Settings make the following changes
- turn on Developer mode (under Privacy and Security)
- link your Windows Insider account (under Windows Update - Windows Insider Program)
- check time, date and region are set and synced (under Time and Language)
- (optional) set to never turn off (under System - Power)
- Edit the registry to bypass secure boot and TPM checks and to tell Windows you are using the Canary channel1
- search for
regedit
and run it as administrator - add a new key
Computer\HKEY_LOCAL_MACHINE\SYSTEM\Setup\LabConfig
- do this by right-clicking
Setup
inComputer\HKEY_LOCAL_MACHINE\SYSTEM\Setup
, then selectNew
thenKey
and createLabConfig
- do this by right-clicking
- to this add new DWORDs (32-bit)
BypassSecureBootCheck
(set to 1)BypassTPMCheck
(set to 1)- do this by first selecting
LabConfig
in the left-hand pane then right-click in an empty part of right-hand pane to add the DWORDs - right-click on each new DWORD and modify its value from 0 to 1
- do this by first selecting
- in
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\Applicability
- set
BranchName
toCanaryChannel
- set
- in
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\UI\Selection
- set
UIBranch
toCanaryChannel
- set
- in comments below see my comment about Microsoft renaming 25000 builds to Canary Channel. If you downloaded a build in the 25000 series and have problems if you set the branch name to
Dev
try setting it toCanaryChannel
- search for
- If you later need to update Windows 11 using Windows Update and this fails because TPM and secure boot are missing:
- copy this script
- paste it into Notebook and save it, say, as skip_tpm_check.cmd
- run it (eg right-click on it and run as administrator)
- Windows Update should work
- After any update to Windows 11 itself it is necessary to:
- run spice tools again to restore proper screen resolution:
- in file explorer in Windows 11 spice tools should show as being mounted as a CD Drive (unless you have unmounted it)
- double click
spice-guest-tools-0.164.exe
- once it has made changes, click restart
- check the registry changes have persisted, otherwise redo them
- run spice tools again to restore proper screen resolution:
At this point you should have a working Windows 11 VM.
Note that Windows 11 on ARM64 can run X64 apps. To setup a developer environment I used a mixture of arm-based apps where these were available (eg VSCode and Visual Studio) and x64 apps where there was not an official ARM64 version.
Footnotes
-
Useful sources for these changes are Toms Hardware, Winaero and Microsoft Techcommunity ↩
I reported the crash: utmapp/UTM#5477
Incidentally, even with the TPM emulation, the Windows Update : Windows Insider Program page still reports "Your PC does not meet the minimum hardware requirements for Windows 11. Your channel options will be limited." I ran PC Health Check which reported: "The processor isn't currently supported for Windows 11. Processor: virt-8.0". (I did get green check marks for Secure Boot and TPM 2.0 though, yay!)
The WindowsSelfHost registry changes do circumvent this, but it makes me wonder if they could be avoided by just having UTM report a different type of CPU. Reported at utmapp/UTM#5478.