You are here


Technical Notes

These notes are my personal online notebook of useful commands and "how-to's". You are welcome to make use of them if you find them helpful. They obviously don't come with any warranty! Click on one of the category tags above for the notes in any category.

Migrate Xen to KVM on RHEL/CentOS 6

Red Hat's own documentation can be found here:

Set up bridging on server:


Installing Fedora 10 on RHEL/CentOS 5.3 as a Xen DomU

Please be aware that I was not 100% successful using this method:
Note that you cannot install Fedora 10 on RHEL/CentOS 5.2 using virt-install since the image structure has changed. You will need to use the new virt-install in 5.3

  • Prepare LVM with:
    lvcreate -L 5G -n vm_fred vg
    lvcreate -L 1G -n vm_fred_swp vg
    /sbin/mkswap /dev/vg/vm_fred_swp
  • for installation under RHEL/CentOS (note that 32 bit domU's can only run under 32 bit dom0's)
  • Set up the install location with:

How to install an Ubuntu Hardy VM under CentOS/Red Hat Xen

My process is to create the VM under Ubuntu/Hardy and then move it across

Creating a new Xen Windows XP VM in CentOS 5.1

  1. /usr/sbin/lvcreate -L 10G -n vm_mymachine VolGroup00 #first create a logical volume for the machine
  2. dd if=/dev/scd0 of=/var/lib/xen/images/media/winxp.iso #create an ISO image of the XP cd-rom
  3. run the graphical virtual machine manager
  4. make the source of the installation: /var/lib/xen/images/media/winxp.iso
  5. format partition to FAT since then it is editable from within CentOS host
  6. the first reboot will fail. Before restarting, do the following:

How to move a virtual machine from one computer to another

#create a snapshot of the LV drive
/usr/sbin/lvcreate -L5G -s -n vm_test_snap /dev/VolGroup00/vm_test
#turn the snapshop into a file image
dd if=/dev/VolGroup00/vm_test_snap | gzip -9 >/backup/vm_test.dd.gz
#remove the snapshot


How to install an Ubuntu VM under CentOS/Red Hat Xen

My process is to create the VM under Ubuntu/Gutsy and then move it across


There is an article at: which unfortunately has a number of flaws. For more information, see:

Creating a new Xen VM in CentOS 5.1

I would recommend not using LVM within a VM because it makes it harder to back up the files within the VM

/usr/sbin/lvcreate -L 5G -n vm_testvm VolGroup00 #first create a logical volume for the machine
/usr/sbin/lvcreate -L 512M -n vm_testvm_swp VolGroup00 #create the LV swap file
/sbin/mkswap /dev/VolGroup00/vm_testvm_swp


Zimbra VM and LVM re-organization

My default Zimbra VM install uses LVM within its own virtual machine. This makes it harder to get at the data from outside the VM, and so complicates backup. The following steps need to be taken


Xen Documentation

Here is a list of useful documentation

Subscribe to RSS - Xen