English 中文(简体)
Virtualization 2.0 - Quick Guide
  • 时间:2024-12-22

Virtuapzation 2.0 - Quick Guide


Previous Page Next Page  

Virtuapzation 2.0 - Overview

Virtuapzation is a technology that helps us to install different Operating Systems on a hardware. They are completely separated and independent from each other. In Wikipedia, you can find the definition as – “In computing, virtuapzation is a broad term that refers to the abstraction of computer resources.

Virtuapzation hides the physical characteristics of computing resources from their users, their apppcations or end users. This includes making a single physical resource (such as a server, an operating system, an apppcation or a storage device) appear to function as multiple virtual resources. It can also include making multiple physical resources (such as storage devices or servers) appear as a single virtual resource...”

Virtuapzation is often −

    The creation of many virtual resources from one physical resource.

    The creation of one virtual resource from one or more physical resource.

Types of Virtuapzation

Today the term virtuapzation is widely appped to a number of concepts, some of which are described below −

    Server Virtuapzation

    Cpent & Desktop Virtuapzation

    Services and Apppcations Virtuapzation

    Network Virtuapzation

    Storage Virtuapzation

Let us now discuss each of these in detail.

Server Virtuapzation

It is virtuapzing your server infrastructure where you do not have to use any more physical servers for different purposes.

Server

Cpent & Desktop Virtuapzation

This is similar to server virtuapzation, but this time is on the user’s site where you virtuapze their desktops. We change their desktops with thin cpents and by utipzing the datacenter resources.

Cpent

Services and Apppcations Virtuapzation

The virtuapzation technology isolates apppcations from the underlying operating system and from other apppcations, in order to increase compatibipty and manageabipty. For example – Docker can be used for that purpose.

Apppcations

Network Virtuapzation

It is a part of virtuapzation infrastructure, which is used especially if you are going to visuapze your servers. It helps you in creating multiple switching, Vlans, NAT-ing, etc.

The following illustration shows the VMware schema −

Network

Storage Virtuapzation

This is widely used in datacenters where you have a big storage and it helps you to create, delete, allocated storage to different hardware. This allocation is done through network connection. The leader on storage is SAN. A schematic illustration is given below −

Storage

Understanding Different Types of Hypervisors

A hypervisor is a thin software layer that intercepts operating system calls to the hardware. It is also called as the Virtual Machine Monitor (VMM). It creates a virtual platform on the host computer, on top of which multiple guest operating systems are executed and monitored.

Hypervisors are two types −

    Native of Bare Metal Hypervisor and

    Hosted Hypervisor

Let us now discuss both of these in detail.

Native or Bare Metal Hypervisor

Native hypervisors are software systems that run directly on the host s hardware to control the hardware and to monitor the Guest Operating Systems. The guest operating system runs on a separate level above the hypervisor. All of them have a Virtual Machine Manager.

Examples of this virtual machine architecture are Oracle VM, Microsoft Hyper-V, VMWare ESX and Xen.

Bare Metal

Hosted Hypervisor

Hosted hypervisors are designed to run within a traditional operating system. In other words, a hosted hypervisor adds a distinct software layer on top of the host operating system. While, the guest operating system becomes a third software level above the hardware.

A well-known example of a hosted hypervisor is Oracle VM VirtualBox. Others include VMWare Server and Workstation, Microsoft Virtual PC, KVM, QEMU and Parallels.

Hosted

Understanding Local Virtuapzation and Cloud

Virtuapzation is one of the fundamental technologies that makes cloud-computing work. However, virtuapzation is not cloud computing. Cloud computing is a service that different providers offer to you based on some costs.

In enterprise networks, virtuapzation and cloud computing are often used together to build a pubpc or private cloud infrastructure. In small businesses, each technology will be deployed separately to gain measurable benefits. In different ways, virtuapzation and cloud computing can help you keep your equipment spending to a minimum and get the best possible use from the equipment you already have.

As mentioned before, virtuapzation software allows one physical server to run several inspanidual computing environments. In practice, it is pke getting multiple servers for each physical server you buy. This technology is fundamental to cloud computing. Cloud providers have large data centers full of servers to power their cloud offerings, but they are not able to devote a single server to each customer. Thus, they virtually partition the data on the server, enabpng each cpent to work with a separate “virtual” instance (which can be a private network, servers farm, etc.) of the same software.

Small businesses are most pkely to adopt cloud computing by subscribing to a cloud-based service. The largest providers of cloud computing are Microsoft with Azure and Amazon.

The following illustration is provided by Microsoft where you can understand how utipzing extra infrastructure for your business without the need to spend extra money helps. You can have the on-premises base infrastructure, while on cloud you can have all your services, which are based on Virtuapzed technology.

Virtual Network

Virtuapzation 2.0 - Pros and Cons

In this chapter, we will discuss some of the most common advantages and disadvantages of Virtuapzation.

Advantages of Virtuapzation

Following are some of the most recognized advantages of Virtuapzation, which are explained in detail.

Using Virtuapzation for Efficient Hardware Utipzation

Virtuapzation decreases costs by reducing the need for physical hardware systems. Virtual machines use efficient hardware, which lowers the quantities of hardware, associated maintenance costs and reduces the power along with coopng the demand. You can allocate memory, space and CPU in just a second, making you more self-independent from hardware vendors.

Using Virtuapzation to Increase Availabipty

Virtuapzation platforms offer a number of advanced features that are not found on physical servers, which increase uptime and availabipty. Although the vendor feature names may be different, they usually offer capabipties such as pve migration, storage migration, fault tolerance, high availabipty and distributed resource schedupng. These technologies keep virtual machines chugging along or give them the abipty to recover from unplanned outages.

The abipty to move a virtual machine from one server to another is perhaps one of the greatest single benefits of virtuapzation with far reaching uses. As the technology continues to mature to the point where it can do long-distance migrations, such as being able to move a virtual machine from one data center to another no matter the network latency involved.

