TQ
dev.com

Blog about software development

Subscribe

Move Windows 10 to Virtualbox

07 Jul 2016 - by 'Maurits van der Schee'

Your super-fast laptop comes with Windows 10 installed. That may seem like a waste to you when you are a real Linux geek like me, but it isn't. You can install your Windows 10 licensed copy in a VirtualBox environment that you run on the host operating system (Linux, what else?). This has the great advantage that you can easily make snapshots of your Windows environment. With snapshots you can easily revert to for instance a "clean install" situation.

Finding a valid Windows 10 key

After you received your brand new laptop you formatted it's SSD (without hesitation) and installed Linux. You may think that by removing everything from your hard drive you have lost all chances of finding the Windows 10 key that you paid for, but you are wrong. You may have noted that since Windows 8 there are no more (ugly and hard to remove) Windows stickers (containing keys) on laptops. This is because nowadays the BIOS firmware may contain "Microsoft Software Licensing Tables" named SLIC and MSDM that contain your key. As you can read here it is quite easy to extract the Windows key of the Windows installation that came with your computer; just run:

sudo cat /sys/firmware/acpi/tables/MSDM

You will find your key at the end of the "file". Now that you have found your key, you may need some installation media.

Get a Windows 10 ISO

It used to be very hard to get installation media for Windows. This made people use pirated copies, although they had paid for a license. Fortunately this is not needed anymore. Nowadays Microsoft simply offers the ISO file as a download. For VirtualBox an ISO file is very convenient as installation media. On Linux the following link brings you to a page where you can download an Windows 10 ISO:

https://www.microsoft.com/en-us/software-download/windows10

It is important that you download a matching ISO for your key. This should not be particularly hard as there are only 4 versions to choose from (Windows 10, Windows 10 KN, Windows 10 N, Windows 10 Single Language) and you typically need the first one. I noted that installing the "anniversary edition" (1607) worked on my Ubuntu 16.04, while installing the "creators edition" (1703) failed during boot hanging on the Windows logo.

Note that on Windows the above link will bring you to the "Media Creation Tool" and it really only useful if you are on Windows 10 and need to create a boot-able USB drive for a "clean install" (as described in this post).

My experience

I have only done this once, but it was with great success. I'm very happy with the result and I use it almost every day. You may encounter problems that I didn't run into. Please send your findings/comments to maurits@vdschee.nl and I'll update the post to reflect them.


PS: Liked this article? Please share it on Facebook, Twitter or LinkedIn.