In this tutorial we see how to run Windows in an Incus virtual machine.
- I added a Bonus Material #3 to account for the few cases that Windows does not want to run in a VM on your specific hardware configuration. I had this case only once, I recreated the VM and the problem went away. One workaround is CPU Pinning, and the other is
-cpu hostin QEMU which gives a bit more access to the CPU.
- Added that
distrobuildercan prepare Windows 10 and 11 but not 7 or 8.
distrobuildercan prepare Windows Server 2012 up to Windows Server 2022. As a sidenote, I tried with Windows Server 2012 and I got a message at the very start of the boot that some scsi.sys file is not signed. I did not investigate further, nor did I try a recent version of Windows Server.
- Added instructions to install prerequisites for
- Show how to use the profile, if you make one.
- Added description on how to put the prepared ISO into a storage volume.
- Added instructions in the Troubleshooting on how to deal with Windows crashing at the start (
- We download the Windows ISO from Microsoft. Apparently, it is possible to get ISO files for Windows 7, 8, 10 and 11. The Microsoft website may be a bit confusing, but you can definitely get ISOs for at least Windows 10 and Windows 11. Have not verified with earlier versions.
- We then use
distrobuilderto prepare the ISO files so that they get installed into the Incus VM. By doing this, we avoid manual labor later. The preparation adds special support in the new ISO so that it boots and installs in a breeze in an Incus VM. If you see the comments on my blog post, apparently there are some additional packages that may need to be installed so that
distrobuildercan do its magic. Need to look into that. As in, check the case for the missing packages for pristine Ubuntu, Debian and perhaps Fedora distros and add instructions there.
- We prepare the Incus VM with regards to how many CPU cores we can afford, RAM memory and disk space. We do these steps manually, but at the end of the tutorial we show how to put all these in a profile. Oh, I forgot to show how to use the profile once you make it. mental note.
- We attach the ISO file as a DVD device to VM and boot it. The installation commences. We need to press any key so that the VM boots from the attached DVD device. I should also mention that the input (mouse and keyboard) are locked into the VM and you can release them by pressing Ctrl+Alt at the same time. It shows this on the title bar of the VM window but still users may not notice it.
- The installation finishes. I do not mention much about the aspect of the Windows installation.
- Incus now supports USB pass-through to the VM. I do not mention that in this tutorial.
- The Incus profile is quite important to automate the process further. As I said earlier, I am not showing yet how to use the profile.
- The tutorial ends with an extensive Troubleshooting section. I did several installations in tiny different ways and recorded all issues that may arise to others that follow the steps. I also injected in the Troubleshooting section some paragraphs with advise on what choices to make for the VM. These should likely go in some different heading and not in Troubleshooting.