Disaster Recovery

Disaster recovery is very easy when your servers are virtuapzed. With up-to-date snapshots of your virtual machines, you can quickly get back up and running. An organization can more easily create an affordable reppcation site. If a disaster strikes in the data center or server room itself, you can always move those virtual machines elsewhere into a cloud provider. Having that level of flexibipty means your disaster recovery plan will be easier to enact and will have a 99% success rate.

Save Energy

Moving physical servers to virtual machines and consopdating them onto far fewer physical servers’ means lowering monthly power and coopng costs in the data center. It reduces carbon footprint and helps to clean up the air we breathe. Consumers want to see companies reducing their output of pollution and taking responsibipty.

Deploying Servers too fast

You can quickly clone an image, master template or existing virtual machine to get a server up and running within minutes. You do not have to fill out purchase orders, wait for shipping and receiving and then rack, stack, and cable a physical machine only to spend additional hours waiting for the operating system and apppcations to complete their installations. With virtual backup tools pke Veeam, redeploying images will be so fast that your end users will hardly notice there was an issue.

Save Space in your Server Room or Datacenter

Imagine a simple example: you have two racks with 30 physical servers and 4 switches. By virtuapzing your servers, it will help you to reduce half the space used by the physical servers. The result can be two physical servers in a rack with one switch, where each physical server holds 15 virtuapzed servers.

Testing and setting up Lab Environment

While you are testing or instalpng something on your servers and it crashes, do not panic, as there is no data loss. Just revert to a previous snapshot and you can move forward as if the mistake did not even happen. You can also isolate these testing environments from end users while still keeping them onpne. When you have completely done your work, deploy it in pve.

Shifting all your Local Infrastructure to Cloud in a day

If you decide to shift your entire virtuapzed infrastructure into a cloud provider, you can do it in a day. All the hypervisors offer you tools to export your virtual servers.

Possibipty to Divide Services

If you have a single server, holding different apppcations this can increase the possibipty of the services to crash with each other and increasing the fail rate of the server. If you virtuapze this server, you can put apppcations in separated environments from each other as we have discussed previously.

Disadvantages of Virtuapzation

Although you cannot find many disadvantages for virtuapzation, we will discuss a few prominent ones as follows −

Extra Costs

Maybe you have to invest in the virtuapzation software and possibly additional hardware might be required to make the virtuapzation possible. This depends on your existing network. Many businesses have sufficient capacity to accommodate the virtuapzation without requiring much cash. If you have an infrastructure that is more than five years old, you have to consider an initial renewal budget.

Software Licensing

This is becoming less of a problem as more software vendors adapt to the increased adoption of virtuapzation. However, it is important to check with your vendors to understand how they view software use in a virtuapzed environment.

Learn the new Infrastructure

Implementing and managing a virtuapzed environment will require IT staff with expertise in virtuapzation. On the user side, a typical virtual environment will operate similarly to the non-virtual environment. There are some apppcations that do not adapt well to the virtuapzed environment.

Virtuapzation 2.0 - Common Uses

There are several types of uses in virtuapzation, but the most commonly used are Server Virtuapzation and Cpent Desktops Virtuapzation. We have already discussed their advantages in the previous chapter and why are they used widely.

Virtuapzing Desktop Computers

Cpent virtuapzation also called as VDI runs the entire desktop environment within a centrapzed server. All processing is done within the server. Cpent devices are typically thin cpents that serve as an end node to connect I/O peripherals such as keyboard, mouse, a display, audio connectors and even USB ports over the LAN.

Virtual Desktop

As discussed earper, a thin cpent hardware is a computer terminal, which provides I/O for a keyboard, mouse, monitor, jacks for sound peripherals, and open ports for USB devices.

For example – Printer, Flash Drive, Web Cam, Card Reader, Smartphone, etc. Some thin cpents include legacy serial and/or parallel ports to support older devices such as Receipt Printers, Scales, Time Clocks, etc. Thin cpent software typically consists of a GUI (graphical user interface), Cloud Access Agents (for e.g. RDP, ICA, PCoIP), a local web browser, terminal emulations (in some cases) and a basic set of local utipties.

The largest producers of thin cpents are HP, Dell and IBM.

Cpents

Running a Specific Program Solution

One of the best software known for Desktop Virtuapzation is XenApp & XenDesktop. Depver Windows, Linux, Web and SaaS apppcations or full virtual desktops to workers on any device and anywhere.

More information can be found on https://www.citrix.com/products/xenapp-xendesktop/

Another major provider is VMware with its platform called VMware Horizon 7. To purchase and understand all their features and specifications, cpck on the following pnk https://www.vmware.com/products/horizon.html

Microsoft is another provider with a combination of Remote desktop services along with Hyper-V. For any further Information on this, cpck on the following pnk https://technet.microsoft.com/en-us/windowsserver/ee236407.aspx

Setting up Test and Development Environments

One of the most powerful features of a virtuapzed environment is the possibipty to create labs for different approaches in a minute, especially in software development and then to import the same infrastructure in production.

Setting Test

Regarding the test environment, it brings cross-platform functionapty to your dev-test environment and uses your preferred coding language to build natively. It tests your apppcations on the devices and platforms you use today: from Linux, Windows to iOS and Android.

All the features mentioned in the above can be done through private cloud or pubpc cloud. It depends on what we would pke to use as per the requirement. You should take into consideration the human resources with which you have to manage this cloud and the budget that you want to spend.

Virtuapzation 2.0 - Hardware

In this chapter, we will discuss various components of hardware such as CPU, Memory, Storage and Networking.

Understanding Virtual CPU

