If you have enough memory on your Linux computer to adequately run a virtual machine, running Windows 10 that way may be more efficient than dual booting. Because of what I experienced in the past, I didn’t believe I could activate Windows 10 from within VirtualBox on Linux. I revisited this idea by following some instructions I recently discovered.
It is indeed possible and I have already proved it for myself.
The only reference you need is the Microsoft License Terms, last updated in July 2017. In paragraph 2.d.(iv) it states:
Use in a virtualized environment. This license allows you to install only one instance of the software for use on one device, whether that device is physical or virtual. If you want to use the software on more than one virtual device, you must obtain a separate license for each instance.
I encourage you to read the entire agreement. A device, as far as we’re concerned here, is either the drive itself or a virtual machine. You can use the license on one or the other but not both. It’s obvious you can’t run Windows 10 on both at the same time, on the same computer.
I found the instructions here, but I’ll repeat them. First, run this:
$ sudo tail -c +56 /sys/firmware/acpi/tables/MSDM
If it doesn’t return a license key, you won’t be able to do it this way. It worked for me with a laptop computer I bought in 2018 but it may not work for you. If it works for you, please continue. Your Windows 10 OEM license key is embedded in the firmware.
Make sure you have the latest Windows 10 ISO, which you can download from here. Create your virtual machine and remember what you’ve named it. Before you install Windows, replace win10 with your machine name:
$ sudo cat /sys/firmware/acpi/tables/MSDM > ~/VirtualBox\ VMs/win10/msdm.bin
Again, replace win10 (in both places) with your machine name:
VBoxManage setextradata "win10" "VBoxInternal/Devices/acpi/0/Config/CustomTable" "~/VirtualBox\ VMs/win10/msdm.bin"
I made one change. I surrounded the first win10 with full quotes, which are necessary if your machine name contains a space.
There are a few settings that will make Windows 10 run almost as fast in VirtualBox as it would on bare metal. Although the suggestion is for 2048 megabytes of RAM, use at least 3072. Use as much video memory as it allows. Leave virtualization at the default. Use all the cores your processor supports.
Make sure you install the extension pack, if you haven’t done so already (it’s safe to install VirtualBox from the website). Install the guest additions from within the virtual machine. After you do all this, you can set your proper display resolution after booting into Windows.
Rebooting into Windows is a pain and time-consuming. When using Windows with VirtualBox, I can save the machine state for later. Restoring the machine from a saved state is incredibly fast.
I rarely use Windows for anything. In fact, I can’t tell you when I used it for anything other than installing updates. I’ll probably use Windows 10 in a virtual environment from now on. The only reason I can think of right now would be to test some software that doesn’t run on Linux.