QEMU/KVM Network Mechanisms

Introduction As we know, network subsystems are important in computer systems since they are I/O systems and need to be optimized with many algorithms and skills. This article will introduce how QEMU/KVM [2] network part works. In order to put everything simple and easy to understand, we will begin with several examples and then understand how it works internally. Examples In this example, we will use TAP device [1] as QEMU/KVM host network device driver and VirtIO driver will be used to send/receive network packets/data between Host OS and Guest OS. » Read more

I/O Microscopy: Tasks’ Disk I/O Information with High Accuracy

Abstract Most popular task monitor systems (such as top, iotop, proc, etc) can only get tasks’ disk I/O information like tasks’ I/O utilization percentage every seconds due to kernel timer/tick frequency and high time cost of system interfaces. This article presents I/O Microscopy, a new way to get tasks’ disk I/O information with high accuracy. Experiments show that I/O microscopy can filter out I/O intensive tasks effectively. » Read more

x-data-plane feature in QEMU/KVM

Abstract In systems, sometimes, we use one global lock to keep synchronization among different threads. This principle also happens in QEMU/KVM (http://wiki.qemu.org/Main_Page) system. However, this may cause lock contention problem. The performance/scalability of whole system will be decreased. In order to solve this problem in QEMU/KVM, x-data-plane feature is designed/implemented, which the high-level idea is “I/O requests are handled by dedicated IOThread rather than QEMU main loop threads so that it will not have lock contention among I/O threads and other QEMU main loop threads”. » Read more

Creating Fedora 20 Domain-U on Fedora 20 Domain-0

In this post, creating a file-backed virtual block device (VBD) and installing Fedora 20 in the Xen DomU via internet will be introduced. This domain is created on a Fedora 20 Dom0 as introduced in Installing Xen on Fedora 20 as Domain-0. For better performance, you may consider using LVM backed VM. Create file-backed VBD The actual space of VBD will be the amount of disk the virtual machine used. » Read more

Installing Xen on Fedora 20 as Domain-0

I ever introduced Installing Xen on Fedora as Domain-0 (Fedora 17) as the first try to use the xen package delivered from Fedora and get away from manually compiling Xen and patching the kernel. In this post, I introduce installing Xen Dom0 on Fedora 20. Installing Xen First, install the xen pacakges: # yum install xen The Linux kernel is already ready to run in Domain-0 with the pv_ops technology enabled. » Read more

How to Install, Run and Uninstall VMware Player and VirtualBox on Fedora Linux

VMware Player and VirtualBox are two cool and free full virtualization solutions and both can run on top of a Linux host. In this post, I introduce how to install, run, and uninstall VMware Player and VirtualBox on Fedora Linux. VMware Player ∞ Install VMware Player ∞ Download the installation bundle from VMware’s website. For example, the file we download is: VMware-Player-4.0.0-471780.x86_64.bundle . » Read more

Managing Xen Dom0′s CPU and Memory

The performance of Xen’s Dom0 is important for the overall system. The disk and network drivers are running on Dom0. I/O intensive guests’ workloads may consume lots Dom0′s CPU cycles. The Linux kernel calculates various network related parameters based on the amount of memory at boot time. The kernel also allocate memory for storing memory metadata (per page info structures) is also based on the boot time amount of memory. » Read more

Script: Shutting Down All Xen VMs on a Server

Shutting down servers is a common operations for managing a cluster. However, if this server is configured to a Xen Dom0 and has Xen VMs (DomUs), the VMs should be shutdown first to avoid data lost on these VMs. xm supports a -a option to shutdown all VMs: # xm shutdown -a Add the -w if you want to make it wait for the domain to complete shutdown before returning Thanks to Eugene for this tips. » Read more

Installing Fedora 17 PV Domain-U on Xen with PXE Booting

An introduction to the general method of installing Domain-U on Xen is introduced here: Setting Up Stable Xen DomU with Fedora: Unmodified Fedora 12 on top of Xenified Fedora 12 Dom0 with Xen (this is a general introduction, some details are changed, such as ‘xl’ replacing ‘xm’, LVM backing the disk for higher performance. But the general process is the same). » Read more

Installing Xen on Fedora as Domain-0 (Fedora 17)

The new development of Xen and Linux kernel make it easy to install Xen on Fedora as the Domain-0 now. This post uses Fedora 17 as an example platform to introduce how to set up Domain-0 on Fedora Linux. Compared to our old method (Setting up Stable Xen Dom0 with Fedora: Xen 3.4.3 with Xenified Linux Kernel in Fedora 12) which requires manually compiled Xen and patched kernel, the current packages and support to Xen in Fedora and Linux kernel make the system administrators life much easier. » Read more

Setting Up Ubuntu DomU on Xen: Ubuntu 10.10 on Fedora Xen Dom0

Setting up Ubuntu 10.10 DomU on top of Fedora Xen Dom0 is introduced in this post. The process of setting up Ubuntu 10.10 DomU is the same as Setting Up Stable Xen DomU with Fedora: Unmodified Fedora 12 on top of Xenified Fedora 12 Dom0 with Xen 4.0 This post only show the difference which is specific to Ubuntu and different from Fedora. » Read more

Simple Introduction to paravirt_ops for Xen

The is a simple introduction to paravirt_ops in Linux kernel for Xen, VMware, etc. We make this introduction from the view of code. We use the function raw_local_irq_disable() and raw_local_irq_enable() functions in Linux kernel to introduce paravirt_ops for Xen and Xenified kernel. Please download the introduction to paravirt_ops pdf file: introduction-to-pv-ops-v3.pdf » Read more

Xen with LVM

LVM volumes as backing for DomU’s file system is an appealing solution to Xen VBD. LVM volumes can dynamically grow/shrink and snapshot. These features make it simple and fast to duplicate DomU and adding storage to DomU. This post is a summary of tutorials related Xen DomU and LVM. Setting Up LVM Backed Xen DomU Duplicating LVM Backed Xen DomU Duplicating and Backing Up LVM Backed Xen DomU from a Remote Server » Read more

Duplicating LVM Backed Xen DomU

LVM’s snapshot feature enables us to duplicate an LVM backed Xen DomU in seconds rather than minutes. We no longer need to copy the entire file system image like backing up file backed Xen DomU. We just need to make a snapshot of the current Xen DomU in seconds. When there are changes to the file system of the new DomU, LVM will make a copy of the physical block of the logical volume write the the new volume. » Read more

An Introduction to Xen Source Code Structure and Disk in Xen

Please note these slides on Xen was made in around 2013 and the Xen source code structure might have already changed a lot. Please check this as a reference to the Xen source structure only. I have created slides from introducing Xen’s source code structure and backend and frontend drivers in Xen. Please find the PDF version here: xen-code-disk-v2.pdf There are animations in the PDF and you may enable them which may help to understand it. » Read more

Setting up Stable Xen Dom0 with Fedora: Xen 3.4.3 with Xenified Linux Kernel in Fedora 12

This is the latest stable and recommended stable Xen Dom0 solution on Fedora 12. No serious bug found till now and we will fix the bugs by ourselves if some appears. It also works on Fedora 14 as well. It should not be hard to use this solution on other versions of Fedora or other Linux distribution. How to set up Xen Dom0 with Xenified Linux kernel in Fedora 12 will be introduced in this post. » Read more

Xen DomU’s I/O Performance of LVM and loopback Backed VBDs

This posts list benchmark (using bonnie++) result of I/O performance of Xen LVM and loopback backed VBDs. The configuration of machines Dom0 VCPU: 2 (Intel(R) Xeon(R) CPU E5520  @ 2.27GHz) Memory: 2GB Xen and Linux kernel: Xen 3.4.3 with Xenified kernel DomU VCPU: 2 Memory: 2GB Linux kernel: Fedora ( DomU’s profile: name=”″ vcps=2 memory=2048 disk = [‘phy:vg_xen/vm-,xvda,w’] #disk = [‘tap:aio:/lhome/xen/vm0-f12/vmdisk0,xvda,w’] #disk = [‘file:/lhome/xen/vm0-f12/vmdisk0,xvda,w’] vif=[‘bridge=eth0′] bootloader=”/usr/bin/pygrub” #extra=”single” on_reboot=’restart’ on_crash=’restart’ The “disk” lines is changed depending on the driver used. » Read more

Problems during Installing Xen Dom0 in Fedora

Here is a list of problem that may occur during installing and configuring Xen Dom0 in Fedora. It is found originally in Fedora systems, but the tips in this post should also be helpful for installing Xen Dom0 on other platforms. BIOS configuration If xen stops at: “I/O virtualization disabled.” We may need to enable VT and I/O virtualization in BIOS. » Read more

Xen Solutions

The Xen solutions including installing and configuring Dom0 and DomU are summarized here. This post will be updated when our solution changes. Only the latest tested stable solutions are listed here. LVM volumes as backing for DomU’s file system is an appealing solution to Xen VBD. LVM volumes can dynamically grow/shrink and snapshot. These features make it simple and fast to duplicate DomU and adding storage to DomU. » Read more