Understanding Virtualization: A Simple Overview Part 2 — ESXi

Esxi:

An ESXi host is a hypervisor that runs on a physical server. It provides a virtualization layer that allows multiple virtual machines to run on a single physical server.

Architecture of Esxi:

Simplifying the Components of VM Infrastructure

VM Infrastructure involves several key components, each playing a unique role in the virtualization environment:

  1. VM Kernel: This is the core component responsible for resource scheduling, managing the I/O stack, and handling drivers. It’s essential for the smooth operation of the entire system.

  2. VMM (Virtual Machine Monitor): This creates a secure execution environment for virtual machines (VMs), allowing them to operate with virtual hardware.

  3. VMX (Helper Process): VMX acts as a sandbox, ensuring VMs remain isolated from each other, enhancing security and stability.

  4. User World: This component provides management access, monitors hardware, and serves as an interface to the VM Kernel, streamlining administrative tasks.

  5. Hostd: Hostd offers programmatic (API) access to the VM kernel, managing local users and groups on ESXi. It also functions as a reverse proxy for ESXi communication.

  6. VPXA: Responsible for facilitating communication between the vCenter and the host, VPXA uses the VPX user to relay requests from vCenter to Hostd.

  7. Syslog: This component is crucial for logging data to a remote syslog server, aiding in monitoring and troubleshooting.

  8. DCUI (Direct Control User Interface): DCUI provides a direct interface for system control and management.

  9. SNMP: SNMP is used for collecting information from the host, crucial for network management and monitoring.

  10. CIM Broker: This component is key for hardware monitoring and status checks, like temperature monitoring.

  11. vCenter Server: All ESXi hosts can be centrally managed via the VMware vCenter Server, which offers a comprehensive view of the virtualization environment. It allows users to create, configure, manage, and monitor VMs, accessible via the vSphere Client.

Pros of Vcenter Server:

It provides you high availability and fault Tolerance.

High Availability:It provides minimum downtime by restarting failed virtual machine on alternate host servers.

Fault Tolerance: A shadow copy of instance is created to minimize downtime in case of any hardware failure.

Vmotion & Load Balancing: It enables VMotion(live migration of VMs between Hosts) and Distributed Resource Scheduler (Load Balancing).

What is VMotion?

It is the live migration of one virtual machine to another host having no downtime involved. This is the most important concept in VMWare ESXi so we will discuss it in detail.

What are Pre-requisites?

· A vMotion-enabled network: This is a private network that connects all of the ESXi hosts in your vSphere environment.

· Compatible hardware: The ESXi hosts that you want to migrate between must have compatible hardware.

· Compatible configurations: The ESXi hosts that you want to migrate between must have compatible configurations, such as the same vCenter Server instance and the same storage type.

Compatibility Check:

Both hosts (source & destination) have the same hardware or not.

Migration Check

Both hosts (source & destination) have the same configurations and settings for the migration.

Understanding the Live Migration Process in Virtualization

Live migration is a critical process in virtualization, allowing virtual machines (VMs) to move between different physical hosts without interruption. This process involves several key components:

  1. VPXD (Virtual Provisioning x Daemon): This service operates on the vCenter Server and plays a pivotal role in managing VMotion operations. VMotion is a VMware technology that enables the live migration of running VMs from one physical server to another.

  2. VXPA (Virtual Provisioning Agent): Running on each ESXi host, the VXPA is essential for communication between the host and VPXD, as well as with other elements of the vSphere infrastructure.

  3. VMX (Virtual Machine Monitor): A component within the ESXi host, VMX is responsible for virtualizing the hardware for VMs. It creates a layer that allows multiple VMs to run on a single physical host.

  4. VMM (Virtual Machine Manager): Also a part of the ESXi host, the VMM manages the execution of VMs. It interfaces with the host’s kernel, which secures the VM’s configuration file during the migration process.

Live Migration For Destination Host:

All same steps are involved in destination side except VMM. Once all things are sorted out both kernals open sockets and thus the live VM is done.

Clustering

We usually cluster our EXSi hosts to one cluster for the following purposes:

1. High availability

2. Load balancing

3. Simplified management

4. Reduced costs

5. Improved resource utilization

Three main options of Clustering.

1. DRS

2. HA

3. VSAN

DRS:

1. Distributed Resource Scheduling.

2. It balances CPU and RAM Usage.

3. It works as a load balancer.

For example: If one VM on EXSi host is taking 75% CPU and 75% Ram then DRS is going to shift that VM to other EXSi host to balance the load

HA:

vSphere HA (High Availability) is a clustering technology that provides automatic failover for virtual machines (VMs) in the event of a hardware or software failure. If an ESXi host fails, vSphere HA will automatically restart the VMs that were running on that host on another ESXi host in the cluster. This can help to ensure that your applications and services are always available, even if there is a hardware failure.

VSAN:

vSAN (vSphere Storage Appliance) can be used to create a shared storage solution that can be accessed by all of the ESXi hosts in a vSphere cluster. This can simplify your storage management and improve the performance of your VMs.

Connecting ESXi to vCenter Server:

There are two main ways to connect an ESXi host to vCenter Server:

Using the vSphere Client:

The vSphere Client is a GUI-based tool that can be used to manage vSphere resources. To connect an ESXi host to vCenter Server using the vSphere Client, follow these steps:

1. Open the vSphere Client and connect to the vCenter Server.

2. Select the ESXi host that you want to connect.

3. Click the Host menu and select Add to Inventory.

4. Enter the IP address or hostname of the ESXi host and click Add.

5. Enter the root credentials for the ESXi host and click OK.

Using the vCLI:

The vCLI is a command-line tool that can be used to manage vSphere resources. To connect an ESXi host to vCenter Server using the vCLI, follow these steps:

Open a command prompt on the vCenter Server.

Run the following command:

1. Add-VMHost -Server <vCenter Server IP address or hostname> -VmHost <ESXi host IP address or hostname> -Credential (Get-Credential)

2. Enter the root credentials for the ESXi host when prompted.

If you Liked the article Please give it a LIKE

Think Tank

  1. Interface during Live VM Transfer: During the live migration of VMs, which ESXi host’s IP address provides the interface for the machine being transferred? How is the connectivity maintained throughout this process?

  2. DRS and Resource Management in High-Usage Scenarios: Consider a scenario with two ESXi hosts, each running a VM. Both VMs are utilizing 70% of their respective host’s CPU and RAM resources. In this case, will the Distributed Resource Scheduler (DRS) still consider shifting VMs between these two heavily utilized hosts? How does DRS assess and make decisions in such high-usage scenarios where both hosts are significantly engaged?

  3. High Availability and VM State Recovery: In the event of an ESXi host failure, High Availability (HA) will restart the VM on a new host. How does HA manage to retrieve and restore the VM to its most recent state before the failure occurred?

  4. vSAN Issues and Data Integrity: In a situation where there’s a problem with vSAN, is there a risk that all VMs might lose their data? How does vSAN ensure data integrity and what are the implications of a vSAN problem on the VMs?