Main Menu

friends

Latest articles

hello world in tcl - radically simple
07/01/2010 | mad mad mod

This article describes how to write and execute a "Hello World" tclsh script on Linux (Fedora).  1. the prerequisitesa text editor of your choice (e.g. vi)tclsh - Simple shell containing Tcl inte [ ... ]


how to copy hidden files from one directory to another
10/03/2010 | mad mad mod

Let's assume that you have a directory "test" containing the following files:  [root@blackmod test]# ls -la
total 8
drwxr-xr-x.  2 root root 4096 2010-03-10 06:11 .
dr-xr-x---. 11 root root 4096 20 [ ... ]


Other Articles
Facebook MySpace Twitter Digg Delicious Stumbleupon Google Bookmarks 

Designed by:
SiteGround web hosting Joomla Templates
XEN on fedora 8 - part 1: the basic setup E-mail
User Rating: / 0
PoorBest 
XEN

This article describes how to install and use the XEN Hypervisor on Fedora Linux 8. I use Fedora Linux as host operating system (Domain 0) and I use Fedora as operating system for the paravirtualized XEN guest (DomU) as well.

Requirements:

  • minimum 256MB free memory
  • 4GB disk space
  • Fedora 8 installed and ready to use
  • Fedora 8 ISO Image
  • 30 minutes of your time (depending on your internet connection Wink )

 

If you dont have a Fedora 8 ISO, you can download it from this site: http://mirrors.fedoraproject.org/publiclist/Fedora/8/i386/

 

 

 

1. Install XEN software

First you have to install XEN. the XEN kernel and the virt-manager (You have to run this command with root privileges):

[root@localhost ~]# yum install kernel-xen xen virt-manager python-twisted

 

If you use the "standard" Fedora 8 repositories, yum will resolve all dependencies for you

 

 

2. Change grub.conf

 

Now you have to change the default boot option in grub.conf, to make your new kernel the default:

open /boot/grub/grub.conf with vi:


[root@localhost ~]# vi /boot/grub/grub.conf

Change the line "default=" to match your XEN kernel. The first entry in the boot list is 0, the second entry 1 and so on. In my case it looks now like this:

 

default=0
timeout=5
splashimage=(hd0,1)/grub/splash.xpm.gz
hiddenmenu


title Fedora (2.6.21-2950.fc8xen)
root (hd0,1)
kernel /xen.gz-2.6.21-2950.fc8
module /vmlinuz-2.6.21-2950.fc8xen ro root=/dev/rootvg/root_lv rhgb quiet
module /initrd-2.6.21-2950.fc8xen.img

(...)


(save and close the file with :wq)

Now you have to reboot to use the new kernel.

 

3. Prepare your installation source

 

Unfortunately you cannot install a paravirtualized guest from a CD or DVD. Actually, there are only 3 options:

  • installation from NFS server
  • Installation from a web server (http)
  • installation from ftp server

 

It seems like the best solution is to use nfs. The next step is to create a new directory and copy the Fedora 8 iso image to this new folder:

 

[root@localhost]# mkdir /iso
[root@localhost]# cp Fedora-8-i386-DVD.iso /iso/

 

(Depending on how you have organized your storage, it might be better to create a new filesystem first.)

 

Now you have to create a new mountpoint to access the content of the ISO image and then mount the ISO to this new mountpoint;

[root@localhost]# mkdir /iso/Fedora-8-i386-DVD

[root@localhost]# mount -o loop /iso/Fedora-8-i386-DVD.iso /iso/Fedora-8-i386-DVD

 

Now we have to setup the nfs share. First edit /etc/exports with vi:

[root@localhost]# vi /etc/exports

 

And add your new mountpoint with read-only access:

/iso/Fedora-8-i386-DVD *(ro)

 

(save and close the file with :wq)

 

now we have to start the nfs daemon and check if everything is exported as expected:

 

[root@localhost]# service nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
[root@localhost]# exportfs
/iso/Fedora-8-i386-DVD <world>

 


4. Install a Virtual XEN machine

There is also a GUI to install a new XEN machine (DomU), but I prefer the command line tool virt-install which comes with the package python-virtinst (it is already installed because its a requirement for virt-manager).

 

There are many options for virt-install. For a standard installation you need only a few of them:

-p paravirtualization: because we want to install a paravirtualized guest.
--name The name of the new virtual machine. E.g. myxenvm or testbox
--ram Memory to allocate for guest instance in megabytes
--file File to use as the disk image. If you have not created the file befor, it will be created during the installation
--file-size Size of the disk image (if it doesn't exist) in gigabytes
--nonsparseWe want to have a static filesize (better performance)
--nographicsRemove this option if you prefer to use a GUI during installation.
--locationInstallation source for paravirtualized guest

 

I call my new virtual machine "myguest" and I will start with 256MB RAM and a 4GB virtual disk. My host system has the IP address 192.168.1.101. The command I have to enter to install my machine is:

 

 

[root@localhost ~]# virt-install -p --name=myguest --ram=256 --file=/dvgrab/myguest.img --file-size=4

--nonsparse --nographics --location=nfs:192.168.1.101:/iso/Fedora-8-i386-DVD

 

Note: myguest is NOT the hostname, it is just the name of the virtual machine. However, I think it makes sense to use the same name for both.

 

After you type enter You will go through the normal Fedora 8 installation:

 

Welcome to Fedora for i386

+---------+ Choose a Language +---------+
| |
| What language would you like to use |
| during the installation process? |
| |
| Catalan ^ |
| Chinese(Simplified) : |
| Chinese(Traditional) # |
| Croatian : |
| Czech : |
| Danish : |
| Dutch : |
| English v |
| |
| +----+ |
| | OK | |
| +----+ |
| |
| |
+---------------------------------------+

<Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen

 

(...)

 

 



┌──────────────────────┤ Complete ├───────────────────────┐
│ │
│ Congratulations, your Fedora installation is complete. │
│ │
│ Press <Enter> to end the installation process. │
│ │
│ │
│ ┌────────┐ │
│ │ Reboot │ │
│ └────────┘ │
│ │
│ │
└─────────────────────────────────────────────────────────┘





<Enter> to exit

 

Thats it! you have now installed a virtual Linux machine!

 

http://www.madmadmod.com/xen/10-xen-on-fedora-8-part-2-management-basics.html

 

Comments (0)
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:angry::angry-red::evil::idea::love::x:no-comments::ooo::pirate::?::(
:sleep::););)):0
Security
Please input the anti-spam code that you can read in the image.

!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."

 
mad mad mod, Powered by Joomla! and designed by SiteGround web hosting