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:
    xloc=http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Fedora/i386/os
    or:
    ftp://less.cogeco.net/fedora/linux/releases/10/Fedora/i386/os/
    ftp://fedora.mirror.iweb.ca/releases/10/Fedora/i386/os/
  • Create VM:
    virt-install \
    --name fred \
    --ram 512 \
    --paravirt \
    --vnc \
    --file /dev/vg/vm_fred \
    --location=$xloc
  • for installation under Fedora 10
    -instead of --file use --disk path=/dev/vg/vm_fred
  • running under gnome, virt-install seems to bring up a VNC session automatically. With KDE you have to launch it.
  • Make sure you install a client that *does not* use LVM, or you will find it much more complicated to mount the client's partition from the host.
  • Because of a bug in the Fedora 10 version of Anaconda, this may well fail because the wrong kernel is insalled (non PAE). see: https://bugzilla.redhat.com/show_bug.cgi?id=470905
  • To fix this, use the workaround here: http://fedoraproject.org/wiki/Common_F10_bugs#Fedora_10_i686_Xen_guest_w...
    get the kickstart file from the root of the install: anaconda-ks.cfg
    Add the line kernel-PAE to the end of it and save it as fred-ks.cfg on a web server.
    Then add the line to virt-install: --extra-args "ks=http://me.com/fred-ks.cfg" /
  • The instructions here are very simple: http://www.howtoforge.com/installing-xen-on-centos-5.2-i386-p2

    Another howto: http://www.techotopia.com/index.php/Installing_a_Xen_Guest_OS_from_the_Command-line_(virt-install)

  • Install NX (info from this page: http://www.nomachine.com/download-package.php?Prod_Id=355 )
    yum install wget #must be logged on as root
    NXVER=3.3.0
    CVER=6
    NVER=17
    SVER=22
    NXURL=http://64.34.161.181/download
    wget $NXURL/$NXVER/Linux/nxclient-$NXVER-$CVER.i386.rpm
    wget $NXURL/$NXVER/Linux/nxnode-$NXVER-$NVER.i386.rpm
    wget $NXURL/$NXVER/Linux/FE/nxserver-$NXVER-$SVER.i386.rpm
    rpm -i nxclient-$NXVER-$CVER.i386.rpm
    rpm -i nxnode-$NXVER-$NVER.i386.rpm
    rpm -i nxserver-$NXVER-$SVER.i386.rpm
    yum install xorg-x11-fonts-misc #it is probably necessary to install some fonts

    Errors in connecting to NX server can sometimes be a problem with the hostname resolving.
    If upgrading an existing installation, use -U rather than -i
    Update the port numbers if necessary:
    vi /usr/NX/etc/node.cfg & server.cfg
    change: #SSHD_Port=22 to SSHD_Port=xxxx # or whatever
    vi /etc/ssh/sshd_config
    and add Port xxxx under Port 22
    /etc/init.d/sshd restart
    /etc/init.d/nxserver restart
  • notes for kde:http://kde-redhat.sourceforge.net/
    blog (portugese?): http://psytux.wordpress.com/2008/12/09/kde-42-beta-1-en-fedora-10/

Mounting the client disks from the host

Assuming you haven't used LVM for the client, you can do the following:
kpartx -av /dev/vg/vm_fred #create mapping - will return all the mappings available
#ls -l /dev/mapper/ #will give you their names
mount /dev/mapper/nameofmappingp1 mountpoint #mount the one you want (e.g mount /dev/mapper/vm_fred2 vm_fred )
#do stuff
umount mountpoint #must do this before removing mapping
kpartx -dv /dev/vg/vm_fred #remove mapping when done

other stuff

yum install rss-glx-gnome-screensaver #skyrocket screensaver
yum install rss-glx-kde # or for kde