Yes, you read that right. There are lots of guides out there on how to set up and run Ubuntu in VirtualBox on a Windows host.
These days, you even have access to an Ubuntu sub-system in Windows itself.
If, like me, you’re OS of choice is Ubuntu but you need to test how something behaves in Windows – is it possible to knock up an appropriate environment ?
The answer is, of course, yes – otherwise this would be quite a short post.
The following steps will work for VirtualBox on any host – Linux, Mac, even Windows.
What I’m going to cover is :
- Finding a Windows ISO
- Configuring the VM in VirtualBox
- Persuading VirtualBox to use a sensible screen size for your new VM
A quick word about versions
The Host OS I’m running is Ubuntu 16.04 LTS.
I’m using version 5.0 of VirtualBox.
NOTE – steps to install VirtualBox on a Debian-based host such as Ubuntu can be found here.
The Guest OS I’m installing is, as you’d expect, Windows 10.
Finding a Windows ISO
Depending on which Windows edition you are after, there are a couple of places you can look.
Microsoft provides an ISO for a 180-day evaluation version of Windows Server here.
In this case, I simply want to try Windows 10 so I need to go to this page.
Once here, I need to select an edition…
…and the language…
…before we’re presented with a choice of 32 or 64-bit :
I’ve chosen 64-bit. After the download, I am now the proud owner of :
-rw-rw-r-- 1 mike mike 4.7G Jul 10 17:10 Win10_1903_V1_English_x64.iso
Creating the VirtualBox VM
Fire up VirtualBox and click on the New button to start the Create Virtual Machine wizard :
…Next assign it some memory
…using the default type…
…of the size recommended by VirtualBox :
I now have a new VM, which I need to point at the Windows ISO I downloaded so that I can install Windows itself :
All I have to do now is follow the Windows installation prompts, a process which I’ll not bore you with here.
However, you may be interested to learn that you don’t necessarily require a Product Key for this installation.
Chris Hoffman has produced an excellent guide on the subject.
Installing Guest Additions
Now I’ve configured Windows, I still need to install VirtualBox Guest Additions. Among other things, this will help to control the screen size of the VM so that I don’t need a magnifying glass !
First of all, we need to virtually eject the virtual cd containing the Windows ISO. To do this, we actually go to the VM’s VirtualBox menu and select Devices/Optical Drives/Remove disk from virtual drive :
Now, using the same menu (Devices), we select Insert Guest Additions CD Image :
Accept the defaults when prompted and then reboot the VM.
If, by some chance you are still faced with a small viewport for your Windows VM, you can try the following…
Resizing the VM display
Go to the VirtualBox application itself and with the VM selected, go to the File/Preferences menu.
When you next re-start the VM, the window should now be a more reasonable size.
In fact, with any luck, your desktop should now look something like this :