Official website for Linux User & Developer
FOLLOW US ON:
May
20

Virtualise Windows 8.1 in Linux

Posted by Rob Zwetsloot

Work in and develop for Windows without ever having to properly dual-boot it, by creating a virtual machine

Sometimes using Windows is a necessary evil. A lot of office environments still use Windows, and sometimes you’ll need Windows- specific applications and software if you want to work from home. There’s also the problem of developing cross-platform apps – constantly switching between operating systems is time- consuming and can, frankly, get tiring. The solution to a lot of these issues is to never dual- boot in the first place, but instead to virtualise Windows on your machine.

VirtualBox makes it easy to create virtual machines, and it’s what we’ll be using in this tutorial. It’s a bit of a different process to install Windows, though, and we’ll be covering that in detail. We can also have it interact with the folders and storage from the host machine, allowing you to set up a shared folder to access files and dev builds.

You’ll need a decently powered, modern PC to be able to run the VM smoothly, and make sure you have plenty of RAM.

Create the perfect Windows 8.1 VM
Create the perfect Windows 8.1 VM

Resources

VirtualBox
VirtualBox Guest Additions
ISO of Windows

Step-by-step

Step 01 Install VirtualBox

The necessary first step, VirtualBox is available in most repositories as the package virtualbox. Some distros – such as Fedora – don’t include it in the repositories; however, you can get binaries along with the source code from the VirtualBox website listed in the resources section.

Step 02 New virtual machine

Start up VirtualBox and click on New on
the top menu to create a new virtual machine. It will first ask you to name it, and will try to fit a category to the name. The category is mostly optional, although make sure it’s set to 32-bit or 64-bit for the version you plan to use.

Step 03 Volatile memory

You’ll need to set the RAM that the virtual machine will take from the host system. 2GB is the recommended amount for Windows 8; while you should definitely try to fulfil that requirement, we suggest using half of your system’s available RAM.

Volatile memory
Volatile memory

Step 04 Storage space

Windows requires a little more hard drive space than a Linux distro. VirtualBox will suggest 25GB; however, if you can spare the space, you should up it to 50 or 100 if you plan to use it for a bit more than basic development or office work.

Step 05 Storage type

Choose VDI as the type of hard drive you want, and then make sure it’s dynamically allocated. This means the space for the storage won’t be taken up all at once, so if you’ve created a 100GB virtual hard drive, it will only use the space it needs at any one time. Name it and click Create.

Step 06 System settings

Select the newly created VM and then hit Settings on the top bar. Go to the System tab first and enable EFI if you’re using Windows 8 or later. Next, go to Display; make sure Video Memory is set to maximum and tick Enable 3D Acceleration.

Step 07 Windows disc

Click on the Storage tab to add the Windows installation disc. Click on the empty disc icon underneath the IDE controller, and then the disc icon that shows up on the right. If you have the disc, insert it into your PC and choose ‘host drive’ from the menu. Otherwise, find and select the ISO.

Step 08 First boot

Once you’re all finished, click Start while the Windows VM is selected. It will open a window and boot into Windows installer. Go to View on the top settings and click on Fullscreen to set the VM to always launch and stay in full-screen mode. If it’s staying at a prompt screen, you may have to disable EFI.

Step 09 Install preparation

The first step in installing is to set the language, as you normally would. Click Install and then agree to the licence. After this, you’ll be asked how you want to install; click on the Custom install option to install from scratch.

Step 10 Storage

Unless you plan to do any crazy dual-booting, you will only need to select the empty space on your hard drive. Otherwise, Windows gives you tools that lets you create partitions so that you can install a Linux distro or other Windows version elsewhere.

Step 11 Wait for it

Windows can take a while to install, and will go through several phases, including rebooting once or twice during the process. Leave it alone and it will do its thing without any interruptions.

Step 12 Personalise

On Windows 8 and 8.1, you’ll now need to personalise your install with a name, colour scheme and update settings. By default, Windows will download and install updates when it sees fit. You can change the type of updates it will automatically install, or turn it to manual.

Step 13 Microsoft account

You’ll need to log into, or set up, a Microsoft-based account to use the latest versions of Windows. If you already have one, you can enter it here and log in. Otherwise, you’ll need to link an email address to a new account.

Step 14 Final setup

Wait a while and it will grab your account settings and any other data you may have associated with a Windows 8 install under your Microsoft account. After this, it will bring up the main tiled interface for you to start using.

Step 15 VirtualBox additions

You may have noticed that the screen may be the wrong resolution. To fix this, you’ll need to install the guest additions via VirtualBox. Bring up the VirtualBox menu pop-up at the bottom of the screen and click Devices and Insert Guest Additions CD image. It will automatically download it if you don’t already have it.

Right-click and select All Apps, then find the Computer. Click it and find the CD. Open it and click on the relevant Windows .exe for your system and follow the instructions.

Step 16 Shared folders

One of the better things we can take advantage of with a virtual version of Windows is a shared folder that easily allows transfer of files between the host system and Windows. Create a specific folder on the host to use a shared folder.

Step 17 Share settings

Go back into the VM and click Devices followed by ‘Shared folder settings’. Click the folder symbol with a plug sign. Click the down arrow and Other to then browse your file system and select the shared folder we set up. Name it if you wish.

Share settings
Share settings

Step 18 Access the share

Make sure you’ve selected automount and then press OK. Windows will now easily be able to see it in the file system; you’ll need to go to Network then VBOXSVR to find the folder. You can then drag it to the desktop to create a shortcut.

Step 19 Host USB

You can also access USB storage devices, like an external hard drive or USB stick, via the host computer. You’ll have to do it manually for each USB device, though. Plug in the first one you want to connect to the virtual machine and make sure it’s mounted.

Step 20 VirtualBox setup

Go into the settings for the Windows VM and select the USB tab. Make sure the USB controllers are enabled and then click the USB plug with a plus symbol. Select your USB device and it will add it to the VM; whenever it’s plugged in, it will automatically mount on Windows.

Step 21 Update to Windows 8.1

If you’ve installed Windows 8, updating to 8.1 is free. Go to the Store and the Windows 8.1 update should be prominently displayed – if not, make sure you’ve updated Windows. Otherwise, click the app and download it. During the upgrade process, you’ll have to restart and reconfirm some settings.

Step 22 Boot to desktop

Windows 8.1 now has the ability to boot into the desktop. Once you’ve completed the update, enter the Desktop. Right-click on the taskbar and open Properties, go to the Navigation tab and then select ‘Go to the desktop instead of Start when I sign in’. That’s actually the name of the option.

Step 23 Finish up

After a reboot, that setting will come into effect. You’ll now be able to properly start using your virtual Windows machine for anything you’d use a normal Windows machine for, without having to dual-boot and constantly switch back and forth.

  • Tell a Friend
  • Follow our Twitter to find out about all the latest Linux news, reviews, previews, interviews, features and a whole more.
    • http://www.axllent.org/ Ralph Slooten

      Step 13 is not entirely true. You can log in with a local account simply by clicking cancel (from memory). It’s not advertised, and they really do want you to create an online account (if you don’t have one), but it is supported :-)

    • Geoff Halsey

      Did you know that you can get free 90 day VirtualBox full versions of XP Pro, Windows 7 and 8.1 all curiously from Microsoft (maybe the not so evil empire after all). These are pre-build .OVA files for Linux, ready to go with VirtualBox guest additions installed. There’s no catch and it’s 100% legal direct from Microsoft. Absolutely fantasic stuff if you are a developer. Check out:

      http://www.modern.ie/en-us/virtualization-tools#downloads