For my first blogpost, I decided to keep it simple. We’re going to set up an installation of Windows Server 2016 on VirtualBox. Having a virtual Windows Server instance can be useful as a sandbox environment. In later posts, we will continue to work on this instance to try out new things without cluttering your own pc/laptop and for cases where a Windows Server installation is a requirement.
In an upcoming post, I’ll demo how to set up the same environment in Microsoft Azure as a Virtual Machine. Let’s start with the prerequisites.
In order to install Windows Server 2016 on VirtualBox, you will need 2 things:
- VirtualBox, which you can download for free here. After downloading, follow the installation wizard. The setup will ask you to install Device software. Allow this and continue. At the time of writing, the latest version of virtualbox was version 5.1.28.
- A Windows Server 2016 image. A 180-day trial can be downloaded from TechNet, by clicking on the link and registering. Alternatively, if you are lucky enough to have an MSDN account, log in to http://my.visualstudio.com and download a version of Windows Server 2016 there.
Create a new Virtual Machine
After launching VirtualBox, click on the New button with the blue icon. This will launch the Create Virtual Machine wizard. Give the virtual machine a name, set the type to Microsoft Windows and the version to Windows 2016 (64 bit).
As per the official minimum requirements for Windows Server 2016, we should allocate at least 800 MB of RAM for a virtual installation. If you want the instance to actually be useable, I recommend you allocate the amount of memory you can spare. On my machine, I have 16 GB RAM available, so I will allocate 8 GB to the Virtual Machine.
Up next, we need to create a Hard Disk. I recommend creating one at this point. VirtualBox itself specifies a size of 32 GB. Leave the defaults and click Next. For the Hard Disk file type in the following page of the wizard, we select VDI since we only use VirtualBox as virtualization software at this point. VirtualBox will ask you whether you want to dynamically allocate the storage or use a fixed size file. If you’re doing this setup on a machine with limited disk space, it’s recommended to select Dynamically allocated. This option will only use the ammount of storage that the VM actually needs on your own hard disk.
Lastly in the wizard, VirtualBox asks for a location to store the image and to specify the size. Select a location on your drive and select the amount of storage you prefer. 32 GB is the minimum requirement, so if you want to have some margin to install software on the VM, select a higher amount and click Create.
Congratulations! Your Virtual Machine is now created. However it is still an empty box at this point, just like when you buy a computer without anything installed on it. We will now install Windows Server on the VM.
Install Windows Server 2016
Installing Windows on an empty virtual machine is just like installing it on a computer: insert the DVD, boot from DVD and follow the install wizard. Right-click on the virtual machine and click Settings. In the storage-tab, select the line with a DVD-drive icon called Empty. This will show you the attributes of the empty DVD-drive of your virtual machine. Click on the DVD icon next to the Optical Drive dropdown to mount a .ISO file. Select your Windows Server 2016 ISO-file and click ok. The ISO will now be mounted in your VM once you launch it.
Now it’s time to boot your VM for the first time. Select your VM and click the Start icon. A new window appears with your launched VM. Since there is no OS installed, the mounted ISO will launch and you end up in the Windows Installation Wizard. Select your time-format and keyboard and click Next. When the big Install Now button appears, go for it! Depending on whether or not you have a product key, enter it when requested.
The wizard will ask you which Windows Server 2016 version you want to install out of the following 4:
- Windows Server 2016 Standard
- Windows Server 2016 Standard (Desktop Experience)
- Windows Server 2016 Datacenter
- Windows Server 2016 Datacenter (Desktop Experience)
The Datacenter edition contains more features commonly used in datacenter setups and is the more expensive version. For our purposes, we’ll take option 2: the standard edition with desktop experience.
After choosing a version, accept the license agreement and select the Custom installation option when asked. This is the advanced setup type. The wizard will ask you where want to install Windows. Since we only have the one virtual disk, select it and press Next. Note that in this step of the wizard, you have the option to partition your drives and install Windows on a certain partition. If you select a full drive without partitioning it, Windows will partition the full drive for you. This is the last step in the wizard. Clicking on Next now, will start the installation.
Once the installation has completed, the VM will restart and Windows Server 2016 will guide you through a first-run wizard where you set the administrator password. After that, you arrive at the login-screen and your installation is complete!
Install Guest Additions
You might notice that the resolution of your brand new virtual machine is not ideal. To fix this, VirtualBox provides Guest Additions, which are a combination of drivers and applications that can be installed on your Virtual Machine to optimize operating system and your interaction with it. It enables features like a shared clipboard and credential passing, and install video drivers and mouse pointer integration. You can run your VM without the Guest Additions, but it is recommended to install it.
To install it you have to start your VM. Once it’s running, click on the Devices menu and select Insert Guest Additions CD Image.. to mount the installation drive of the guest additions.
On your VM, open Windows Explorer and navigate to the D-drive where the guest additions drive is mounted. Run the setup. This is pretty straightforward and I won’t go into the full details. During the installation, you might get a popup asking whether you want to install device software. Click install when this pops up.
After the installation has completed, reboot the VM.
Congratulations, you’ve now installed a virtual machine containing Windows Server 2016! That’s all there is to it! A VM of Windows Server can come in handy as a playground. If you ever need to try out some software, you can install it there. It’s easy to take snapshots and revert to these if you want to go back to a clean installation.
In a future post, I will demonstrate how to install CRM Dynamics 2016 on this VM. Then things will get interesting!