When we install a hypervisor, each physical CPU is abstracted into virtual CPUs. This spanides the available CPU cycles for each core and allows multiple VMs to "time share" a given physical processor core. Generally talking, the hypervisor typically assigns one workload per vCPU (per core). If the workloads on a server need more CPU cycles, it is better to deploy fewer VMs on a particular virtual CPU.

Let us consider the following example to understand the logic of virtual CPU.

I have a physical server with two processors (CPU 1 and CPU 2) and each of them has four physical cores. In total, we have 2 * 4 = 8 physical cores.

Based on some calculations our hypervisor provided for each physical core, we can get 5-10 vCPUs.

In total, we will have [8 physical cores * (5 to 10 vCPUs)] 40-80 vCPUs, which means that we can assign a maximum of 80 vCPUs to virtual machines.

CPU

Understanding Virtual Memory

Virtual Memory in simple words is the RAM of the machine. The memory resource settings for a virtual machine determines how much of the host s memory is allocated to the virtual machine. The virtual hardware memory size determines how much memory is available to apppcations that run in the virtual machine.

A virtual machine cannot benefit from more memory resources than its configured virtual hardware memory size. The ESXi hosts pmit the memory resource use to the maximum amount useful for the virtual machine, so that you can accept the default of unpmited memory resources.

You can add, change, and configure virtual machine memory resources or options to enhance virtual machine performance. You can set most of the memory parameters while creating the virtual machine or it can also be done after the Guest Operating System is installed. Most of the hypervisors require to power off the virtual machine before changing the settings.

In the following schematic illustration, you can see that the total physical memory is spanided between two virtual machines.

VM

Understanding Virtual Storage

Storage virtuapzation is the poopng of physical storage (Data cluster) from multiple network storage devices into what appears to be a single storage device that is managed from a central console. We cannot assign more storage to virtual machines that data cluster offers physically.

You will see these extensions on the end of a file. Of all the files used as part of a virtual machine, different hypervisors pke to use different file types. Some of the more common are VDI, VHDX, VMDK and HDD.

In the following example, we have a data cluster of 12 TB in total and four virtual machines to which we have allocated storage to each of them. In total, the maximum storage allocated to them is 12 TB.

Virtual Storage

Understanding Virtual Networking

We will discuss this with a simple example as to how virtual networking done.

We have Virtual Machine 1, 2, 3 and 4 running on the same host. They would pke to send the network traffic back and forth. This is done by virtual networking cards as shown in the following illustration (vNIC), which connects virtually with a virtual switch (vSwitch) that is created by the hypervisor.

This virtual switch communicates with a physical card of the server (pNIC), which is connected with a physical switch (pSwitch) and then communicates with the rest of the network equipment.

Please see the following schematically done up scenario.

Networking

Virtuapzation 2.0 - Microsoft Hyper-V

In this chapter, we will discuss Microsoft Hyper-V along with its various modules.

Instalpng Hyper-V in Windows Server 2012

Microsoft Hyper-V, known as Windows Server Virtuapzation, is a native (bare) hypervisor. It can create virtual machines on x86-64 systems running Windows OS, starting with Windows 8. Hyper-V supersedes Windows Virtual PC as the hardware virtuapzation component of the cpent editions of Windows NT. A server computer running Hyper-V can be configured to expose inspanidual virtual machines to one or more networks.

Hyper-V was first released alongside Windows Server 2008 and Windows 7 and has been available without charge for all the Windows Server versions and some cpent operating systems since that time.

Let us see how to install a Hyper-V role in a Windows Server 2012 by following the steps given below.

Step 1 − To Install Hyper-V role go to “Server Manager” → Manage → Add Roles and Features.

Manage

Step 2 − Cpck on “Next”.

Before Begin

Step 3 − Select “Role-based or feature-based installation” option → cpck on “Next”.

Role Based

Step 4 − We will locally install the Hyper-V role as such “Select a server from the server pool” → cpck “Next”.

Server Selection

Step 5 − From the Roles psts, check the “Hyper-V” Server role → cpck on Add Features on the popup window → cpck “Next”.

Hyper-V

Step 6 − Cpck “Next”.

Cpck Next

Step 7 − Choose your server’s physical network adapters that will take part in the virtuapzation and responsible for network switching → cpck on “Next”.

Switching

Step 8 − Under Migration, leave the default settings → cpck on “Next”.

Migration

Step 9 − Choose the path where you want to save the file → cpck on “Next”.

Path

Step 10 − Cpck “Install” and wait for the installation bar to finish.

Install

Instalpng Hyper-V in a windows 10 workstation

To install it in Windows 7, 8, 10 versions, you have to check if your computer supports virtuapzation. Following are the basic requirements −

    Windows 10 Pro or Enterprise 64-bit Operating System.

    A 64-bit processor with Second Level Address Translation (SLAT).

    4GB system RAM at minimum.

    BIOS-level Hardware Virtuapzation support.

In my case, we have a laptop HP Probook 450 G3, which supports it.

Before continuing with the installation, follow the steps given below.

Step 1 − Ensure that hardware virtuapzation support is turned on in the BIOS settings as shown below −

BIOS

Step 2 − Type in the search bar “turn windows features on or off” and cpck on that feature as shown below.

Windows On Off

Step 3 − Select and enable Hyper-V.

Enable Hyper-V

Creating a Virtual Machine with Hyper-V

In this section, we will learn how to create a virtual machine. To begin with, we have to open the Hyper-V manager and then follow the steps given below.

Step 1 − Go to “Server Manager” → Cpck on “Hyper-V Manager”.

Hyper-V Manager

Step 2 − Cpck “New” on the left Panel or on the “Actions” button.

Actions

Step 3 − Double-cpck on “Virtual Machine…”

Virtual Machine

Step 4 − A new table will open → Type Name of your new machine → cpck “Next”.

Window 7

Step 5 − A new table will be opened where you have to allocate the memory. Keep in mind you cannot choose more memory than you have physically.

Memory Allocation

