Creating Lightweight Windows Virtual Machines for your Personal Lab Environment

Windows VMs are great… Until they hog half of your laptop’s resources, take up at least 40GB of storage and are basically unusable whenever an app requires the slightest amount of computing power.

I had that issue for a very long time until I came across this unbelievable tweet of Windows 11 running on 184MB of RAM:

https://x.com/NTDEV_/status/1876434066364383507

Any human successfully running Windows 11 on a 2009 iPod Touch amount of RAM is a legend in my books. I had to look into this in-human person who was going to be my spirit animal for the day…

As it turns out, this is not NTDEV’s first rodeo… This man eats RAM for breakfast! Looking through his previous tweets and reading his blog, I’ve realised he has released a number of tiny Windows ISOs for Windows 10 and Windows 11. These tiny ISOs are lightweight, stripped-down versions of their respective counterparts. I thought surely, they can’t be that much better than the official Windows 10 ISO.

So I tried them… Furiously deleted on a few more resources and boy was I blown away by the final resource consumption reduction!

Creating a Lightweight Windows 10 VM

First, I download the tiny10 ISO from archive.org: https://archive.org/download/tiny-10-23-h2/tiny10%20x64%2023h2.iso. You can speed up this process using aria2c to download the file with multiple server connections.

I then installed it on my Virtualisation software of choice, namely QEMU.

I booted it and decided to remove Microsoft Defender because I didn’t need it for the VM’s use case which reduced the RAM consumption a lot. I personally used the following tool which worked at the time. As these are patched by Microsoft every so often, YMMV.

I also tried the following “Debloater”, not sure if it actually did anything… Seems like most of it was already taken care of by NTDEV’s Tiny ISO.

From looking at task manager and assessing the resource consumption of different processes, this felt like a good first pass where I eliminated the most consuming resources and attempting to go any further would take unreasonable amount of time for little benefit (Pareto principle).

So that was pretty much it for optimisation…

Comparing an unmodified Windows VM with my custom Lightweight VM

The following screenshots were made under the following conditions in an attempt to provide a fair comparaison:

  • VMs were given the exact same resources
  • Both were under zero load (ie. at rest, no user application running) when the screenshots were taken
  • VM Screen Display settings were set to the same Display resolution

Task Manager Performance Windows 10

Task Manager Performance Lightweight VM

Windows 10 CPU at rest example 1

Windows 10 CPU at rest example 2

Lightweight VM CPU at rest

Drive Space Windows 10

Drive Space Tiny10

While comparing the two VMs, the following things were noted:

  • The original Windows 10 VM was using around 1.5 times the Memory (RAM) of the Lightweight VM.
  • The CPU on the Windows 10 VM was a lot more sporadic, with numerous spikes even when no user application is running, while the Lightweight VM hovered around 1 to 2 % CPU utilisation.
  • The Windows 10 VM was around 27.3 GBs while the Lightweight VM required a maximum of 10.3 GBs to install
  • The initial ISO’s used had a 2.2GB size discrepancy, with the smallest being the tiny10 ISO: 3.6G 'tiny10 x64 23h2.iso' 5.8G Win10_22H2_EnglishInternational_x64v1.iso

Further improvements are potentially possible, however you should be cautious as the more things you remove, the more likely you are to have issues, missing features and render the VM unusable.

Conclusion

Overall, there is a significant amount of bloat on full Windows 10 ISOs which can be improved provided you don’t need the features that are being removed. This results in tiny ISOs with amazing benefits:

  • Lower RAM and CPU usage
  • Smaller disk footprint
  • Faster boot and responsiveness

These can be great for lower end devices, when you need to run a lot of VMs in parallel for examples for an Active Directory Lab Environment, to save battery/energy on a device, and more…

Further Research

There are definitely more things you can delete but you risk running into issues. Resource Monitor might be a great place to start:

Other tools to consider for identifying processes hogging resources:

If you’re interested in making your own tiny ISO’s, you should look at ntdev’s GitHub repo tiny11builder which has all the tools for building a tiny Windows 11 ISO. There are also a number of GitHub forks to create tiny Windows 10 ISOs too… Do your own research.

References