You are here Home > Know-how > Linux > Server > Virtualization with Xen

Linux Reference

4.6 Virtualization with Xen


20.02.2008
4.5.3 SPAM / Spamassasin [  up  ] - [ top ] - [ linux a-z ] 4.6.1 Graphical Setup with Xen

Note: There are my personal and minimal notes. Find a complete instruction on the official Fedora Core website

  1. Install the Xen kernel
    First of all, I installed the Xen-enabled Linux kernel by typing
    yum install kernel-xen0
  2. Make sure the new installed kernel will be loaded after reboot by editing grub.donf. The first menu entry in grub.conf has the number 0.
    vi /etc/grub.conf
  3. Prepare Fedora Source (installation files)
    I have wget'ed recursive the Fedora files from a public mirror to my local hard drive. This will increase the speed of a new installation of new virtual servers. Create a directory (e.g. fc5) accessible through your local web server and get the required image files:
    mkdir /var/www/html/fc5
    cd /var/www/html/fc5
    wget -r ftp://ftp.tu-chemnitz.de/pub/linux/fedora-core/5/i386/os/
    Use an appropriate mirror nearest to your location.
    You will later refer to these installation files during the guest system setup. A quick note: It's a good time to verify the current IP address of your host system. The IP address of your local webserver that is hosting these installation files must not be typed as localhost or 127.0.0.1 but smth like 192.168.1.123.

  4. Prepare a location of the system environment
    This step might not be necessary but I thought it's a good advice to keep track of the location of the virtual system image by adding a dedicated user on the host system. I will assign system images to /home/virtual/xenbox1 later.
    useradd -c "Fedora Xen" virtual
  5. Building another Fedora Guest System
    As root:
    # xenguest-install.py
    What is the name of your virtual machine? virtual2
     How much RAM should be allocated (in megabytes)? 256
    	→ At least 256 MB.  You may later change this value during run time.
     What would you like to use as the disk (path)? /home/virtual/xenbox2
     How large would you like the disk to be (in gigabytes)? 6
     What is the install location? http://192.168.1.2/fc5/pub/linux/fedora-core/5/i386/os/
    
    You could also give these arguments as parameters on a single lilne:
    # xenguest-install.py -n virtual1 -f /home/virtual/xenbox1 -r 256 -l http://192.168.1.2/fc5/pub/linux/fedora-core/5/i386/os/
  6. At this stage, you have to decide wether to use text or graphical mode view during the setup. Text mode is easy but the setup with vnc is pretty cool!

  7. Click to enlarge View after successful installation of a new virtual server.
    Press Enter to (virtual) reboot.
  8. (Virtual) booting
    Click to enlarge
    Startup your guest system by typing
    xm create -c virtual1


  9. foo

    Click to enlarge

I'm sure you want to know this tip as well:

How to enable autostart guest servers after reboot of the host system?
cd /etc/xen/auto
ln -s /etc/xen/virtual1


Further references




See also:
Nfs.html#fc5



copyright by retoh - created with mytexi