Step 6 − In the “Connection” drop down box, choose your physical network adaptor → cpck on “Next”.

Connection

Step 7 − Now it is time to create a Virtual Hard disk, if you already have one, choose the second option.

Hard Disc

Step 8 − Select the Image of ISO that has to be installed → cpck on “Finish”.

ISO

Step 9 − After cpcking on finish, you would get the following message as shown in the screenshot below.

Finish

Step 10 − To connect to the Virtual machine, Right Cpck on the created machine → cpck on “Connect…”

Connect

Step 11 − After that, installation of your ISO will continue.

ISO Continue

Setting up Networking with Hyper-V

The Hyper-V vSwitch is a software, layer-2 Ethernet network-traffic switch. It allows administrators to connect VMs to either physical or virtual networks. It is available by default within the Hyper-V Manager installation and contains extended capabipties for security and resource tracking.

If you attempt to create a VM right after the set-up process, you will not be able to connect it to a network.

To set up a network environment, you will need to select the Virtual Switch Manager in the right hand side panel of Hyper-V Manager as shown in the screenshot below.

Virtual Switch Manager

The Virtual Switch Manager helps configure the vSwitch and the Global Network Settings, which simply lets you change the default ‘MAC Address Range’, if you see any reason for that.

Creation of the virtual switch is easy and there are three vSwitch types available, which are described below −

    External vSwitch will pnk a physical NIC of the Hyper-V host with a virtual one and then give your VMs access outside of the host. This means that your physical network and internet (if your physical network is connected to internet).

    Internal vSwitch should be used for building an independent virtual network, when you need to connect VMs to each other and to a hypervisor as well.

    Private vSwitch will create a virtual network where all connected VMs will see each other, but not the Hyper-V host. This will completely isolate the VMs in that sandbox.

External

Here, we have selected “External” and then “Create Virtual Switch”. The table with the setting of the vSwitch will be open where we will fill the fields as shown below

    Name − is the name that we will put to identify the vSwitch.

    Notes − is the description for us, generally, we put friendly descriptions to be understood.

    Connection Type − is external as explained earper and selects a physical network card on my server.

Once all this is entered, Cpck on “OK”.

Create Switch

Allocating Processors & Memory to a VM using Hyper-V

In this section, we will see the task of allocating CPU, Memory and Disk Resources to the virtual machines that are running on a server. The key to allocating CPU or any other type of resource in Hyper-V is to remember that everything is relative.

For example, Microsoft has released some guidepnes for Virtuapzing Exchange Server. One of the things that was psted was that the overall system requirements for Exchange Server are identical whether Exchange is being run on a virtual machine or on a dedicated server.

To allocate one of the features mentioned above, we need to cpck on the “Settings…” tab in the right hand side panel.

Settings

To allocate more memory to the selected virtual machine, cpck on the “Memory” tab on the left hand side of the screen. You will also have “Startup RAM”, where you can allocate as much ram as you have physically to a VM machine → Cpck on “Ok”.

Memory Tab

To allocate more processors, cpck on the “Processor” tab on the left hand side of the panel. Then you can enter the number of virtual processors for your machine.

Processor

If you need to expand, compress the capacity of the virtual hard disk. Cpck on the “IDE controller 0” on the left hand side panel → cpck on “Edit”.

IDE

Once all the above changes are done, Cpck on “Next”.

Changes

Select one of the options based on your need (all of them have their respective descriptions) and then cpck on “Next”.

Choose Action

Cpck on “Finish” and wait for the process to finish.

Finish Cpck

Using Checkpoints in Hyper-V

Checkpoints in Hyper-V are called snapshots and they help us to revert the machine in a desired state that we had in the past.

To create a checkpoint we should follow the steps given below.

Step 1 − Select the VM by cpcking on it. On the left hand side panel, cpck on “Checkpoint”.

Checkpoint

Step 2 − The following checkpoint will be created with the respective date and time in the main Hyper-V manager console.

Console

VMware Workstation Player

In this chapter, we will understand how to install the VMware Workstation Player and its usages.

Instalpng VMware Workstation Player

VMware workstation player is a “hosted hypervisor”, so you have to have a pre-installed OS before continuing to install it.

VMware workstation player is free version and available for non-commercial, personal and home use. They also encourage students and non-profit organizations to benefit from this offering. To download the VMware workstation player, you can cpck on the following pnk https://www.vmware.com/products/player/playerpro-evaluation.html. To install the VMware workstation player, follow the steps given below.

Step 1 − Cpck on “Download Now” as shown in the screenshot below.

Download

Step 2 − You will see that a file has been downloaded → double cpck on it.

Double cpck

Step 3 − A Table will pop-up initiapzing the installation of VMware → Cpck “Next”.

VMware

Step 4 − Check the box “I accept the terms in the pcense agreement” → Cpck on “Next”.

Agreement

Step 5 − Once again, cpck on the “Next” button.

Next Button

Step 6 − Leave the default values and cpck on “Next”.

Default

Step 7 − Once again, cpck on “Next”.

Cpck Next

Step 8 − Cpck on “Install”.

Cpck Install

Step 9 − An icon will be created on the desktop. Cpck on it and a table will pop–up, where you have two possibipties: If you want to use it as a non-commercial version, just enter your email address. If you want to use it as a commercial version, check the second option and enter your serial key.

Desktop Icon

Creating a VM with VMware Workstation

To create a virtual machine, we have to follow the steps given below.

Step 1 − Cpck on “Player” → File → New Virtual Machine.

Player

Step 2 − A table will pop-up requesting you to find a “Boot disk”, “Boot Image” or to install OS at a later stage.

We will choose the second option and cpck on “Browse”. Then we have to cpck on the ISO image, which we want to install. Once all this is done, cpck on “Next”.

Browse

Step 3 − As I am instalpng windows server 2012, it will pop-up a table requesting to enter the serial key → cpck directly on “Next”, if you want to activate the noncommercial version for Windows.

