An important aspect of virtualization is ensuring the security of the disk images used by VMs. Encrypting these disk images helps protect sensitive data from unauthorized access. This post will guide you through the process of encrypting a KVM QCOW2 disk image using LUKS (Linux Unified Key Setup).
Continue reading “Encrypting KVM QCOW2 Disk Images with LUKS”Month: July 2024
Understanding Linux ACLs: Setting Default and User/Group Rules
Access Control Lists (ACLs) provide a more flexible permission mechanism for file systems compared to traditional Unix file permissions. They allow you to set permissions for individual users or groups beyond the standard owner/group/others model. This makes ACLs particularly useful in environments where you need fine-grained access control. In this article, we’ll explore the basics of using Linux ACLs to set default and user/group rules.
Continue reading “Understanding Linux ACLs: Setting Default and User/Group Rules”Using LVM Logical Volumes with KVM Guests via virsh
When managing virtual machines (VMs) in a Linux environment, using Logical Volume Manager (LVM) with Kernel-based Virtual Machine (KVM) provides several benefits. LVM offers flexibility and control over storage allocation, while KVM, combined with virsh, offers a robust virtualization solution. This guide will walk you through the process of setting up LVM logical volumes for your KVM guests using virsh.
KVM Storage Support and Features
KVM supports a variety of storage types, each catering to different performance and feature requirements. The Raw format is simple and offers high I/O performance but lacks advanced features like snapshots. QCOW2 is more feature-rich, supporting snapshots, compression, and encryption, though it has higher CPU overhead and slightly lower performance. LVM (Logical Volume Manager) offers good performance and easy resizing with thin provisioning, though it can be complex to manage. Network-based storage solutions like iSCSI and NFS provide scalability and shared access, with iSCSI offering block-level and NFS file-level access, both supporting live migration and snapshots. Distributed storage systems like Ceph and GlusterFS are highly scalable and fault-tolerant, ideal for large environments, but require significant setup. Finally, ZFS stands out for its advanced data integrity and management features, making it suitable for environments where robustness is crucial. Each of these storage types supports essential features like live migration and snapshots, enhancing KVM’s flexibility in various use cases.
Continue reading “KVM Storage Support and Features”Serial Console in KVM
A serial console provides a text-based interface for accessing a system, especially when graphical interfaces are unavailable or network connections are down. It allows you to interact with the system using a terminal program, even during boot sequences or critical failures. Here are some scenarios where serial consoles prove beneficial.
Continue reading “Serial Console in KVM”Unattended Linux Installation on KVM with virsh and kickstart
For system administrators looking to automate deployments, using Kickstart files for automated installations can be a highly efficient approach. This lesson will show you how to install Rocky Linux 9 on a KVM virtual machine using a Kickstart file and the virsh command-line tool.
How to Manage KVM Snapshots with virsh
Snapshots are a powerful feature of KVM that allow you to capture the state of a virtual machine (VM) at a specific point in time. This capability is valuable for system administrators and developers who need to create temporary backups, test changes, or recover from errors. In this lesson, we’ll explore how to manage KVM snapshots using the virsh command-line tool on a Linux server.
macvlan vs Bridge Interface: Wi-Fi Compatibility and Benefits
The primary difference between a macvlan and a bridge interface solution lies in how they handle network traffic and their compatibility with different types of network interfaces, particularly Wi-Fi. On a consumer notebook, like a ThinkPad it is almost impossible to create a bridge interface, so your KVM virtual machines are unreachable from the host.
Continue reading “macvlan vs Bridge Interface: Wi-Fi Compatibility and Benefits”Docker Basics: Upcoming Free Training by Tom’s IT Cafe
Tom’s IT Cafe’s upcoming free training is under heavy development: Docker Basics for beginner system administrators, developers and those who want to learn containerization with the industry standard Docker solution. Enhance your CI/CD, automation and system testing with containers.
Stay tuned! You will learn how to install and use Docker in a Linux environment.
Manage KVM Volumes With virsh And qemu-img
KVM storage volumes are virtual disk images that can be assigned to virtual machines. They are stored on the host system and presented to the guest as virtual hard drives. The most commonly used image format for KVM storage volumes is qcow2 (QEMU Copy-On-Write 2). qcow2 is a sparse format that only allocates disk space as needed, allowing multiple volumes to efficiently share the same base image using copy-on-write. This saves disk space compared to raw disk images. qcow2 also supports features like snapshots, encryption, and compression.


