Set up a Windows Server VM in VirtualBox


This post is a step-by-step tutorial on how to set up a Windows Server 2016 VM inside of VirtualBox. The prerequisites for this exercise are having a 64 bit computer running a 64 bit edition of Windows. You will want to have at least 16 GB of RAM as it is barely possible to even install the VM with only 8 GB or RAM. Here we also assume that you have VirtualBox already installed on Windows. The final prerequisite for this post exercise is your general knowledge and experience with IT, as we will not be explaining each step in detail, however all of the steps are included.

Seven Steps

  1. Create a virtual network
  2. Create a VM
  3. Connect the VM to the virtual network
  4. Install Windows Server 2016
  5. Install VirtualBox Guest Editions
  6. Configure a Static IP Address on Server
  7. Rename the Server

Create a virtual network

The first thing is to create a virtual network within VirtualBox. It is easy to do. It will allow the VM to access the Internet and communicate with other VMs.

  • In VirtualBox, File menu, Preferences, Network tab. Click the little plus button on the right side of the screen (Adds new NAT network).
  • Click the little tol wrench and give it a name like “MainNatNetwork” or whatever you like.
  • Change the IP address under the Network CIDR to 192.168.0.0/24
  • Leave the network options at checked for Supports DHCP and unchecked for Supports IPv6.
  • Don’t worry about port forwarding
  • Click OK
  • Now we are done with this part. Click OK.

Create a VM with VirtualBox

  • You have already downloaded Windows Server 2016 Trial ISO file.
  • Click the New button in VirtualBox
  • Click Expert Mode at the bottom of the screen
  • Give it a name in the Name box, such as a company or person name. It is the name of the inventory of VirtualBox
  • Leave the type at Microsoft Windows
  • In the version, look for Windows 2016 (64 bit) and choose it.
  • Choose 4096 MB for memory (you can go to 1 GB or 2 GB if you are low on RAM on your PC.)
  • Leave the Create a virtual hard disk now checked.
  • Click the Create button
  • Choose the file location. Normally you would just leave it as is to put it in the same location as the VM
  • File size should be about 80 GB. Change it from the default of 32GB.
  • Storage on the physical hard disk should be set to dynamically allocated.
  • Leave the hard disk file type to VDI (VirtualBox Disk Image)
  • Click Create button.
  • We are done with this section.

Connect the VM to the virtual network

Mount the Windows Server 2016 file. To mount an ISO means to virtually insert a CD into a virtual computer.

  • Open VirtualBox
  • Select the VM that we want to mount the ISO to (the one we just created)
  • Press Ctrl+S (S is for Settings)
  • Click the Storage tab on the left side
  • Select the empty disk icon in the Storage Tree section
  • Under the attributes there is another disk icon on the right hand side.
  • Click it and click on Choose Virtual Optical Disk File
  • Locate the ISO file you have already downloaded and click on the file.
  • Click Open
  • Navigate over to the Network tab
  • Under the Adapter 1 tab at the top, go to Attached to drop downloaded and
  • select Nat Network.
  • Under the Name, select the one we created earlier.
  • Click OK

At this point, our VM is on the Nat Netork and has the Windows Server 2016 ISO mounted. Next we will install Windows Server 2016.

Install Windows Server 2016

  • Open VirtualBox if it is not already open.
  • Select the VM and choose Start.
  • You will need to do some scrolling (guest edition tools are not yet installed)
  • Windows Setup starts.
  • Leave language time and currency set as English United States.
  • Leave the keyboard set to US.
  • Click Next
  • Select the version of Windows Server. Select Datacenter Evaluation (Desktop Experience)
  • You caould choose Standard if you want.
  • Click Next
  • Accept the licence terms and click Next
  • The type of installation should be Custom, not Upgrade.
  • Choose the drive you want to install it on.
  • You can optionally create partitions if you need to.
  • Now Windows begins to install. This will take some time.
  • Set the username and password of the Administrator account.
  • Don’t forget the password!
  • Press Enter
  • Log in screen appears. Press right control and delete key
  • Enter your password and you should see the desktop.

Install VirtualBox Guest Editions

This allows for copy-paste between host computer and VM and sets the screen size to fit.

  • Open your VM and log in to the Windows Server.
  • In the VirtualBox menu of the Server VM, click Devices, Insert Guest Edition CD image…
  • Click the pop up at the bottom right that says CD Drive (D:)…
  • Click Open folder to view files
  • Double click the file called VBoxWindowsAdditions
  • Next, Next, Install.
  • For all of the popups we want to go ahead and click Install and be sure to have the Always trust software from Oracle Corporation checked.
  • At the end of the wizard, click manually reboot later.
  • Click Finish.

Configure a Static IP Address on the Server

  • In Server Manager, select Local Server on the left.
  • Select the link to the right of the word Ethernet that says IPv4 address assigned by DHCP, IPv6 enabled.
  • Right click on the Ethernet icon and choose Properties
  • Uncheck IPv6 check boxSelect IPv4 and choose Properties button
  • Click Use the following IP address and add the IP addresses listed below.
  • IP address 192.168.0.10 and press the Tab key
  • SubnetMask: 255.255.255.0
  • Default gateway: 192.168.0.1 (IP address of the network itself)
  • Preferred DNS Server: 127.0.0.1
  • Alternate DNS server: 8.8.8.8 (we will use Google’s here)
  • Click OK. Click Close.

Rename the Computer

  • Still under Local Server in Server Manager, click the existing computer name at the top of the screen
  • Click Change
  • Enter in a new name in the box such as your company abbreviation followed by “DC01”
  • “DC” stands for Domain Controller.
  • Click OK. Close the Server’s window.
  • Go ahead and restart the computer (click Restart Now) and log in. (right Ctrl and Delete)
  • Adjust the window size and notice that it should now fit so you don’t have to scroll anymore. Nice.

Test Connectivity

Can the Server connect out to the Internet? Let’s test that.

  • Click the Start button
  • Type in cmd and press enter
  • When Command Prompt pops up, right click it and select pin to taskbar
  • Type ping google.com
  • You should get a reply
  • Now type in ipconfig and press enter
  • Observe what the IPv4 address is. It should be what we set it to earlier as 192.168.0.10
  • Type exit and press enter to close the Command Prompt window.
  • We’re done with this part.

Get to Know Your Server

At this point we are ready to learn more about the GUI of Windows Server 2016. Consult other documentation that explains how to navigate around Server Manager. If all went well your server is up and running. Now is the time (if you need to) to do a little research on networking and Windows domains. You may want to know a little bit about TCP/IP, DNS, DHCP among other things. The next steps for your server in your VM is to make your new server a Domain Controller.

Leave a comment

Your email address will not be published. Required fields are marked *