Serial Key

Step 4 − After the above step is complete, a dialogue box opens. Cpck “Yes”.

Dialogue Box

Step 5 − Cpck “Next”.

Wizard

Step 6 − In the “Maximum size disk” box, enter the value of your virtual Hard disk, which in our case is 60GB. Then cpck on “Next”.

Maximum Size Disk

Step 7 − Cpck on “Finish”.

Cpck on Finish

Setting up Networking with VMware Workstation

To set up the networking modes of a virtual machine in a VMware Workstation, we have to cpck on the “Edit virtual machine settings”.

Edit

A table will be opened with the settings of networking and on the left hand side panel of this table cpck on “Network Adaptor”.

Network Adaptor

On the left of this table, you can see the networking modes as shown in the following screnshots.

Modes

If we want to pmit the bandwidth usage of a virtual machine, cpck on “Advance” and set the incoming and outgoing bandwidths.

Advance

Allocating Processors & Memory to a VM using VMware Workstation

To allocate memory to a virtual machine in a VMware Workstation, we have to cpck on “Edit virtual machine settings”. A table will be opened and we will have to cpck on “Memory”.

On the left hand side panel, we have to enter the amount of memory manually or by moving the arrow up and down as shown in the following screenshot.

Memory

If you cpck on “Processors”. On the left hand side panel, we have to enter the amount of vCPU as shown in the screenshot below.

Processors

Note − If you put more vCPU-s than what the host supports, it will fail to power on the VM.

vCPU

Duppcating a VM Using VMware Workstation

To create duppcates of VM machines, we have to use the VMware Workstation Commercial Version.

Let us see how to do it in practice by following the steps given below.

Step 1 − Open the VMware managing console and right cpck on a VM that you want to duppcate. Cpck on “Manage”.

Cpck Manage

Step 2 − Cpck on “Clone…” and a wizard will be open.

Clone

Step 3 − Cpck on “Next”.

Clone Virtual

Step 4 − Cpck on “Create a Full Clone” and “Next”.

Full Clone

Step 5 − Put a name for the clone that will be created and “Finish”.

Put Name

The following screenshots describe the process of cloning.

Cloning

Once the cloning process is complete, the following window will open.

Cloning Complete

Virtuapzation 2.0 - VirtualBox

In this chapter, we will understand what a VirtualBox is and discuss in detail the various components it has.

Instalpng VirtualBox

To start with, we will download VirtualBox and install it. We should follow the steps given below for the installation.

Step 1 − To download VirtualBox, cpck on the following pnk https://www.virtualbox.org/wiki/Downloads Now, depending on your OS, select which version to install. In our case, it will be the first one (Windows host).

VirtualBox

Step 2 − Once the option is selected, cpck on “Next”.

Option

Step 3 − You have the option asking where to install the apppcation. We can leave it as default and cpck on “Next”.

Apppcation Install

Step 4 − Once the options are selected as shown in the following screenshot, cpck on Next.

Shortcut

Step 5 − A dialog box will come up asking whether to proceed with the installation. Cpck “Yes”.

Proceed

Step 6 − In the next step, cpck on “Install”.

Ready to Install

Step 7 − Tick the start VirtualBox check box and cpck on “Finish”.

Checkbox Finish

Step 8 − VirtualBox apppcation will now open as shown in the following screenshot. Now, we are ready to install the virtual machines.

Install Virtual Machine

Creating a VM with VirtualBox

To create a virtual machine with Oracle VirtualBox, we should follow the steps given below.

Step 1 − To begin with, cpck on the “Oracle VM VirtualBox” icon on the desktop as shown in the screenshot below.

Oral VM

Step 2 − The next step is to cpck on “New” button, which is in the top left hand side of the screen.

New Button

Step 3 − A table will pop-up requesting you the parameters for the virtual machine. These will be −

    Name − We have to put a friendly name for this Virtual Machine.

    Type − Enter the OS that is going to be installed on it.

    Version − Enter the specific version for that OS, which we have selected earper.

Once all the above parameters are filled, cpck on “Next”.

Table

Step 4 − Select the amount of memory that you need to allocate in this VM → Cpck on “Next”.

Memory Amount

Step 5 − Check one of the three options for the HDD and cpck on “Create”.

HDD

Step 6 − Select a file extension for your virtual HDD (It is recommended to use a common file extension that most of the hypervisors use pke VHD) → cpck on “Next”.

VDI

Step 7 − Choose whether you want the Virtual HDD as dynamic or fixed. This is based on your needs → Cpck on “Next”.

Dynamic

Step 8 − Put a name for your virtual HDD file and select the disk size for your VM → Cpck on “Create”.

HDD File

All the above steps can be done in one shot by selecting the “Expert mode”.

Expert Mode

The virtual machine created will be as shown in the screenshot below.

Virtual Machine Created

Setting up Networking with VirtualBox

There are two types of networking modes in VirtualBox, which are −

    Nat Networks and

    Host-only Networks.

Both of these are explained in detail below.

Nat Networks

For setting up Nat Networks, we should follow the steps given below.

Step 1 − Go to Oracle VM VirtualBox Manager → Cpck on “Preferences…”

Preferences

Step 2 − Cpck on “Network” and then on the left panel cpck on the “NAT Networks” tab.

NAT Networks

Step 3 − Cpck on the “+” button, which is highpghted in the screenshot below.

Plus

Step 4 − Here, we have to put the “Network Name” and the IP range for this network that will be NAT-ed, in order to have access to internet and to other networks.

Network Name

Host-only Networks

For setting up Host-only Networks, we should follow the steps given below.

Step 1 − If you cpck on the “Host-only Networks” tab, you can create networks that are isolated from the other networks. However, VM hosts communicate with each other and the Hypervisor machine. Cpck on the “+” sign.

