Enterprise Infrastructure and Cloud Technologies
Unit IV: Linux Server Administration and Virtualization
1. RHEL / CentOS Overview
What is RHEL?
Red Hat Enterprise Linux (RHEL) is a commercial Linux distribution developed by Red Hat Inc., primarily
used in enterprise environments.
• Stable, secure, and certified for use in critical environments like banks, data centers, government
systems.
• Subscription-based support: Includes access to Red Hat customer support, certified software, and
updates.
• Lifecycle Support: Each major release gets long-term support (up to 10 years).
Example Use Cases:
Hosting web servers, databases, enterprise apps like SAP, Oracle.
What is CentOS?
CentOS (Community Enterprise Operating System) was a free, open-source version of RHEL, built from
RHEL source code.
• Binary-compatible with RHEL (up to CentOS 8).
• No official support, but community-driven.
• Suitable for non-commercial or development environments.
Example Use Cases:
Labs, development servers, internal applications.
Shift to CentOS Stream (2021)
• Red Hat shifted CentOS to CentOS Stream, which is now a rolling-release version of RHEL.
• CentOS Stream is ahead of RHEL (acts like a pre-release), not recommended for production use.
Feature RHEL CentOS (legacy) CentOS Stream
License Commercial Open Source Open Source
Support Paid Community Community
Release Type Stable Stable Rolling (pre-RHEL)
Use Case Production Testing/Dev Preview of RHEL
Command Examples (Same in RHEL & CentOS)
# Check OS version
cat /etc/redhat-release
# Check kernel version
uname -r
# Update packages
sudo yum update -y
# Install Apache
sudo yum install httpd -y
Key Points to Remember
• Both RHEL and CentOS use YUM/DNF, RPM, and systemd.
• Same architecture and tools, differing only in licensing and support.
• RHEL is for mission-critical production; CentOS is for cost-effective learning/testing.
2. Boot Process and GRUB2
What is the Linux Boot Process?
The boot process in Linux is the sequence of steps the system follows from powering on the hardware to
loading the operating system kernel and reaching a usable shell or GUI.
Step-by-Step Boot Sequence
Step Description
1. BIOS / UEFI Firmware runs POST (Power-On Self Test) and initializes hardware.
2. Bootloader (GRUB2) Loads the boot menu and OS kernel into memory.
3. Kernel The Linux kernel initializes core hardware and mounts the root filesystem.
4. init / systemd PID 1 process starts system services (targets/runlevels).
5. Login A login prompt (CLI or GUI) appears.
Detailed Focus: GRUB2 (GRand Unified Bootloader v2)
• GRUB2 is the default bootloader on RHEL and CentOS.
• Allows multi-OS booting, kernel selection, and kernel parameter customization.
• Can boot into recovery mode, useful for system troubleshooting.
Important GRUB2 Files & Locations
File/Folder Description
/boot/grub2/[Link] Main GRUB2 configuration file (auto-generated).
/etc/default/grub GRUB settings file (editable).
/etc/grub.d/ Scripts to build the GRUB config.
/boot/ Holds the kernel (vmlinuz), initramfs, and GRUB files.
Common GRUB2 Commands
# View current GRUB entries
cat /boot/grub2/[Link]
# Edit GRUB settings (e.g., timeout, default OS)
sudo vi /etc/default/grub
# Apply changes after editing default config
sudo grub2-mkconfig -o /boot/grub2/[Link]
# Set default boot entry (e.g., 0 = first entry)
sudo grub2-set-default 0
GRUB2 Recovery Tip
If GRUB fails (e.g., after kernel crash or misconfig):
1. Boot into a Live CD/USB.
2. Chroot into the installed system.
3. Reinstall GRUB using:
sudo grub2-install /dev/sda
sudo grub2-mkconfig -o /boot/grub2/[Link]
3. Filesystem Hierarchy
What is Filesystem Hierarchy?
The Linux Filesystem Hierarchy Standard (FHS) defines the directory structure and their contents in Unix-
like operating systems.
Everything in Linux is treated as a file, including hardware, directories, and sockets.
Top-Level Directory Structure
Directory Purpose
/ Root directory – the top of the hierarchy.
/bin Essential user binaries (e.g., ls, cp, mv).
/sbin System binaries (e.g., reboot, ifconfig).
/etc Configuration files.
/dev Device files (e.g., /dev/sda, /dev/null).
/proc Virtual filesystem for process and kernel info.
/sys Contains system hardware info (also virtual).
/var Variable data like logs, mail, and spool files.
/tmp Temporary files (cleared on reboot).
/home User home directories (e.g., /home/john).
/root Home directory of root user.
/lib, /lib64 Shared libraries needed by binaries in /bin and /sbin.
Directory Purpose
/usr Secondary hierarchy for user applications.
/opt Optional or third-party software.
/mnt, /media Mount points for external storage devices.
/boot Files needed for booting (kernel, GRUB, initrd).
Filesystem Hierarchy Examples
# List top-level directories
ls /
# View system logs
ls /var/log
# View hardware info from virtual filesystem
cat /proc/cpuinfo
cat /sys/class/net/eth0/address
# View user configuration
cat /etc/passwd
Useful Mounting Commands
# Mount external device
sudo mount /dev/sdb1 /mnt
# View mounted filesystems
df -h
mount
The Linux hierarchy is mountable, meaning new devices/filesystems can be mounted anywhere in the tree.
4. Shell Environment
What is a Shell?
• A Shell is a program that interprets user commands and sends them to the operating system kernel.
• Common shells:
o Bash (Bourne Again SHell) – default in most Linux distros.
o Others: sh, zsh, ksh, csh, fish
Types of Shells
Shell Description
Login Shell Starts when user logs in (e.g., via console, SSH).
Shell Description
Non-login Shell Launched in an already logged-in session (e.g., terminal inside GUI).
Interactive Shell Takes input from user.
Non-interactive Shell Runs scripts automatically.
Environment Variables
• Environment variables store system-wide values used by the shell and applications.
Variable Meaning
HOME User's home directory.
USER Current logged-in user.
PATH Directories to search for executables.
PS1 Prompt style (e.g., \u@\h:\w\$).
SHELL Default shell for the user.
Example Commands
echo $HOME
echo $PATH
export MYNAME="Boopalan"
echo $MYNAME
Shell Configuration Files
File Scope Used for
~/.bashrc User-level, interactive shell Aliases, functions, variables
~/.bash_profile User login shell Runs once on login
/etc/profile System-wide login shell Sets default system environment
/etc/bashrc System-wide bash settings Aliases, functions
🔄 To apply changes:
source ~/.bashrc or . ~/.bashrc
Aliases, Functions, and Customizations
Aliases
Shortcuts for commands.
alias ll='ls -alF'
alias gs='git status'
Functions
myfunc() {
echo "Welcome $1!"
}
myfunc Boopalan
Real-Time Use Case
“Why isn’t my script working in a new terminal?”
Check if the environment variable or alias is set in ~/.bashrc.
5. Text Editors
What is a Text Editor?
A text editor is a program used to create and modify plain text files, such as:
• Shell scripts
• Configuration files
• Source code
• Log files
Linux administrators use terminal-based editors most of the time (especially on headless servers).
Common Linux Text Editors
Editor Type Description
nano CLI-based Simple, beginner-friendly
vim CLI-based Powerful, modal editor, steeper learning curve
vi CLI-based Classic version of Vim, available by default
gedit GUI-based GNOME default text editor
code GUI-based Visual Studio Code, needs GUI and setup
cat, echo, touch CLI tools Basic file creation/viewing
Examples and Usage
Using nano
nano [Link]
• Edit file
• Ctrl + O: Save
• Ctrl + X: Exit
• Ctrl + W: Search
Using vim
vim [Link]
• i: Enter insert mode
• Esc: Exit insert mode
• :w: Save
• :q: Quit
• :wq: Save and quit
• :q!: Force quit without saving
File Creation and Viewing Commands
touch [Link] # Create a new empty file
cat [Link] # View file content
echo "Hello" > [Link] # Write to file
Real-Time Use Case: Editing Config File
sudo nano /etc/hostname # Change system hostname
sudo vim /etc/fstab # Modify mount configuration
Vim Modes
Mode Description
Normal Mode For navigation, commands (default mode)
Insert Mode For editing text (i to enter)
Visual Mode For selecting text
Command Mode For commands like :wq, :q!
Mini Lab Task (Optional)
Task:
Create a file called [Link], add a simple echo script using vim, then save and run it:
echo 'echo "Hello, Linux!"' > [Link]
chmod +x [Link]
./[Link]
6. User and Group Management
Why Manage Users & Groups?
• Linux is a multi-user system.
• Users are assigned permissions and access via user IDs (UIDs) and groups.
• Grouping users simplifies permission assignment (e.g., developers, admins).
Understanding Users
Each user has:
• Username
• User ID (UID) – uniquely identifies the user
• Group ID (GID) – primary group
• Home directory
• Shell
Check current user:
whoami
id
User Management Commands
Task Command
Create user sudo useradd username
Set password sudo passwd username
Modify user sudo usermod -aG groupname username
Delete user sudo userdel -r username
View user info cat /etc/passwd
Change shell sudo chsh -s /bin/bash username
The -r flag with userdel removes home directory.
Understanding Groups
Groups help assign collective permissions.
• Primary Group – Assigned at user creation
• Secondary Groups – Additional group memberships
View groups:
groups
cat /etc/group
Group Management Commands
Task Command
Create group sudo groupadd developers
Add user to group sudo usermod -aG developers username
Delete group sudo groupdel developers
List all groups getent group
Changes apply on next login or after running newgrp.
Important System Files
File Description
/etc/passwd Stores user account info
/etc/shadow Stores encrypted passwords
/etc/group Stores group info
/etc/gshadow Stores group passwords (rarely used)
Example: Create a User and Assign Group
sudo useradd -m -s /bin/bash john
sudo passwd john
sudo groupadd developers
sudo usermod -aG developers john
7. File Permissions & ACLs
Why Are File Permissions Important?
• Linux is a multi-user OS, so controlling who can access, modify, or execute files is essential for
security and privacy.
Standard File Permissions
Every file/directory has:
• Owner
• Group
• Others (everyone else)
Permissions are:
• r → Read
• w → Write
• x → Execute
Permission Format (ls -l)
Example:
-rwxr-xr-- 1 john devteam 3456 Aug 6 [Link]
Symbol Meaning
- Regular file (d = directory, l = symlink)
rwx Owner permissions
r-x Group permissions
r-- Others' permissions
Octal (Numeric) Permissions
Symbolic Numeric Description
r-- 4 Read
-w- 2 Write
--x 1 Execute
rwx 7 All permissions
Example:
chmod 755 [Link]
Means: Owner: all, Group: read+execute, Others: read+execute
Permission Management Commands
Task Command
Change permissions chmod 755 [Link]
Change ownership chown user:group [Link]
View permissions ls -l [Link]
Understanding ACLs (Access Control Lists)
ACLs provide fine-grained access control beyond the standard owner/group/other model.
Useful when:
• Multiple users need different access levels.
• You want to assign permissions to users not in the file’s group.
ACL Commands
Task Command
Enable ACL on filesystem Mounted with acl option (most distros default to it)
View ACL getfacl [Link]
Set ACL setfacl -m u:alice:rwx [Link]
Remove ACL setfacl -x u:alice [Link]
Default ACL (for dirs) setfacl -d -m u:bob:rwX project/
ACL Example
# Grant read/write to bob for [Link]
setfacl -m u:bob:rw [Link]
# Check current ACLs
getfacl [Link]
File Permission Conflicts
• ACL overrides traditional group permissions.
• chmod doesn’t clear ACLs; use setfacl -b to remove all ACLs.
Mini Lab Task (Optional)
Create a file [Link], set rw- permissions for the owner, and give read-only access to another user using
ACL.
8. RPM, YUM, Dependency Management, Patching
Overview
Linux software is managed in packages. RHEL and CentOS use the RPM Package Manager (RPM) system
along with YUM (or DNF) for handling dependencies and updates.
1. RPM (Red Hat Package Manager)
• Low-level package tool.
• Installs .rpm files manually.
• Doesn’t automatically resolve dependencies.
Common RPM Commands
Task Command
Install package sudo rpm -ivh [Link]
Upgrade package sudo rpm -Uvh [Link]
Remove package sudo rpm -e package-name
Query installed packages rpm -qa
Check file ownership rpm -qf /path/to/file
Use RPM only when YUM is not available or for manual installs.
2. YUM (Yellowdog Updater, Modified)
• High-level package manager.
• Resolves dependencies automatically.
• Uses repositories to download/install packages.
Replaced by DNF in newer RHEL versions (RHEL 8+), but YUM commands are still supported as symlinks.
Common YUM Commands
Task Command
Install a package sudo yum install httpd
Remove a package sudo yum remove httpd
Update all packages sudo yum update
List installed packages yum list installed
Search for a package yum search nginx
Task Command
Get package info yum info git
Example: Install Apache Web Server
sudo yum install httpd -y
sudo systemctl enable --now httpd
3. Dependency Management
• Dependencies are libraries or other packages a program needs.
• RPM fails if dependencies are missing.
• YUM handles dependencies automatically via repositories.
❗ RPM: “Dependency Hell”
YUM: Resolves using .repo files under /etc/[Link].d/
4. Software Repositories
• A repository is a remote server storing .rpm packages.
• Contains metadata for YUM/DNF to use.
Sample .repo file:
[base]
name=Base OS
baseurl=[Link]
enabled=1
gpgcheck=1
5. Patching
What is Patching?
The process of updating software packages to fix:
• Security vulnerabilities
• Bugs
• Performance issues
Regular patching ensures system stability and security.
Patch Management Commands
Task Command
Update a specific package sudo yum update bash
View available updates yum check-update
List installed kernel versions rpm -q kernel
Task Command
Apply security updates (RHEL) yum update --security
9. System Logging
What is System Logging?
System logging is the process of recording events and system activity (e.g., errors, warnings, service
messages) to help:
• Monitor performance
• Debug issues
• Track security events
• Audit user activity
Linux stores logs in text files (logfiles), mostly under /var/log.
Key Log File Locations: /var/log/
Log File Description
/var/log/messages General system messages (services, kernel, cron)
/var/log/secure Security-related messages (logins, SSH, sudo)
/var/log/[Link] Boot-time messages
/var/log/dmesg Kernel ring buffer (hardware detection during boot)
/var/log/[Link] Package installation history
/var/log/httpd/ Apache access and error logs
/var/log/cron Cron job logs
/var/log/audit/ Audit logs (if auditd is enabled)
Useful Log Viewing Commands
Task Command
View a log file cat /var/log/messages
Scrollable view less /var/log/secure
Follow live log tail -f /var/log/messages
Filter by keyword grep ssh /var/log/secure
Print kernel logs `dmesg
Systemd Logging with journalctl (RHEL 7+/CentOS 7+)
Modern systems use systemd-journald for logging.
Task Command
View all logs journalctl
View boot logs journalctl -b
Task Command
Filter by service journalctl -u sshd
View logs for a time range journalctl --since "2025-08-01"
Follow live logs journalctl -f
journalctl reads binary logs from /run/log/journal/ or /var/log/journal/
Log Rotation – logrotate
• Automatically rotates, compresses, archives, and removes logs.
• Configured via:
o Global config: /etc/[Link]
o Per-app config: /etc/logrotate.d/*
Prevents logs from filling the disk.
Real-Time Use Case
“A user complains about failed SSH login. Where do you check?”
Check /var/log/secure or use:
sudo grep 'Failed password' /var/log/secure
10. Snapshots, Backup, and Restore
Why Are These Important?
• To protect data from corruption, accidental deletion, or system failure.
• To recover quickly without full system rebuilds.
• Critical in enterprise environments for disaster recovery.
1. Snapshots
What is a Snapshot?
A point-in-time copy of a filesystem, logical volume, or VM.
• Fast, lightweight
• Used for rollback, testing, backups
In Linux: LVM Snapshots
lvcreate --size 1G --snapshot --name my_snap /dev/vg0/myvol
• lvcreate: Create logical volume snapshot
• Snapshot must be deleted after use:
lvremove /dev/vg0/my_snap
Snapshots are not backups — they depend on the original volume.
2. Backup
Common Backup Tools
Tool Type Example Usage
tar Archive tar -cvf [Link] /home/user
rsync Sync rsync -av /home /backup
dd Disk image dd if=/dev/sda of=/backup/[Link]
cp Simple copy cp -r /etc /backup
Best practice: schedule backups via cron.
Backup Strategy Types
• Full – Entire data every time
• Incremental – Only changed files since last backup
• Differential – All changes since last full backup
3. Restore
Restoring from Backups
Tool Restore Command
tar tar -xvf [Link]
rsync rsync -av /backup /home
dd dd if=/backup/[Link] of=/dev/sda
Always test your backup to ensure it restores correctly.
Example: Backup and Restore with tar
# Create backup
tar -cvzf [Link] /etc
# Move to another system (optional)
scp [Link] user@remote:/tmp
# Restore backup
tar -xvzf [Link] -C /
Enterprise Backup Solutions
• Bacula, Amanda – Open-source
• Veeam, Acronis – Commercial
• Cloud-based options: AWS Backup, Azure Recovery Vault
Virtualization Section
11. Hypervisors
What is a Hypervisor?
A hypervisor (also called a Virtual Machine Monitor - VMM) is software or firmware that allows you to run
multiple virtual machines (VMs) on a single physical machine (host).
Each VM has its own OS, virtual CPU, memory, storage, and network interface, isolated from others.
Why Use Hypervisors?
• Efficient use of physical resources
• Isolated test environments
• Cost-effective server consolidation
• Easy disaster recovery and migration
• Scalable and portable infrastructure
Types of Hypervisors
Type Description Examples Use Case
Type 1 (Bare- Installed directly on the VMware ESXi, Microsoft Hyper-V Enterprise virtualization,
metal) hardware, no host OS (Core), KVM (on Linux) data centers
Type 2 Runs on top of an existing VirtualBox, VMware Workstation, Personal use,
(Hosted) OS like an app Parallels development/testing
Key Differences: Type 1 vs Type 2
Feature Type 1 Type 2
Performance High (direct hardware access) Lower (depends on host OS)
Stability Production-grade Not suitable for enterprise
Setup More complex Easy, GUI-based
Security Isolated from OS threats Shares risk with host OS
Popular Hypervisors
Type 1:
• VMware ESXi – Industry-standard hypervisor with advanced features like vMotion, HA, DRS.
• Microsoft Hyper-V – Windows-based bare-metal hypervisor (integrated with Windows Server).
• KVM (Kernel-based Virtual Machine) – Linux-native hypervisor included in RHEL, CentOS.
Type 2:
• VirtualBox – Free, open-source, cross-platform.
• VMware Workstation Player/Pro – Feature-rich, used by professionals and students.
Real-Time Use Case
Scenario: You want to host 10 Ubuntu servers and 5 Windows servers for development.
Use a Type 1 hypervisor like VMware ESXi or KVM on a high-performance host.
Security Note
• Type 1 hypervisors are less exposed to attacks due to no host OS.
• VM isolation prevents lateral movement between machines.
12. Hyper-V & VMware vSphere/vCenter
Why Learn These?
• These are the two most widely used enterprise virtualization platforms.
• Both support virtual machine management, networking, storage, and high availability.
• Critical for roles in IT infrastructure, system admin, DevOps, cloud, and data center operations.
1. Microsoft Hyper-V
Overview:
• A Type 1 hypervisor developed by Microsoft.
• Built into Windows Server and Windows 10/11 Pro, Enterprise.
• GUI via Hyper-V Manager; CLI via PowerShell.
Key Features:
• Virtual Switches (for VM networking)
• Checkpoint/Snapshots
• Live Migration between hosts
• VM Replication (for disaster recovery)
• Dynamic Memory Allocation
Common Use Case:
Host Windows and Linux virtual servers for development or testing on a Windows Server machine.
Basic PowerShell Example:
New-VM -Name "UbuntuVM" -MemoryStartupBytes 2GB -Path "D:\VMs" -NewVHDPath "D:\VMs\[Link]" -
NewVHDSizeBytes 40GB -Generation 2
2. VMware vSphere / vCenter / ESXi
What is vSphere?
• vSphere is a VMware suite that includes:
o ESXi: Bare-metal Type 1 hypervisor.
o vCenter Server: Centralized management of multiple ESXi hosts.
Key Features:
• vMotion: Live migration of VMs across hosts.
• DRS: Distributed Resource Scheduler (load balancing).
• HA: High Availability for auto-restart of VMs after host failure.
• Templates & Cloning: For rapid VM provisioning.
• Snapshots, Resource Pools, dvSwitches
Access via:
• vSphere Client (Web/GUI) to manage VMs and ESXi hosts.
• vSphere CLI, PowerCLI for automation.
Hyper-V vs VMware vSphere (Comparison)
Feature Hyper-V VMware vSphere
Vendor Microsoft VMware
Hypervisor Hyper-V ESXi
Central Management SCVMM or Hyper-V Manager vCenter Server
Licensing Free with Windows Server Free ESXi + paid vCenter
Best For Windows-based environments Cross-platform data centers
Advanced Features Live Migration, Checkpoints vMotion, HA, DRS, dvSwitch
Real-Time Use Case
✅ VMware vSphere is preferred for large-scale enterprise setups with multiple physical hosts.
✅ Hyper-V is ideal for Windows shops and smaller/mid-size IT infrastructures.
Security Note
• Both support role-based access, VM encryption, network isolation, and snapshots for rollback.
• VMware integrates with NSX (network virtualization) for advanced security.
13. Configuring VMs, Networking, Storage
1. Configuring Virtual Machines (VMs)
Key VM Components:
Component Description
vCPU Virtual CPU allocated to the VM
vRAM Virtual memory for OS and applications
Virtual Disk A virtual hard drive (e.g., .vmdk, .vhdx)
NIC Network Interface Card
ISO Image Bootable OS installer (e.g., Ubuntu ISO)
VM Setup (Typical Steps)
• VM Name and location
• Select OS type/version
• Assign CPU, RAM, and Disk
• Attach ISO file for installation
• Choose network type (e.g., NAT, Bridged)
• Power on the VM and install OS
2. VM Networking Options
Virtual Machines can be connected to various types of virtual networks.
Common Network Types:
Network Type Description
Bridged VM appears on the same network as the host (gets IP from LAN DHCP).
NAT VM shares host’s IP for internet access (uses internal NAT).
Host-only VM communicates only with host machine (isolated).
Internal/Private Only between VMs on same host – no external connectivity.
VMware Networking Concepts
• Standard vSwitch – Local to a single ESXi host.
• Distributed vSwitch (dvSwitch) – Spans across multiple hosts, managed by vCenter.
• Port Groups – Define VLAN, security policies.
Hyper-V Networking
• External Switch – Connects VM to physical network.
• Internal Switch – VM ↔ Host only.
• Private Switch – VM ↔ VM only.
3. VM Storage Configuration
Types of Storage in Virtualization
Storage Type Description
VMDK / VHDX Virtual disks (files stored on host or SAN/NAS)
Thin Provisioned Uses only the space currently needed
Thick Provisioned Reserves full space up front
Shared Storage Accessible by multiple hosts for HA, vMotion, etc.
Raw Device Mapping (RDM) Direct access to physical disk from VM (VMware only)
Storage Options:
• Local storage – Direct on ESXi/Hyper-V host.
• NFS (Network File System) – Shared storage via network.
• iSCSI – Block-level SAN storage over IP.
• VMFS (VMware File System) – Optimized for virtual disks on shared storage.
Example Scenario
You’re setting up a CentOS VM in VMware:
• Allocate 2 vCPU, 4GB RAM, 50GB disk.
• Attach [Link]
• Use NAT for internet access.
• Enable Thin Provisioning to save disk space.
14. HA, DRS, vMotion
1. HA – High Availability
What is HA?
High Availability (HA) ensures automatic VM restart on another host if the original host fails.
How It Works:
• Multiple ESXi hosts are in a cluster.
• vCenter monitors host health.
• If a host fails:
o VMs are restarted on another host automatically using shared storage.
Key Points:
• Prevents downtime due to hardware failures.
• Requires shared storage and vCenter.
• Not a backup—only restarts VMs, doesn’t recover data.
2. DRS – Distributed Resource Scheduler
What is DRS?
DRS automatically balances VM workloads across hosts in a cluster based on CPU and memory utilization.
How It Works:
• Continuously monitors resource usage.
• Migrates VMs (using vMotion) to balance load.
• Can operate in:
o Manual Mode (admin approves migration)
o Automatic Mode (DRS migrates VMs on its own)
Benefits:
• Avoids performance bottlenecks.
• Maximizes resource efficiency.
• Works best in clusters with many VMs/hosts.
3. vMotion – Live Migration
What is vMotion?
vMotion allows live migration of a running VM from one ESXi host to another without downtime.
How It Works:
• Copies VM memory and CPU state to another host.
• Uses shared storage or Storage vMotion.
• Network and applications remain unaffected.
Use Cases:
• Perform maintenance on ESXi hosts.
• Balance load across the cluster.
• Avoid unplanned downtime during migration.
Summary Table
Feature Purpose Key Benefit
HA Restarts VMs on another host if one fails High availability
DRS Balances workloads across hosts Performance optimization
vMotion Live migrate VMs between hosts Zero-downtime migration
Example Scenario
You have a 3-host ESXi cluster running 20 VMs. One host suddenly fails.
✅ HA restarts affected VMs on remaining hosts.
✅ DRS balances load by migrating some VMs to avoid overloading.
✅ vMotion ensures these migrations happen with no downtime.
15. Templates, Resource Pools, dvSwitches
1. Templates
What is a VM Template?
A template is a golden image of a virtual machine used to rapidly deploy new, identical VMs.
Key Features:
• Pre-configured OS, applications, and settings.
• Saves time and ensures consistency.
• Cannot be powered on like a regular VM (must be cloned or converted).
How to Use:
• Create a VM → Customize it → Convert to Template
• Clone from template:
Right-click → Clone to New VM
Use Case:
Deploy 50 identical Linux VMs for a training lab in minutes using a pre-built template.
2. Resource Pools
What is a Resource Pool?
A logical container that allocates and isolates CPU and memory resources for a group of VMs.
Key Features:
• Set limits, reservations, and shares for:
o CPU
o RAM
• Helps prioritize critical VMs over less important ones.
Example:
• Create a pool named WebServers with 4 vCPUs and 8GB RAM.
• Assign all web-related VMs to this pool.
Use Case:
Ensure production VMs always get guaranteed resources, even when load spikes.
3. Distributed Virtual Switch (dvSwitch)
What is a dvSwitch?
A Distributed Virtual Switch is a centralized network configuration that spans multiple ESXi hosts,
managed by vCenter.
Key Features:
• Ensures consistent network settings (VLAN, NIC teaming) across all hosts.
• Supports port mirroring, NetFlow, LACP, and QoS.
• Includes Distributed Port Groups.
dvSwitch vs Standard vSwitch
Feature Standard vSwitch Distributed vSwitch
Scope Per-host Across multiple hosts
Management ESXi (individually) Central via vCenter
Best For Small setups Large-scale clusters
Use Case:
In a 10-host cluster, use dvSwitch for uniform networking, simplifying VM migration via vMotion.
Summary Table
Feature Purpose Benefit
Templates VM provisioning Fast, consistent VM deployment
Resource Pools Resource management Isolate/guarantee CPU & RAM
dvSwitch Network management Consistent, scalable networking
Wipro Linux & Virtualization Interview FAQs
1. What is the difference between RHEL and CentOS?
RHEL is a paid, enterprise-grade OS with support; CentOS was a free, binary-compatible clone (now replaced
by CentOS Stream).
2. Explain the Linux boot process.
The boot process follows: BIOS/UEFI → GRUB2 → Kernel → init/systemd → Runlevel/Target → Shell.
3. What is the use of ACLs in Linux?
ACLs (Access Control Lists) provide more precise permission control than traditional user/group/other
settings.
4. What is the difference between RPM and YUM?
RPM is a low-level package tool; YUM is high-level and handles dependencies automatically via repositories.
5. How do you check system logs in Linux?
Use journalctl (systemd) or view log files in /var/log/, e.g., tail -f /var/log/messages.
6. What is vMotion in VMware?
vMotion enables live migration of running VMs between ESXi hosts without any downtime.
7. Difference between Type 1 and Type 2 Hypervisors?
Type 1 runs on bare metal (e.g., ESXi); Type 2 runs on top of a host OS (e.g., VirtualBox).
8. How do you backup and restore in Linux?
Use tools like tar, rsync, or dd to back up; restore by extracting or re-imaging files.
9. What is the role of vCenter in VMware?
vCenter centrally manages ESXi hosts, VMs, storage, networking, HA, DRS, and templates.
10. What is a distributed virtual switch (dvSwitch)?
A dvSwitch is a virtual switch managed by vCenter, spanning multiple hosts for consistent networking.