Home > Uncategorized > Migrate CentOS-4.4 to Xen

Migrate CentOS-4.4 to Xen

Boot Knoppix
In a root shell window:

vgchange -ay							# activate LVM

e2fsck -f /dev/vg00/lv00

resize2fs /dev/vg00/lv00 9G					# resize ext3 fs

lvreduce /dev/vg00/lv00 -L9G					# resize logical vol

Reboot host OS

mount xen2.neoxo.com:/share /mnt/share				# mount nfs share

lvcreate -s -n backup -L9G /dev/vg00/lv00			# create lvm snapshot

mount /dev/vg00/backup /mnt/backup

tar zcvpf /mnt/share/app2-backup.tgz -directory=/mnt/backup .	# tar lv backup to nfs

On Xen host

lvcreate -n app2.swap -L2G vg0

mkswap /dev/vg0/app2.swap

lvcreate -n app2 -L9G vg0

mkfs.ext3 /dev/vg0/app2

mount /dev/vg0/app2 /mnt/app2

cd /mnt/app2

tar zxvf /share/app2.tgz

In the VM do the following

Copy /boot/* from another CentOS-4.4 VM

rename/remove /etc/sysconfig/hwconf

change entries in fstab to use scsi (sda) instead of lvm

To prepare /etc/xen config files

Copy and modify a working config, or read the Xen docs

To reboot VM automatically

Create a link to the appropriate /etc/xen/xxx.conf in /etc/xen/auto/
Categories: Uncategorized Tags:
  1. No comments yet.
  1. No trackbacks yet.