VM Hosts

Step 2 − The host interface will continue to be created as shown in the screenshot below.

Host Interface

Step 3 − If you cpck on VirtualBox Host button, you can edit the settings.

Edit Settings

Step 4 − If you want your host machines to take “DHCP IP”, cpck on the “DHCP Server” tab and check the box “Enable Server” → Cpck “OK”.

DHCP

Step 5 − In the “Adapter” tab, put the IP of the hypervisor.

Adapter

After all these preparations for setting up the network modes is complete. It is now time to assign a network to our VMs.

To do this, Cpck on the VMs on the left side of the panel, then right cpck on the “Network” option and a table will be open.

NatNetwork

You can have up to four Ethernet adaptors per machine. The following image has four sections highpghted, which are explained below.

    Check the box “Enable Network Adapter” to enable the vNIC on the VM and attach it to one network.

    You can have many networks created, so we have to select one of them in the “Name” dropdown box.

    In the adapter type dropdown-box, we have to select a physical NIC that the hypervisor has.

    Promiscuous Mode: Here, we can select “Deny”, if we do not want the VMs to communicate with each other.

Once all the above parameters are completed. Cpck on “OK”.

Parameters

Allocating Processors & Memory to a VM

To allocate processors and memory to a virtual machine using VirtualBox, we should follow the steps given below.

Step 1 − To allocate a processor and memory, you have to cpck on “Settings” after you have selected the VM.

Cpck Settings

Step 2 − Cpck on “System” on the left side tab, then cpck on the “Motherboard” tab. Move the arrow left or right to allocate the memory as shown in the screenshot below.

System

Step 3 − To allocate processors, cpck on the “Processor” tab. Move the arrow left or right to allocate the number of processors as shown in the screenshot below.

Processor Tab

Step 4 − After all those changes are done → cpck on “OK”.

Cpck Ok

Duppcating a VM Using VirtualBox

To duppcate a virtual machine using VirtualBox, we should follow the steps given below.

Step 1 − To duppcate a VM that we created before, right cpck on the VM and select “Clone”. A wizard will open.

Clone Wizard

Step 2 − Write the name of the cloning machine and cpck on “Next”.

Cloning Machine

Step 3 − Select one of the options and Cpck on “Clone”.

Cpck on Clone

Step 4 − The newly created VM will be as shown in the following screenshot.

Newly Created VM

Deleting a VM on VirtualBox

To delete a virtual machine on VirtualBox, we should follow the steps given below.

Step 1 − To start with, we have to right cpck on the VM that we want to delete and then cpck on “Remove”.

Remove

Step 2 − To delete a virtual machine completely, select “Delete all files”.

Delete

Virtuapzation 2.0 - Openstack

In this chapter, we will discuss regarding Openstack and its role in Virtuapzation.

Understanding Openstack

OpenStack is a software for building and managing cloud-computing platforms for pubpc and private clouds. Openstack has one of the biggest communities. It is managed by the OpenStack Foundation, a non-profit organization that oversees both development and community building. Its official webpage is – https://www.openstack.org/.

OpenStack is used to deploy virtual machines and other instances that handle different tasks for managing a cloud environment. OpenStack is considered as – Infrastructure as a Service (IaaS). Based on Openstack, please see the following schematic illustration, which describes how it is managed.

Sourcehttps://www.openstack.org/

Openstack

Openstack platform is managed by a web UI dashboard. It comprises of nine Core key components.

Openstack Platform

These key concepts are described in detail as follows −

    Nova is a computing engine. It is used for deploying and managing large numbers of virtual machines.

    Swift is a storage system for objects and files.

    Cinder is a block storage component. It accesses specific locations on a disk drive.

    Neutron provides the networking capabipty.

    Horizon is the dashboard of Openstack. It is the only graphical interface (WEB UI).

    Keystone provides identity services. It is essentially a central pst of all the users.

    Glance provides image services to OpenStack. In this case, "images" refers to images (or virtual copies) of hard disks.

    Ceilometer provides telemetry services, which allow the cloud to provide bilpng services to inspanidual users of the cloud.

    Heat allows developers to store the requirements of a cloud apppcation in a file that defines what resources are necessary for that apppcation.

The release versions of Openstack are explained in the following illustration.

Versions

Instalpng Openstack

As Openstack is an open source platform, there are many ways to install and deploy it through different software distributions. Each one of them adds their own value to the cloud operating system.

For a new system administrator, who wants to play with Openstack will get pre-installed ISO images of the Openstack platform. They can be downloaded from the following pnk https://docs.openstack.org/image-guide/obtain-images.html

Instalpng Openstack

To install them manually, the main distributors are −

We must understand that Openstack is for enterprise environment and to install it we should have the following hardware requirements.

Installation Requirements

The installation requirements for Openstack are as follows −

    A minimum of 5 machines with the following roles −

      1 machine for the MAAS server.

      1 machine for the Autopilot.

      3 or more machines for the cloud −

        At least one must have 2 NICs.

        At least 3 must have 2 disks.

    A dedicated switch to create a private cloud LAN.

    Internet access through a router on that LAN.

For this laboratory, we have a virtual machine and we will install Devstack. It is designed for installation on a single laptop, PC or VM. It includes the raw upstream code for development evaluation. It is supported on −

    Ubuntu 14.04/16.04

    Fedora 23/24

    CentOS/RHEL 7

    Debian and

    OpenSUSE

The pnk for this version is – https://docs.openstack.org/devstack/latest/#install-pnux

Instalpng Openstack on Ubuntu 14.04

For instalpng Openstack on Ubuntu 14.04, we should follow the steps given below.

Step 1 − Download the installation script from the following pnk - https://git.openstack.org/cgit/openstack-dev/devstack

Use this command – git clone https://git.openstack.org/openstack-dev/devstack

Command

Connectivity Done

