Creating virtual servers and workstations

Now we know which services and servers we want to have, but before we install them, let's quickly review how we can create VMs and connect them to our lab network. We will use Oracle VirtualBox virtualization software for that purpose, because it is free and powerful at the same time.

VirtualBox overview and installation

As we said earlier, we will use Oracle VM VirtualBox as the virtualization platform for hosts. VirtualBox is a powerful, feature-rich, high-performance virtualization solution for enterprise as well as home use. VirtualBox is freely available as open source software under the terms of the GNU General Public License (GPL) Version 2.

Tip

You can always refer to the official VirtualBox documentation to get more information (https://www.virtualbox.org/wiki/Documentation).

VirtualBox can be launched on different operating systems and supports a large number of guest operating systems including but not limited to Windows and Linux.

Support for images of hard drives VMDK (VMware) and VHD (Microsoft Virtual PC) is able to create and use portable virtual hosts. But most importantly, VirtualBox supports snapshots, which greatly facilitates the work in our test infrastructure. So, that fact makes VirtualBox the best choice for our purpose.

Firstly, we need to get the distribution packet of VirtualBox. We can download it from the https://www.virtualbox.org/wiki/Downloads website. Choose the binaries packet for your platform and just click on the link.

After downloading, execute the obtained file. The installation process is simple and does not require specific manipulations.

After starting the VirtualBox application, you will see the Virtual Machine management interface window. This interface is pretty straightforward and does not require further explanation.

VirtualBox overview and installation

The Oracle VM VirtualBox management interface

Creating virtual machines

For creating a new virtual machine, we need to click on the New button in main toolbar of the management interface and the Create Virtual Machine wizard will start. In the window that opens, we need to set the name of the new virtual machine and select the template based on the version of the operating system. Once a template is selected, choose the default answers for the following questions (such as the location of the virtual machine files and its characteristics). After the wizard is done, we should set the installation image of the operating system. Click on the Start button on the main toolbar to start our new virtual machine.

You can get an image of the operating system on the Microsoft Corporation site. For example, for our laboratory, we used Microsoft Windows Server 2008 R2 Evaluation as a Windows server operating system. You can download this on https://www.microsoft.com/en-US/download/details.aspx?id=11093. Of course, you can use your own (purchased earlier) operating system installation images.

After starting the virtual machine, a new window will open where you can see the screen of our virtual machine and menu options to manage the virtual machine. Here, we can interact with the virtual machine like a normal application using the keyboard and mouse.

As a regular computer, the virtual machine on startup will attempt to find a bootable media and try to boot from it. If we set the image of the installation image of the operating system, then the process of the new operating system installation will start.

The process of installing an operating system is simple, and we will not describe it here. Now, we need to install two types of OS: server and workstation. In our case, we install Microsoft Windows Server 2008 R2 and Microsoft Windows 7 Professional for the demo purposes, but we recommend you to install several various Windows versions: the latest ones and a couple of the old ones (not to learn the basics of network attacks, but to stay up-to-date).

After installation of the OS, we should configure basic settings like language and regional settings, time, and time zone. In case of virtual machines, the basic settings also include the installation of an additional package: VirtualBox Guest Additions.

VirtualBox Guest Additions (https://www.virtualbox.org/manual/ch04.html) is a set of software installed in the guest operating system and expands its ability to interact with the system and the virtualization host system. For example, after you install the special driver virtual video, it is possible to change the desktop resolution of the guest OS in an arbitrary manner after the window size VirtualBox, which is running the virtual machine.

When our first Windows server and Windows workstation are installed, we should shut down the virtual machines and save them (take snapshots). We will continue to use them as templates for quick deployment of new instances.

Configuring network settings of lab components

The last action that we need to do with our virtual machines is configuring network adapters for the virtual machines. We have two main approaches that depend on implementation of our network infrastructure (based on hardware network devices and based on virtual network infrastructure).

In case of network infrastructure based on hardware devices, we need to set the network adapter in bridged mode and our virtual machine will interact with the outer world via a hardware Ethernet port of the host computer. For this, we go to the Network tab of the virtual machine settings. The virtual machine should be in Shutdown state at this moment. Select the Bridged Adapter item in the Attached to combo box. From the Name combo box, select your network adapter. It is connected to the core switch. In our case, it looks like the following screenshot:

Configuring network settings of lab components

The network interface settings of a virtual machine

In case of virtual network infrastructure based on GNS3, we need to perform the following steps for each virtual machine:

  1. Start GNS3 and go to the VirtualBox VMs settings tab. We had briefly described it in Chapter 3, Configuring Networking Lab Components, so you should remember. Anyway, this can be achieved by navigating to Edit | Preferences. In the window that opens, select VirtualBox VMs.
  2. In the VirtualBox VM Templates section, we have a list of virtual machines (if you access this tab the first time, it should be clean) and three management buttons: New, Edit, and Delete.
  3. By pressing the New button, it will start a wizard to add a new virtual machine. In first window, it asks about which existing virtual machine we would like to connect to our virtual network infrastructure.
  4. After a virtual machine is selected, GNS3 will automatically create new linked clone of the virtual machine with special network parameters, for example, we have following network settings in our case:
    Configuring network settings of lab components

    Network interface settings of the virtual machine

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.184.113