Wuhai’s Weblog

March 27, 2009

Xen Live Migration Test

Filed under: xen — wuhai @ 8:40 am

[root@xen01p xen]# xm migrate –live ttest xen02p
[root@xen02p ~]# xm migrate –live ttest xen01p

Tried above in Centos5.2. The default Xen in Centos5.2 does not support 32bit Centos5.2 guest live migration, it failed with errors; it does support 64bit Centos5.2 guest live migration. After upgrading to Xen 3.3.1, both are working.

To install Xen 3.3.1 in Centos5.2:

add the following in /etc/yum.repos.d/gitco.repo
[gitco]
name = Red Hat Enterprise $releasever – gitco
baseurl = http://www.gitco.de/linux/i386/centos/5/rpms_testing/
enabled = 1
protect = 0
gpgcheck = 0

yum groupinstall Virtualization

Note: In Xen 3.3.1, it would give out errors if the 3 lines are not commented out as shown below:
#kernel = “/boot/vmlinuz-xen-install_64″
#ramdisk = “/boot/initrd-xen-install_64″
#extra = “text ks=http://xen01p/minimal-ks.cfg”
bootloader=”/usr/bin/pygrub”

March 18, 2009

xen – kickstart

Filed under: xen — wuhai @ 5:12 am

[root@xen01p xen]# pwd
/etc/xen
[root@xen01p xen]# cat tmptest
kernel = “/boot/vmlinuz-xen-install_64″
ramdisk = “/boot/initrd-xen-install_64″
extra = “text ks=http://xen01p.TEST.com/minimal-ks.cfg”
name = “tmptest”
memory = “8192″
#bootloader=”/usr/bin/pygrub”
disk = [ 'tap:aio:/xen/tmptest.img,xvda,w', ]
vif = ['mac=00:16:3e:00:54:01, bridge=xenbr0']
vcpus=1
on_reboot = ‘destroy’
on_crash = ‘destroy’
#on_reboot = ‘restart’
#on_crash = ‘restart’
[root@xen01p xen]#

The commented lines are to be used after kickstart, for normal running.

xm create tmptest
xm console tmptest

After kickstart using above, then uncomment the lines, change on_reboot and on_crash lines accordingly, and do ‘xm create tmptest’ again.

Kickstart file:
[root@xen01p html]# cat minimal-ks.cfg
install
url –url http://xen01p.test.com/Centos5/U2/x86_64/os
lang en_US.UTF-8
network –device eth0 –bootproto dhcp
rootpw password
firewall –enabled –port=22:tcp
authconfig –enableshadow –enablemd5
selinux –enforcing
timezone –utc US/Central
bootloader –location=mbr –driveorder=xvda –append=”console=xvc0″
reboot

# Partitioning
clearpart –all –initlabel –drives=xvda
part /boot –fstype ext3 –size=100 –ondisk=xvda
part pv.2 –size=0 –grow –ondisk=xvda
volgroup VolGroup00 –pesize=32768 pv.2
logvol / –fstype ext3 –name=LogVol00 –vgname=VolGroup00 –size=1024 –grow
logvol swap –fstype swap –name=LogVol01 –vgname=VolGroup00 –size=256 –grow –maxsize=512

%packages
@core
[root@xen01p html]#

In /etc/fstab, put the following per Redhat notes:
/var/www/html/Centos5/U2/x86_64/iso/CentOS-5.2-x86_64-bin-DVD.iso /var/www/html/Centos5/U2/x86_64/os iso9660 ro,loop,context=system_u:object_r:httpd_sys_content_t 0 0

February 2, 2009

RHEL5.3 / Xen virtualization installation

Filed under: xen — wuhai @ 5:50 am

I don’t have RedHat network subscription anymore, but I have RHEL5.3 DVD package:

/media/RHEL_5.3 x86_64 DVD/VT
Virtualization-en, xen.x86_64, python-virtinst, libvirt-python.x86-64, libvirt.x86_64, virt-viewer.x86_64, ../Server/kernel-xen.x86_64, ../Server/gnome-python2-gnomekeyring.x86_64, ../Server/gtk-vnc.x86_64, ../Server/bridge-utils.x86_64

Blog at WordPress.com.