Linux Professional Institute LPIC-1 Exam 101

Linux Installation and Package Management

Linux as a Virtualization Guest Tools and Images

Virtualization allows a hypervisor—a software layer—to host multiple fully emulated computer systems (guests) as isolated processes. The hypervisor allocates physical resources (CPU, memory, storage) to each VM, emulating BIOS, disk controllers, and network interfaces using disk image files stored on the host.

The image is an informational slide about virtualization, explaining the roles of hypervisors and virtual machines, including their functions and characteristics.

Common Linux Hypervisors

Some of the most popular hypervisors for running Linux virtual machines include:

  • Xen
    An open-source Type-1 (bare-metal) hypervisor that boots directly on hardware without an underlying OS.
  • KVM (Kernel Virtual Machine)
    A Linux kernel module that turns your host into a hypervisor. Though it runs within a Linux OS (Type-2), its in-kernel design delivers near Type-1 performance. Managed via libvirt and supporting tools.
    The image is a slide describing the Kernel Virtual Machine (KVM) as a Linux kernel module for virtualization, supporting both Type-1 and Type-2 hypervisors, and requiring a generic Linux operating system to function.
  • Oracle VM VirtualBox
    A cross-platform desktop hypervisor (Type-2) for Linux, macOS, and Windows, known for its user-friendly GUI and extensive guest additions.
    The image is a slide describing VirtualBox as a popular desktop application for creating and managing virtual machines, highlighting its cross-platform compatibility with Linux, macOS, and Windows.

VM Migration Strategies

Migrating VMs between hosts is crucial for maintenance, load balancing, and disaster recovery:

  • Cold migration: Moves a powered-off VM.
  • Live migration: Transfers a running VM with minimal downtime.

The image is a slide explaining virtual machine migrations, highlighting that some hypervisors allow dynamic relocation, with migration involving moving a virtual machine between hypervisors. It distinguishes between regular migration, which may require shutdown, and live migration, which occurs while the machine is running.

Types of Virtual Machines

Virtual machines are classified by how the guest OS interacts with the hypervisor:

  1. Fully Virtualized Guests
    The guest OS is unmodified and unaware of virtualization. All instructions are emulated or passed through hardware virtualization extensions (Intel VT-x or AMD-V).

    Note

    Ensure Intel VT-x or AMD-V is enabled in your BIOS/UEFI before deploying fully virtualized guests.

    The image contains a list of characteristics and requirements for fully virtualized guests, including the need for Intel VT-x or AMD-V CPU extensions on x86 platforms.

  2. Paravirtualized Guests (PVMs)
    The guest OS runs with hypervisor-aware kernels and special drivers, reducing emulation overhead for improved performance.
    The image is a slide about paravirtualized guests, explaining that the guest operating system is aware it's running in a virtual machine and uses a modified kernel and special drivers for better performance.

  3. Hybrid Guests
    Combines full virtualization for CPU and memory with paravirtualized drivers (e.g., virtio on KVM, Guest Additions on VirtualBox) for near-native I/O throughput.
    The image is a slide titled "Hybrid Guests" that explains the combination of paravirtualization and full virtualization, mentioning the use of paravirtualized drivers for performance enhancement, and references to KVM and VirtualBox.

The image illustrates three types of virtual machines: Paravirtualized Guest, Fully Virtualized Guest, and Hybrid Guest, each represented by a cube icon.

Infrastructure as a Service (IaaS) Considerations

IaaS providers deliver hypervisor-based VM instances with web consoles and APIs. Administrators should evaluate:

ResourceUse Case
ComputeVirtual CPU and memory billed hourly or by vCPU‐seconds. Automate scaling to reduce waste.
Block StoragePersistent volumes for VM disks. Pricing tiers vary by capacity and IOPS.
Object StorageScalable storage for unstructured data; archival tiers for infrequent access at low cost.
NetworkingVirtual networks, subnets, security groups, DNS, and VPN connectivity to on-premises sites.

Compute Instances

Plan instance types and counts to optimize CPU and memory usage. Monitor billing dashboards to avoid surprise charges.

The image is a slide discussing computing instances, highlighting that providers charge based on usage rates, and emphasizing the need for careful planning to manage cloud costs. It also notes that computing instances can refer to virtual machines in a cloud environment, with higher usage leading to higher costs.

Block Storage

Attach block volumes as virtual disks. Select performance tiers (e.g., SSD vs. HDD) based on throughput requirements.

The image is a slide about block storage, explaining its use for web-based traffic or external storage to host files, with costs varying based on storage amount and speed.

Object & Archival Storage

Use for backups, logs, and large datasets. Archive tiers offer the lowest cost for infrequent retrievals.

Networking Services

Design virtual networks, subnets, and security policies through the provider’s console or API. Implement VPN or dedicated links for hybrid cloud scenarios.

The image contains text about networking, describing web-based utilities for network design, DNS solutions, and hybrid solutions for connecting on-premise infrastructure to the cloud via VPN.

Automating VM Initialization with cloud-init

cloud-init standardizes first-boot configuration across cloud platforms using a YAML-based cloud-config file. Typical configurations include:

  • Hostname and timezone setup
  • System updates and package installations
  • User account creation and SSH key injection
  • Network interface configuration

Example cloud-config:

#cloud-config
timezone: Africa/Dar_es_Salaam
hostname: test-system
# Update and upgrade packages on first boot
apt_update: true
apt_upgrade: true
# Install Nginx web server
packages:
  - nginx

Warning

The line #cloud-config must begin at the very start of the file with no leading whitespace.

References

Watch Video

Watch video content

Previous
Use RPM and YUM Package Management Zypper