Ankit Cloud,Virtualization Virtualization over Linux.

Virtualization over Linux.

Virtualization over Linux. post thumbnail image

Today, we are talking about virtualization over Linux.

We will learn about how to virtualize a guest operating system running under Linux host operating system which can be Linux or Windows or something. On completion of this video we will be able to:

  • Differentiate between Hypervisor Types
  • Manage virtual machine in linux
  • Describe Bootstrapping
  • Virtualize network connections

Hypervisor Types.

We will start with learning about hypervisor types. The type one hypervisor is commonly called bare metal hypervisor. Hypervisor runs directly on the server hardware, with no middleman. Hypervisor software interacts directly with  CPU, memory and storage on the system, allocating them to each virtual machine as needed. An operating system normally does this, but here the hypervisor runs before an operating system. Some examples of some type 1 hypervisor include, Xen Server, KVM, VMWare ESXi, Microsoft Hyper-V

Two popular linux hypervisors are KVM (linux kernel-based machine with hypervisor module)  and XEN (which includes additional softwares besides the hypervisor software, for managing hypervisor from guest operating system.

Type two hypervisors are called hosted hypervisors because they run on top of an existing operating system. The hypervisor software runs as any other application on the host operating system. The examples are VirtualBox and VMWare workstation.

Virtual Machines.

Let’s talk about virtual machines. Libvert is a toolkit that provides an application programming interface (API) where you can code which can interact with many open source virtual machine manager. It is also a daemon, that operates on the VM host system and executes any needed VM guest system management tasks, such as starting and stopping the VM. Lastly, it is a set of command line utilities that operate on the VM host system and are used to control and manage VM guest system.

Virsh.

Virsh is a shell that uses a libvert library. Basically this can be used to manage your system’s virtual machines. There are a lot of commands in Virsh in order to perform tasks related to Virtual Machines, like starting, stopping, shutdown, reboot, list etcetera.

Virtual Machine Manager (VMM).

We also have something called VMM, which is a specific virtual machine manager, its a lightweight desktop application for creating and managing virtual machines. It is a python script that displays a GUI and is part of the virt-manager package. The Virtual Machine Manager can be started from a terminal emulator within the graphical environment via the virt-manager command.

Bootstrapping.

Let’s explore concept of bootstrapping. It is easy for us to create few VM using GUI and start them up to configure. What if you have to start hundreds of them and configure them. Doing this manually will be a hard full time job for months and that’s what bootstrapping software provide, it create and configures high number of VMs and manage them. 

Kickstart.

Some of the common bootstrapping tool include Kickstart, created by Red Hat, to automate the process of creating VMs. A system administrator can create a single file containing the answer to the questions that would manually be asked during an typical installation. Kickstart file can be kept on server system and read by individual systems during the installation. The installation method can support the use of a single kickstart file to install linux on multiple machines.

Cloud-init.

We also have cloud-init which is a canonical product. It is used to create modified VMs from cloned VMs. It is supported by most of the Linux distributions. It can employ pregenerated OpenSSH private Keys for access to individual VMs. The customized script can be used for bootstrapping via user data in YAML file or via command line.

Virtual Networks: Virtual NICs and Switches.

In this section we will discuss virtual networks. First we will talk about Virtual NICs and Switches. Application on physical systems can reach the outside world via a network interface card (NIC) and a connected network. Virtualized machines can have virtualized NICs and virtualized internal switches. So there are two concepts about Network Virtualization:

First one is VLAN. It is a LAN that can be physically located in a local geographic area based on local and virtual connections. Uses layer 2 to broadcast messages and router uses layer 3 to implement the VLAN.

Other one is Overlay network. Network virtualization method that uses encapsulation & communication bandwidth tunneling. Employs virtual switches, tunneling protocols and SDN.

Virtual Network Types.

Three are three typical virtual network types:

Host-only adapter:  Connects to a virtual network contained within VM’s host system. No connection to external physical (or virtual) network to which host is attached.

NAT adapter:  NAT table is maintained by hypervisor instead of network device. IP address of host is employed as single IP address that is sent out onto external network. Each VM has its own IP address within host system’s virtual network.

Bridged adapter: VM is a node on LAN or VLAN to which host system is attached. VM gets its own IP address and can be seen on network. Virtual NIC is connected to a host machine’s physical NIC.

Summary.

As a summary of this lesson we can see that we learned:

  • We saw what virtualization is.
  • What are the types of hypervisors
  • How virtual machines are used in Linux
  • Virsh and VMM
  • Bootstrapping – Kickstart and Cloud-init
  • Virtual Network and its type

Leave a Reply

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

Related Post