Changes between Initial Version and Version 1 of Paravirtualization


Ignore:
Timestamp:
Apr 30, 2008, 12:02:19 AM (16 years ago)
Author:
broder
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Paravirtualization

    v1 v1  
     1Xen supports two different types of virtualization: Hardware-supported virtualization (HVM) and paravirtualization (ParaVM).
     2
     3Most sipb-xen VMs are initially created as HVMs. HVMs virtualize a full machine, down to the metal. They use special processor capabilities to do this. This allows you to run an unmodified operating system. For example, this is the only way to run Windows under Xen. However, I/O performance suffers as a result of this virtualization approach.
     4
     5ParaVMs on the other hand, modify the guest operating system to remove privileged operations, replacing them with calls to the Xen hypervisor. ParaVMs have significantly better performance, but require a modified kernel. Only a few operating systems have support for running as a paravirtualized Xen guest: Linux, NetBSD, OpenBSD, FreeBSD, and !OpenSolaris being the most well known.
     6
     7The sipb-xen maintainers recommend that servers be converted to ParaVM when possible. Currently, we can offer instructions for upgrading 64-bit installs of Debian or Ubuntu.
     8
     9== Converting a Linux Guest to ParaVM ==
     10
     11=== Pre-requisites ===
     12
     13* 64-bit install
     14  It is currently not possible to boot a 32-bit ParaVM kernel on sipb-xen (see #64). This should be possible, but for now, it is only possible to boot 64-bit kernels.
     15* DHCP does not work
     16  The sipb-xen DHCP server currently does not communicate correctly with a paravirtualized guest, so the IP address will have to be set manually. To do this, edit /etc/network/interfaces and change the line that reads
     17{{{
     18iface eth0 inet dhcp
     19}}}
     20  to instead read
     21{{{
     22iface eth0 inet static
     23address <your static IP address>
     24netmask 255.255.0.0
     25gateway 18.181.0.1
     26}}}
     27
     28=== Installing the Necessary Packages ===
     29
     30The following packages need to be installed on a Debian guest to get a Xen-capable kernel:
     31linux-image-xen-amd64
     32linux-headers-xen
     33
     34On an Ubuntu system, install the following packages:
     35linux-image-xen
     36linux-headers-xen
     37
     38On Ubuntu, you may also want the linux-restricted-modules-2.6.22-14-xen module (when the kernel version changes, substitute the appropriate version).
     39
     40=== Fix Grub ===
     41
     42By default, the `update-grub` script which generates the /boot/grub/menu.lst file will not add Xen kernels when not currently booted as a Xen guest. In order to change this behavior, edit /usr/sbin/update-grub and apply the following patch:
     43{{{
     44--- update-grub.orig    2008-04-25 16:16:15.000000000 -0400
     45+++ update-grub 2008-04-25 16:16:43.000000000 -0400
     46@@ -778,10 +778,12 @@
     47 
     48        if [ ! "$in_domU" ] && [ "$is_xen" ]; then
     49          # skip xen kernels
     50-          continue
     51+          # continue
     52+         :
     53         elif [ "$in_domU" ] && ! [ "$is_xen" ]; then
     54          # skip non-xen kernels
     55-         continue
     56+         # continue
     57+         :
     58         fi
     59         kern="/boot/$kern"
     60        newerKernels=""
     61}}}
     62
     63Then, run /usr/bin/update-grub again.
     64
     65=== Enable the Serial Console ===
     66
     67ParaVMs currently don't have access to the VNC console; the VM has to be accessed through the SerialConsole. Configure it before rebooting, or it won't be possible to access the VM.
     68
     69=== Change the Database Setting ===
     70
     71Once you've completed all of these steps, you should be able to shutdown your VM, change the radio button on the VM's info page at sipb-xen-dev.mit.edu, and then reboot the machine.