/etc/init.d/apparmor stopInstall XEN:
update-rc.d -f apparmor remove
AppArmor is a kernel enhancement to confine programs to a limited set of resources. AppArmor’s unique security model is to bind access control attributes to programs rather than to users.
apt-get install ubuntu-xen-serverNote: Here i810 refers to graphics chipset.So check out your system graphics chipset.
After installation of xen you should edit xorg.conf file.
vim /etc/X11/ xorg.conf
Your original xorg.conf files looks
Section "Device"
Identifier "Configured Video Device"
Now add the following line in xorg.conf
Section "Device"
Identifier "Configured Video Device"
Driver "i810"
Download 2.6.24-16-xen kernel To avoid network problem:
wget http://www.il.is.s.u-tokyo.ac.jp/~hiranotaka/linux-image-2.6.24-16-xen_2.6.24-16.30zng1_i386.debReplace the Ubuntu 2.6.24-16-xen kernel:
dpkg -i linux-image-2.6.24-16-xen_2.6.24-16.30zng1_i386.debReboot your system
Move tls file
mv /lib/tls /lib/tls.disabledModify Modules:
Add the line in vim /etc/modulesDirectory for XEN
loop max_loop=64
mkdir /home/xenModify xen-tools.conf
vim /etc/xen-tools/xen-tools.conf
Reboot your systeminstall-method = debootstrap # method will change with respect to type of OS
dir = /home/xen
dhcp = 1
dist = hardy # Type of guest os
passwd = 1
mirror = http://192.168.1.36:9999/ubuntu/
Now Run
jayapal@kcs:~$ uname -rCreate Guest OS:
2.6.24-16-xen
jayapal@kcs:~$
jayapal@kcs:~$ xen-create-image --hostname=Guestos --ide --passwdGuestos.cfgNote: You can give size, swap, Network settings, etc... to override settings in xen-tools.conf.For more details jayapal@kcs:~$ man xen-create-imageAfter creating image file,Terminal will show message as :Logfile produced at:
/var/log/xen-tools/Guestos.log
vim /etc/xen/Guestos.cfgkernel = '/boot/vmlinuz-2.6.24-16-xen'
ramdisk = '/boot/initrd.img-2.6.24-16-xen'
memory = '128'
vcpus = '2' #For dual-core CPU
root = '/dev/hda2 ro'
disk = [
'tap:aio:/home/xen/domains/Guestos/swap.img,hda1,w',
'tap:aio:/home/xen/domains/Guestos/disk.img,hda2,w',
]
vif = [ 'ip=192.168.2.10 mac=00:16:3E:C9:C2:6C' ]
To start the virtual machine:
To Stop the virtual machine:xm create /etc/xen/Guestos.cfg
Using config file "/etc/xen/Guestos.cfg".
Started domain Guestos
xm console Guestos
Guestos started and it will prompt for user login.
For Centos:xm shutdown Guestos
for more command see xm man
Download initrd.img and vmlinuz, then move in to /boot/ directorySource:wget http://mirror.centos.org/centos/5/os/i386/images/xen/initrd.imgMirror
wget http://mirror.centos.org/centos/5/os/i386/images/xen/vmlinuzhttp://mirror.centos.org/centos/5/os/i386/images/xen/
http://www.howtoforge.com/ubuntu-8.04-server-install-xen-from-ubuntu-repositories
No comments:
Post a Comment