[TUTORIAL] – Creating your first SQL Server 2019 Lab on Virtual Box from the Scratch – Part 2: Installing and Configuring Windows Server 2016

Hi everyone,

This is the part 2 of a 3 posts series on how to create your first SQL Server 2019 Lab correctly

You may want to check the Part 1 of this series before you proceed.

So after you’ve installed Virtual Box and downloaded all the necessaries ISOs (Windows Server 2016 and SQL Server 2019), we will create our first VM.

STEP 1 – CREATING THE VIRTUAL MACHINE

 

1- Click on Machine > New..

1- Machine>New…

 

2- Specify Name, Version (Windows 2016) and Total RAM (ideally 4GB)2. Name, Version and Total RAM (Memory)

 

3- Define the Virtual Disk Directory and Name, File Size (at least 70GB), HD File Type (VDI) and Dynamically allocated. THEN Click on Create.

 

4- After the basic creation, click on Setings then General>Advanced and select Bidirectional for both options

 

5- On System > Processor:

 

6- Storage > Controller: SATA > Add Disk Symbol

 

7- Create the data Disk with the following specifications:

 

8- On Hard Disk Selector click on the Create Symbol to add the other disks:

 

9- At the end the Disks must be like this and you will have to select one by one on this order:

    1. data.vdi
    2. log.vdi
    3. tempdata.vdi
    4. templog.vdi
    5. backup.vdi

 

10- In the end you will see the Storage tab exactly like this:

 

11- Click on the CD Drive and on the CD symbol at the right:

12- Choose a Disk File > and the Windows 2016 .iso that you’ve downloaded before

 

13- Network TAB > Adapter 2 as a Host-only Adapter:

 

14- Click on Start:

 

STEP 2 – INSTALLING WINDOWS SERVER 2016

 

1- Language to Install is ALWAYS ENGLISH! Time and currency format should be defined on your Country and Keyboard obviously as your keyboard layout.

 

2- Click on “Install now”

 

3- Select Standard Evaluation WITH DESKTOP EXPERIENCE (GUI)

 

4- Accept and Next

 

 

5- Click on “Custom: Install Windows only (advanced)”

 

6- Select Drive 0 and click on New

 

7- Click on Apply with the maximum value defined by default.

 

8- Click on OK

 

9 – Select Drive 0 Partition 2 and then FORMAT. (ATTENTION: This will be the only drive formatted at this part)

 

10- For the others, just create a New Partition WITHOUT FORMAT after (we will do this Later)!

11- Click on Drive 0 Partition 2 and then Next.
The final Result will be like the image below.

12- Just wait…

13- When the installation ends you will be asked to define the Administrator Account Password. Do it and Finish

 

STEP 3 – CONFIGURING WINDOWS SERVER 2016 (for our SQL Server 2017 Lab)

DISKS CONFIGURATION

 

1- You will have to repeat it for every single Disk here (Except C:\ OBVIOUSLY!!)

 

2- Right click over a Disk and then Format

3- Specify exactly like below, including Name and Allocation Unit Size

When formatting the partition that will be used for SQL Server data files, it is recommended that you use a 64-KB allocation unit size for data, logs, and tempdb. Be aware however, that using allocation unit sizes greater than 4 KB results in the inability to use NTFS compression on the volume. SQL Server, although it is not recommended that you use this, does support read-only data on compressed volumes.

(click here to see the documentation)

 

4- The result should be like this (try to use the same names)

 

Changing the server name (hostname)

 

1- Right Click This PC and then Properties

2- On the tab computer name click on Change Settings

3- Click on Change

4- Specify the new name like LABSQLSRV01 then click on OK

5- Restart

 

INSTALLING .NET FRAMEWORK 3.5 

 

1- Click on Server Manager (the highlighted symbol on the task bar)  > Manage > Add Roles and Features

 

2- Click on Next until the Features Tab. Then click on “.NET Framework 3.5 Features” , Next and Install.

3- Then Install

 

CONFIGURING NETWORK INTERFACES

1- Open a cmd box and execute the ipconfig command to see the information that you had initially:

 

2- Go to the Network and Sharing Center

3- Uncheck the IPv6 option. DISABLE IT FOR BOTH ADAPTERS

ONLY FOR THE HOST-ONLY ADAPTER:
4- Click on the IPv4 and then Properties

5- Complete the IPv4 Properties Like that

6- (Optional) You can find the Default Gateway here on Virtual Box Host Network Manager (in our case this is the default, so don’t worry)

 

7- Search for the Windows Firewall and then DISABLE THE FIREWALL! (this is a Lab)

 

ON YOUR PC – I.E. The host machine (Not in the VM!)

8- Do this to see what is your VirtualBox Host-Only Adapter (in this case is the Ethernet 2 Adapter)

9- Then go to the Windows Defender Firewall with Advanced Security …. > Click on Customize

 

10 – UNSELECT Ethernet 2!

 

11- In the end this will be your Server Manager Windows!

UPDATING THE WINDOWS SERVER

This is the last step before install SQL Server

 

 

About Me

Bruno Bragatto has an Associate in Applied Science Degree in Industrial Automation from IFSP (São Paulo – Brazil), a Master Degree in Database Administration – FIAP (São Paulo – Brazil) and is also an Oracle Database 11g Administrator Certified Associate and a Microsoft MCSA – SQL 2016 Database Administration.


OCA - Oracle 11g Database Administrator