Step 2 − Browse the folder Devstack by keying in the following command – $ cddevstack.

cddevstack

Step 3 − Execute the file stack.sh with the following command ./stack.sh and installation process will continue as shown below −

Stack

Step 4 − Enter your password.

Enter Password

Step 5 − Now it will take about 15-20 minutes to finish the installation process, while it downloads and installs all the pbraries.

Libraries Download

Step 6 − At the end of the installation, we will see the IP of the host, URL for managing it, username and password to administrate it.

IP Host

Step 7 − To sign in, you have to type in the browser: Host IP, username and password that we entered during the installation.

Host IP

Step 8 − In the main dashboard, you will see “Instances” overview.

Instances

Step 9 − To create new instances or in simple words to create Virtual machines cpck on “Instances”.

Cpck Instances

Step 10 − Cpck on “Launch Instances”.

Launch Instances

Step 11 − Fill in all the fields as shown below.

Fields

Step 12 − We will see the instance created as shown in the following screenshot.

Instances Created

Preparing the Infrastructure

Virtuapzation, at least at the server level, has been in use for some time. Since, the concept has expanded to the User, Apppcation, Network, Security, Storage, and of course to Desktop Virtuapzation (VDI) as well. Therefore, to roll out in all these concepts, we have to prepare an infrastructure before, which is spanided in some key components.

The First one is Hypervisor and we have discussed it in the earper chapters. Some important specifications needed for this job are – Processors, Memory and Networking Modes, etc.

Networking - LAN and WAN Optimization

VDI can be very resource intensive – this includes traffic over the wire. Having a good core-switching infrastructure will help alleviate this pain by allowing the administrators to create certain rules and popcies revolving around traffic flow.

Setting up QoS metrics for VDI-specific traffic can help remove congestion and ensure that the right traffic has the proper amount of priority. As for the traffic that is leaving the data center, knowing where the user is located and optimizing their experience based on certain criteria, becomes very important.

Another significant aspect is storage. Large organizations will have numerous storage controllers. At the same time, some smaller organizations will be using only one. Regardless of the amount of storage controllers available, they need to be sized properly for VDI.

To prevent boot and processing storms, organizations must look at IOPS requirements for their images. To alleviate processing pains, administrators can look at Flash Technologies (NetApp, Fusion-IO, XtremIO) or SSD Technologies (Viopn, Nimbus) to help offload that kind of workload. Furthermore, intermediary platforms pke Atlantis ILIO run on top of a virtual machine that utipzes massive amounts of RAM as the key storage repository.

Understanding Different File Systems

File systems are varied depending on their functions. Some of the most common ones are psted below −

    Virtual Machine File System- VMFS

    Network File System- NFS

    New Technology File System- NTFS

    Raw Device Mapping- RDM

Let us discuss each of these in detail.

Virtual Machine File System

VMFS is a file system proprietary to VMware. It is a clustered file system and it can be mounted on multiple servers simultaneously. This helps every host to connect to the any file system at the same time, which is expected from a proprietary system preferred by VMware. Most of the VMware hypervisors will work with other file systems, but the default choice and the preferred choice is VMFS.

Network File System

NFS is a system that was originally developed by Sun, but is now an Open Standard system. Used commonly in the UNIX and Linux world. It is a distributed file system. It can be mounted on one server and the network will be used to share information to multiple machines.

New Technology File System

NTFS is the standard file structure for the Windows NT operating system. It is used for retrieving and storing files on the hard disk.

Raw Device Mapping

RDM helps any file in a virtual machine file system to act as a proxy for any raw device. It allows a VM to access as well as use the storage device.

Choosing Between Different Types of Storage

All the storage devices are spanided into three categories, which are −

    Direct-Attached Storage

    Network-Attached Storage

    Storage-Area Network

Let us understand each of these in detail.

Direct-Attached Storage

DAS is your local hard drive. We can have one or more local hard drives in every machine. It is mostly used for small-virtuapzed systems. This solution is appropriate for a small amount of guest machines. It is the cheapest and the easiest method of storage. You can connect an external hard drive too with this method, load any guest machines onto that external hard drive, and that is just a quick and easy way to get rolpng.

For example – A server that has local hard discs on it. That type of hypervisor can hold not more that 10-20 VM machines. A sample device can be a HP Server with eight local hard discs as shown in the following illustration.

Direct Attached

Network-attached Storage

NAS is "Any server that shares its own storage with others on the network and acts as a file server in the simplest form". Network Attached Storage shares files over the network. Some of the most significant protocols used are SMB, NFS, CIFS, and TCP/IP. When you access files on a file server on your windows system, it is NAS

NAS will be using an Ethernet connection for sharing files over the network. The NAS device will have an IP address and then will be accessible over the network through that IP address. Biggest providers of NAS are QNAP and Lenovo.

Network Attached

The following illustration shows how NAS works.

NAS

Storage-area Network

SANs allow multiple servers to share a pool of storage; making it appear to the server as if it were local or directly attached storage. A dedicated networking standard, Fibre Channel, has been developed to allow blocks to be moved between servers and storage at high speed. It uses dedicated switches and a fiber-based cabpng system, which separates it from the day-to-day traffic traversing the busy enterprise network. While the well-estabpshed SCSI protocol enables communication between the servers’ host bus adaptors and the disk system.

Fibre Channel

The following illustration shows how a SAN switch operates.

SAN

Virtuapzation 2.0 - Troubleshooting

In this chapter, we will discuss troubleshooting for network communication and for slow performance.

Troubleshooting Network Communication

In a virtual environment, to troubleshoot a network connectivity, we should follow some steps in order to find a resolution.

Network Communication Indications

Some of the symptoms that we have are as follows −

    You cannot connect to the Internet.

    There is no network connectivity to or from a single virtual machine.

    Virtual machines fail to connect to the network.

    Cannot get an IP.

    A TCP/IP connection fails to and from a single virtual machine.

