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

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

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

Creating LVM Volume Group

How to create a LVM group from two hard disk partitions is introduced in this post. Assume we have installed two hard disks /dev/sdb and /dev/sdc to the server, our task now is to create one LVM volume group vg_xen for installing LVM backed Xen DomUs from these two disks. We will do this by several steps: create partitions on the hard disks, initialize disk partitions and create a volume group. » Read more

Duplicating and Backing Up LVM Backed Xen DomU from a Remote Server

LVM’s snapshot feature enables us to duplicate an LVM backed Xen DomU in seconds inside of the same volume group. When we want to duplicate LVM backed Xen DomU from a remote server, we need to make use of LVM’s snapshot function and tools like scp and dd. Backing up the DomU is only part of the process of duplicating one DomU. » 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

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 2.6.32.13 kernel DomU VCPU: 2 Memory: 2GB Linux kernel: Fedora (2.6.32.19-163.fc12.x86_64) DomU’s profile: name=”10.0.1.200″ vcps=2 memory=2048 disk = [‘phy:vg_xen/vm-10.0.1.150/vmdisk0,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

Setting Up Xen DomU on Fedora Linux (Fedora 12)

Creating file-backed virtual block device (VBD) for Xen virtual machines and installing Fedora 12 in Xen DomU via internet will be introduced. Note that this tutorial is based on a pretty old OS (Fedora 12). But the method here is still valid while some minor details may need to be changed for latest Xen and Linux such as such as ‘xl’ replacing ‘xm’, LVM backing the disk for higher performance. » Read more

Unified Xen DomU configuration file

Previously, we create a configuration file for each DomU virtual machines in our cluster. Most of the content in these configuration files is the same. The differences are only the name, memory size and image file address. There are several disadvantages of this method: We must create and configure a new configuration file when creating a new virtual machines; We must change every configuration files when we want to change the parameters of the virtual machines such as change the raw image file driver from loopback to tap. » Read more

Automatically Backing Up Xen File-backed DomU

A script for backing up file-backed Xen DomU is introduced in this post. This script can be changed to similar platform. In our cluster, virtual machines are stored under /lhome/xen/. Virtual machine with id vmid is stored in directory vmvmid. The raw image disk file name can also be derived from vmid. Some more details and the configuration file can be found from Unified Xen DomU configuration file. » Read more

An I/O Performance Comparison Between loopback Backed and blktap Backed Xen File-backed VBD

I have done some I/O performance benchmark test of Xen DomU. For easier management, some of our DomU VMs are using file-backed VBDs. Previously, our VMs are using Loopback-mounted file-backed VBDs. But blktap-based support are recommended by Xen community. Before considering changing from loopback based VBD to blktap based VBD, I have done this performance bench comparison. Note: if your VM is I/O intensive, you may consider setting up LVM backed DomU. » Read more

How to Duplicate Xen DomU Virtual Machines

Assumption: There are VBD based Xen DomU virtual machines stored under /lhome/xen/vm-f11-sample/. There are two files under vm-f11-sample: vm0-f11.run (The configuration file) and vmdisk0 (The virtual disk). Now we want to duplicate the virtual machine vm0 stored under vm-f11-sample to vm-10.0.0.213 which is stored under vm-10.0.0.213. And vm-10.0.0.213’s ip will be 10.0.0.213. The steps to duplicate this virtual machine: 1) Duplicate the virtual disk and configuration files # cp -rv vm-f11-sample vm-10.0.0.213 For security reason, the owner of the virtual machine’s files is root. » Read more

A Simple CPU and Memory Performance Test of Xen Dom0 and DomU

Please refer to Setting Up Xen Dom0 on Fedora : Xen 3.4.1 with Linux Kernel 2.6.29 on Fedora 12 for the platform of this test (this test runs on Fedora 11, however). I have done some simple performance test on DomU and Dom0 and compare with the performance on physical machines. These test are simple, but it can provides some performance factor of xen. » Read more

Create and Manage Virtual Machines on Xen

In this post, these content are introduced:Create and manage file-backed virtual block device (VBD) for virtual machines on xen. Install Fedora 11 via internet as DomU on top of xen. Manage virtual machines using xm.Create file-backed VBD: The actual space of VBD will be the amount of disk the virtual machine used. And it will be convenient if the virtual machine will be duplicated since the work is just copying the VBD file and changing some configurations. » Read more