What?
Virtualization is a technology that transforms hardware into software.
Or
It is the technique of splitting Physical Resources into as many Logical Resources as we want. Eg. CPU Memory.
Why?
CASE 1 :
In a normal Scenario without virtualization, a 2000 sq feet Data center setup for 100 Physical servers, out of which 30 for Infrastructure and 70 for application needs the following infrastructure.
Cooling system for 100 servers
100 Physical disks for the servers
Cabling for 100 servers & power Whips.
DC Staff and Power backup.
It is costly to maintain all the infrastructure.
To overcome the cost and efficiency, virtualization was introduced.
Benefits of Virtualization
Optimized performance
Increased IT productivity
Scalability
Added resilience for reduced downtime
Effortless development and testing
Work from anywhere capabilities
Smaller environmental impact
Simple security
Lower operating costs
Hypervisor
What?
Hypervisor is a piece of software or firmware that creates and runs a Virtual Machine. A hypervisor is sometimes also called a Virtual Machine Manager (VMM).
Type 1 Hypervisor (Firmware)
It is called a Bare Metal Hypervisor, it runs directly on the system hardware, and A guest O.S run on another level above the hypervisor.
VMware ESXi is a Type 1 Hypervisor that runs on host server hardware without an underlying operating system.
ESXi provides a virtualization layer that abstracts the CPU, Storage, Memory, and networking resources of the Physical host into multiple Virtual Machines.
These Hypervisors use in Enterprise Level Applications.
Type 2 Hypervisor (Host Type)
Hypervisor that runs within a Conventional O.S environment, and host O.s provides
Examples of Type 2 Hypervisor are VMware workstation, Oracle VirtualBox, and Mircosoft Virtual PC.
It does not have direct access to the host hardware and resources.
These Hypervisors use for learning and testing purposes.
VMware VSphere Introduction
VMware is the Market Leader in Server Virtualization, it has an 80% market share.
It is better than XenServer(Citrix) and Hyper-V (Microsoft) due to its stability and flexible usage.
What is VSphere?
VMware VSphere is the brand name for the VMware Suite of Virtualization products.
Previously VMware Suite i.e VSphere is called VMware Infrastructure.
VSphere includes the following components,
VMware ESXi (Hypervisor)
VCenter Server
VSphere Client
VSphere Web Client
other features include - VMotion, High Availability, Distributed Resource Scheduler, and fault tolerance.
Difference between VCenter Server and VSphere Client
- VSphere Client is an interface (GUI) used to connect remotely to an ESX/ESXi, host from a Windows PC.
This Client can be used to access and manage Virtual Machines on the ESXi host and also perform other Management and configuration tasks.
If we need to have all the ESXi hosts in a Single Console then we need VCenter Server.
Vcenter Server is similar to VSphere Client but it comes with rich features and more power, It is the Centralised management tool.
Multiple ESXi hosts and VM can be managed from a single console, Whereas VSphere Client can access only a single host.
For using features like DRS, H A, Vmotion, and Fault Tolerance we need Vcenter Server.
Migration
Migration is a technique of moving a Virtual machine from one host to another host or from one datastore to another datastore.
Why There is a Need for Migration :
Load Balancing - Move VMs to a less busy host or Make Use Of Newly Added Capacity.
Maintainance - Move VMs off a host before It is shut down.
Recovery From Host Failure - Restart the VM on a different Host.
Note - Datastore stores Virtual Machine files, Log files, Virtual disk, and ISO images. They use two types of storage VMFS and NFS
Types of Migration :
Cold Migration
Movement of VM's to another host in a powered-Off state.
Cold Migration can be used to move a VM between data Centers, as long as both data centers are on the same VCenter Server instance.
The chance of failure is less in Cold migration, in comparison to hot migration.
Suspended Migration
Migrating a VM that is in a suspended state.
A suspended state is like paused state in which you resume from the same point at a later stage.
Suspended and Vmotion Migration are considered hot because in both cases the virtual machine is running.
The primary reason to suspend a VM on an ESXi host is for troubleshooting.
VMotion (Live Migration)
Migrating a VM that is in PowerOn state. This is very useful as this does not cause any downtime for the VM.
In VMware, the VMotion machine is migrating from one ESXi host to another in a powered ON state, Whereas in storage vMotion machine is migrating from one Datastore to another datastore in a powered ON state.
Vmotion moves a running VM to a different ESXi host in the same cluster.
P2V Migration
Converts a physical computer to a virtual one
- For example, if you have web server running on physical hardware you can run VMware Vcenter Converter, target the webserver and have a Copy of the physical server created on an ESXi host.
V2V Migration
Exactly like the P2V migration except that the source machine is already a VM.
For example, Migrating from hyper-v and VMware workstations to ESXi would be considered a V2V migration.
High Availability
VMware vSphere High Availability (HA) is a vSphere cluster feature that restarts automatically the failed VM on another host from the server failure. vSphere HA allows companies to gain high availability for nearly any application on the ESX/ESXi host, thus reducing the RTO significantly. It also activates the maintenance mode for the crashed host servers. During these processes, there is small downtime which is related to the time taken for the VM to restart.
No passive standby ESXi host requires neither any extra VM to provide backup. If the parent host is crashing it can restart on any of the other running hosts.
HA does not use Vmotion.
For HA, we need the following things,
Cluster
Share Storage
Vcenter server configure for the environment
HA continuously monitor the capacity utilization and reserve spare capacity to be able to restart the VM.
HA works on master-slave architecture.
Fault Tolerance:
While vSphere High Availability restarts the VM in case of server failure, fault tolerance (FT) of the vSphere HA cluster allows the VM to continue running when the primary ESXi host fails, so the users don’t have to experience any downtime and restart.
There are two VMs for FT, primary VM (protected) and secondary VM (ghost VM that is invisible to users but continually replicates all changes of the primary VM to smoothly take over it when it fails), which are located in different hosts.
VMware Lockstep technology is used in FT
Lockstep technology captures the current state and events of the primary VM and sends them to the secondary VM, if the primary goes down, instantly secondary VM takes over
Both machines are not allowed to run on the same host, these ensure a host failure cannot result in the loss of both VM.
FT works on the VM level, therefore we can unable and enable it on the VM.
Distributed Resource Scheduler
DRS is not to balance the load perfectly across every host. Rather, DRS monitors the resource demand and ensures that every Virtual Machine (VM) is entitled to the resources. When DRS determines that a better host exists for the VM, it recommends moving that VM.
Two Primary functions of DRS are:
Load balancing VMs due to imbalanced cluster
VM placement when Powering on.
Power management
Vmotion is the primary requirement for DRS.
By default, DRS checks in every 5 minute to see if the cluster workload is balanced or not.
DRS Automation Levels
One of the interesting features of DRS is the DRS automation levels. While DRS continues to scan the vSphere Cluster and provide recommendations every 5 minutes, you can determine whether or not DRS is able to enact its recommendations automatically or only suggest changes that should be made. DRS has three DRS automation levels. These include:
Fully automated – In the fully automated approach, DRS applies both the initial placement and load balancing recommendations automatically.
Partially Automated – With partial automation, DRS applies recommendations only for the initial placement of VMs.
Manual – In manual mode, you must apply the recommendations for both initial placement and load balancing recommendations.
For More deep and drive - https://www.youtube.com/playlist?list=PLBGx66SQNZ8aiuWzEFavDMpQ1RRWsZLZV