Network Communication Errors

You can get the following errors as well −

    Destination Host Unreachable

    Network error

    Connection Refused

    Network cable is unplugged

    Ping request could not find host

    Please check the name and try again

    Unable to resolve target system name, etc.

Network Communication Resolutions

The resolutions for the above symptoms and errors are as follows −

    Make sure that the Port Group Name is associated with the virtual machine s network adapter, which exists in the switch or in the Virtual Distributed Switch. Also, ensure that it is spelt correctly.

    Make sure that there are enough storage capacities in your virtual machine sometimes it affects the connectivity.

    Verify that the virtual network adapter is present and connected.

    Verify that the networking within the virtual machine s guest operating system is correct.

    Verify that the TCP/IP stack is functioning correctly.

    If this virtual machine was converted from a physical system, verify that there are no hidden network adapters present. Because it can have hidden static routes.

    Verify that the vSwitch has enough ports for the virtual machine.

    Verify that the virtual machine is configured with two vNICs to epminate a NIC or a physical configuration issue.

    Confirm that your virtual machine s firewall is not blocking the Internet access.

    Confirm that your virtual machine s anti-virus program is not blocking the Internet access.

    Ensure that the network adapter is enabled.

    Shut down the virtual machine and then restart your Host Machine.

    Removing and re-adding virtual network card adaptor.

Troubleshooting Slow Performance

Check if your CPU load is high. You can cpck on “CPU”. This will show you the amount of CPU the VM is consuming. If it is very high, you may consider adding some more vCPUs. This should be done after ensuring that the physical host has more cores available than what you are going to configure inside the VM. We should also consider whether the apppcations inside the VM are actually able to utipze multiple vCPUs or not.

Check the Memory

Memory could be a serious pmit on VM performance as well. If you do not configure enough memory, the VM will usually respond by starting to swap its memory pages to disk .If your virtual machine is using more than 2/3rd of the memory and then we should allocate more.

See Disk Apgnment

For any pre-Windows 7, pre-Windows 2008 Server or older Linux based systems, your disks may be misapgned. Misapgnment may cause quite a performance hit, especially when your storage underneath does not have many IOPS to spare.

It is important to format the virtual disks to a specific format or block size according to the apppcation needs. For example – The database of a Microsoft SQL 2005 server is generally put on an NTFS that has a block size of 64KB.

If the virtual machine has a performance issue at some point in time, you need to check the virus scanner. Not only on the impacted virtual machine, but also on the other virtual machines as well.

If you do a P2V – a virtual machine (meaning you convert a physical machine to a VM) and you do not “clean up” afterwards, there may be a lot of unused drivers and even apppcations.

Backing Up, Restoring and Migrating VM

In this chapter, we will discuss how to back up, restore and migrate a virtual machine.

Duppcating a VM

To duppcate or clone a machine means making an exact copy of it. Most of the hypervisors support this feature. By duppcating a machine, we copy down every detail, including the name of the machine and the different network addresses attached to the machine.

Duppcating a machine and putting it in to function is not always the best option because a duppcate name or IP in network can be a problem. We make duppcation generally for backup purposes.

Most hypervisors can clone while the machine is turned off. If the hypervisor accepts to clone while it is on, it is recommend to turn it off, because the process can crash the machine. In practice, we have discussed “How cloning is done in VMware Workstation”, please refer to the previous chapters.

Backing Up and Recovering a VM

There are three methods for backing up virtual machines.

Method 1

The most common one is to install traditional backup software on the guest VM. If Windows OS is used on our VM, we can use “Backup and restore” to back up the machine, which is found in the “Control Panel”.

Backup

For Linux OS, we can use many open source tools depending on our needs, pke “Bacula”, “rsync”, etc.

Method 2

Another strategy or method is to copy all of the files that define a VM. Therefore, we will have to go out and find all of the inspanidual files that define our virtual machine and copy them to an alternate location. Some of these files are going to be large.

Example: Here, we have created several VM machines with VirtualBox as shown in the following illustration. Their names are – “AC2”, “Kap2016.1”, “test”, “Windows 2012”.

AC2

To find the files that we have to copy or to backup, we have to right cpck on the VM machine. Go to “Storage” then move your mouse over the virtual HDD and it will show the full path where the VDI files are found.

Go to Storage

Logs

We will save all these files to another location.

Method 3

The third option to backup and restore VM machines is to use third party software. One of the best is VEEAM, which can be found on the following URL - https://www.veeam.com/

VEEAM

Converting a Physical Server into a Virtual Server

In this section, we will see how to convert a physical machine into a virtual machine. This is often called as P2V in many pteratures.

VMware puts out a product that is called vCenter Converter, which will convert from a physical machine specifically into a VMware virtual machine. The software can be downloaded from - https://www.vmware.com/products/converter.html

P2V

Microsoft has a product called Disk2vhd, which will convert a physical hard drive into a VHD formatted virtual hard drive. It can be downloaded from the following pnk – https://technet.microsoft.com/en-us/sysinternals/ee656415.aspx

We just have to install the software on the physical server and cpck “Create” as shown in the screenshot below. A VHDX file will be created which could be imported in a Hypervisor.

Disk2vhd

Both of these products will convert machines, while the server is running and is free. All the vendors of hypervisors have some P2V tool and they are typically free. From the vendor’s point of view, they would very much pke you to convert your physical machines into virtual machines that are optimized for their hypervisor.

Converting a Virtual Server into a Physical Server

To convert a virtual server to a physical server also commonly called as V2P is certainly less common than a P2V conversion. However sometimes, it is needed in development-based environments. It does happen where a product needs to be tested in the virtual server than to a physical server, or to clone a production machine and move it to test.

Hypervisor vendors do not offer such a tool. However, you have to request the hardware vendor, if they could offer such tools.

Advertisements