Windows development VMs¶
What is this page about?
How to set up a Windows development virtual machine (on a MacOS host with Parallels hypervisor)
Windows VM images are available from Microsoft for use with VMWare, Hyper-V, VirtualBox, and Parallels are available and are ~20 GB in size.
The VM images expire after 60 days (the expiry date should be shown on the download page). The images are provided for evaluation and demonstration (see the terms linked on the download page) and do not require activation.
The image contains Windows 10 Enterprise with Visual Studio and Visual Studio Code preinstalled. Developer mode and Windows Subsystem for Linux are enabled (Ubuntu is pre-installed). This represents and excellent starting point for development or testing.
Setup on MacOS with Parallels Desktop for Mac¶
Caveat
The following notes describe how to set up a Windows development VM as a guest on a MacOS host using Parallels Desktop for Mac 16.5.0. You will need to adapt the steps for different host OSes and hypervisors.
Download and initial setup¶
Download the Parallels virtual machine image from Microsoft.
Check the file hash of the download against the image. The values under “FileHash” in the table of downloads provided by Microsoft are SHA256 hash values (the default algorithm used by Get-FileHash
in PowerShell). On MacOS we can check the hash using shasum
, e.g.
shasum -a 256 WinDev2104Eval.Parallels.zip
replacing WinDev2104Eval.Parallels.zip
with the name of the downloaded zip archive containing the VM.
Unzip the file into your Parallels virtual machine folder, e.g.
unzip WinDev2104Eval.Parallels.zip -d ~/Parallels
replacing ~/Parallels
with your Parallels virtual machine folder (this can be found in the “Preferences” menu for Parallels Desktop).
Warning
The archive is ~20 GB in size and the extracted VM image is ~40 GB, so to extract the archive as above requires ~60 GB available disk space.
Start Parallels Desktop and from the “File” menu, select “Open” and select the .pvm
file extracted into your Parallels virtual machine folder (this is in fact a directory containing files associated with the VM).
The development VM will now be available to start within Parallels.
Recommended configuration¶
The default options for the VM in Parallels Desktop are not well-suited for development. To modify the settings, open the configuration window for the VM (“Actions” → “Configure…” from the menu bar).
Here are some recommended settings that will make the VM more suitable for development.
Hardware¶
In the “Hardware” tab of the VM configuration window
Under “CPU & Memory”, set memory to 4 GB (the default of 1.5 GB is on the low side)
Backup¶
The VM image is both large and will expire after (at most) 60 days. It is sensible to exclude this from Time Machine backups. To do this, open the Time Machine menu (from menu bar on MacOS 10.15 Catalina, Apple menu → “System Preferences…” → “Time Machine”), then select the “Options…” button in the Time Machine menu. Add the .pvm
file for the Windows development VM to the list of excluded items. Parallels should inform you that the VM is not being backed up in the “Backup” tab of the VM configuration window.
Snapshots¶
It may be useful to enable automated snapshotting of the VM. This will allow changes to be rolled back if the VM gets into a broken state. To enable this, select the “Backup” tab of the VM configuration window and check “SmartGuard”. To configure the frequency of snapshots and number of snapshots to keep, click “Details…” and modify the settings.
Hints and tips¶
License expiry¶
The evaluation license for the VM expires on the date specified on the download page. The VM should present a warning message on startup when it is nearing expiry.
A description of the VM, including the expiry date, can be viewed when the VM is running by selecting the VM name from the MacOS menu bar and then selecting the “About” option (e.g. “WinDev2104Eval” → “About WinDev2104Eval”).