This document contains general procedure of upgrading VPS host
to the latest H-Sphere VPS 1.4-1 version.
Kernel, version 2.4.21-15.0.4.EL, patched to support VPS:
kernel-freevps-1.4 and up
You need to choose the package suitable for your platform, processors count, memory capacity kernel.
Note:
If your server hardware is not standard, you will probably also need to install the
kernel-freevps-unsupported package
(not trusted by RedHat).
The latest kernel releases
can be found in the FreeVPS download area.
FreeVPS tools:
freevps-tools-1.3-17 and up
H-Sphere VPS scripts:
hsphere-vps-1.4-1
Note:We provide the hsphere-vps package for the following OSs:
- Red Hat Linux release 7.3 with Perl v5.6.1 installed.
- Red Hat EL 3, CentOS 3.x, White Box EL 3 with Perl v5.8.0 installed.
If you need to install this package on this version of Linux's with other versions of Perl,
you need to rebuild hsphere-vps package.
To build the latest hsphere-vps scripts package, please read
Building H-Sphere VPS.
Additional Perl packages:
perl-RPM-VersionSort-1.00-1.redhat.i386.rpm
RedHat 7.3:
perl-XML-Simple-2.14-2.0.rh7.rf.noarch.rpm
RedHat EL 3 and its clones:
perl-XML-Simple-2.14-2.1.el3.rf.noarch.rpm
H-Sphere script runner:
hsphere-script-runner-1-8
Red Hat Linux release 7.3
New modutils 2.4.25-11.EL or higher:
modutils-2.4.25-11.EL
modutils-devel-2.4.25-11.EL
New SysVinit, pam, pam-devel, vixie-cron packages:
SysVinit-2.85-4
pam-0.75-51
pam-devel-0.75-51
vixie-cron-3.0.1-74
H-Sphere hsphere-sudo package:
hsphere-sudo-1.6.3p5
Red Hat EL 3, CentOS 3.x, White Box EL 3:
Upgrade Procedure
Suspend all VPS before the server reboot:
# cd /hsphere/shared/scripts
# ./vps-suspend.pl -a
Check the VPS build:
# cat /proc/vservers/setup | grep "freevps build"
You will get something like this:
freevps build 1089101812
If your freevps build is less than 1114360337, you need to update your
kernel.
Check your kernel release.
# uname -r
You will get something like this:
2.4.18-freevps-1.1-0
Find out kernel packages installed:
# rpm -qa | grep kernel
You will get, for example:
a) Red Hat Linux release 7.3:
kernel-2.4.21-3
kernel-freevps-1.1-0
b) Red Hat EL 3, CentOS 3.x, White Box EL 3::
kernel-2.4.21-4.EL
Therefore, the old kernel package to be uninstalled is
kernel-freevps-1.1-0.
However, beforehand you need to install the new kernel as described below.
Note: Uninstall old FreeVPS kernels only!
Check the H-Sphere VPS version:
# rpm -qa | grep hsphere-vps
You will see something like this:
hsphere-vps-x.xx-x
where x.xx-x is the old hsphere-vps tools/scripts version and release number.
Uninstall the old H-Sphere VPS scripts:
# rpm -e hsphere-vps-x.xx-xx
Check the FreeVPS tools version:
# rpm -qa | grep freevps-tools
freevps-tools-x.xx-x
where x.xx-x is the old freevps-tools version and release number.
Uninstall the old FreeVPS tools:
# rpm -e freevps-tools-x.xx-xx
Check the Vserver version
(skip this and the next step if you are upgrading from H-Sphere VPS 1.2 and up):
# rpm -qa | grep vserver
You will see something like this:
vserver-x.xx-x
Uninstall the Vserver tools, they are not required in new version of VPS:
# rpm -e vserver-x.xx-xx
Install the packages in the following sequence:
Note: You need to satisfy all dependences during installation.
1) (RH 7.3 only) Update modutils:
# rpm -Uvh modutils-2.4.25-11.EL.i386.rpm modutils-devel-2.4.25-11.EL.i386.rpm
2) (RH 7.3 only) Update SysVinit, pam, pam-devel, vixie-cron packages:
# rpm -Uvh SysVinit-2.85-4.i386.rpm pam-0.75-51.i386.rpm pam-devel-0.75-51.i386.rpm vixie-cron-3.0.1-74.i386.rpm
Install the new kernel package.
Note: Skip this step if you have the latest kernel release.
1) Install the new kernel package kernel-freevps-1.4-x.
2) Go to the /boot directory to check if the kernel update takes place:
# cd /boot
# ls -la
The new kernel is at least vmlinux-2.4.21-freevps-1.4.
The old one may look like:
a) Red Hat Linux release 7.3:
vmlinuz-2.4.18-3
vmlinux-2.4.18-freevps-1.1-0
b) Red Hat EL 3, CentOS 3.x, White Box EL 3:
vmlinux-2.4.21-4.EL
3) Modify the boot loader, (a) for GRUB or (b) for LILO:
(a) GRUB: Edit the /boot/grub/grub.conf configuration file:
Note: GRUB loader my automatically update it's configs. In that case you need to change default boot image.
# vi /boot/grub.conf
The file should look similar to this:
Red Hat Linux release 7.3:
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.21-freevps-1.4)
root (hd0,0)
kernel /vmlinuz-2.4.21-freevps-1.4 ro root=/dev/sda5
initrd /initrd-2.4.21-freevps-1.4.img
title Red Hat Linux (2.4.18-3)
root (hd0,0)
kernel /vmlinuz-2.4.18-3 ro root=/dev/sda5
initrd /initrd-2.4.18-3.img
Red Hat EL 3, CentOS 3.x, White Box EL 3:
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Enterprise Linux ES (2.4.21-freevps-1.4)
root (hd0,0)
kernel /vmlinuz-2.4.21-freevps-1.4 ro root=/dev/sda5
initrd /initrd-2.4.21-freevps-1.4.img
title Red Hat Enterprise Linux ES (2.4.21-4.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-4.EL ro root=/dev/sda5
initrd /initrd-2.4.21-4.EL.img
default=0 means that GRUB would take the first title record
as the boot image, i.e., our new kernel.
GRUB loader would update the kernel automatically after reboot.
(b) LILO:
Step 1: Modify the lilo.conf configuration file:
# vi /etc/lilo.conf
Copy and paste the kernel image settings lines
and change the kernel number and the label parameter.
Change the default kernel loading parameter to the new kernel label name.
Important! Do not delete the old kernel image settings! If you delete these lines and
something goes wrong with the new kernel installation, your system would not start!
After these changes, lilo.conf will look like:
Red Hat Linux release 7.3:
prompt
timeout=50
default=linux_patched
boot=/dev/sda
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear
image=/boot/vmlinuz-2.4.18-3
label=linux
initrd=/boot/initrd-2.4.18-3.img
read-only
root=/dev/sda5
image=/boot/vmlinux-2.4.21-freevps-1.4
label=linux_patched
initrd=/boot/initrd-2.4.21-freevps-1.4.img
read-only
root=/dev/sda5
Red Hat EL 3, CentOS 3.x, White Box EL 3:
prompt
timeout=50
default=linux_patched
boot=/dev/sda
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear
image=/boot/vmlinux-2.4.21-4.EL
label=linux
initrd=/boot/initrd-2.4.21-4.EL.img
read-only
root=/dev/sda5
image=/boot/vmlinux-2.4.21-freevps-1.4
label=linux_patched
initrd=/boot/initrd-2.4.21-freevps-1.4.img
read-only
root=/dev/sda5
Step 2: Type lilo to apply changes:
# lilo
You will see the following lines:
Added linux
Added linux_patched *
4) Reboot the server:
# shutdown -r now
5) Check if the kernel update takes effect:
# uname -a
If the kernel version is 2.4.21-freevps-1.4,
the kernel is updated successfully.
After the new kernel installation is complete, uninstall the old kernel
which version was defined in Step 4.
Note: You need to uninstall old FreeVPS kernels only!
For example, if kernel is kernel-freevps-1.1-0, run:
# rpm -e kernel-freevps-1.1-0
Install generic FreeVPS tools:
# rpm -ivh freevps-tools-1.3-17.i386.rpm
Install additional Perl RPMs required:
# rpm -ivh perl-RPM-VersionSort-1.00-1.redhat.i386.rpm
RedHat 7.3:
rpm -ivh perl-XML-Simple-2.14-2.0.rh7.rf.noarch.rpm
RedHat EL 3 and its clones:
rpm -ivh perl-XML-Simple-2.14-2.1.el3.rf.noarch.rpm
Install new H-Sphere VPS tools:
# rpm -ivh hsphere-vps-1.4-1.noarch.rpm
Run update script:
# cd /hsphere/shared/scripts/
# ./vps-update.pl
and follow the script instructions step by step.
Run configuration script:
# ./vps-configure.pl
and follow the script instructions
step by step.
Resume suspended VPS:
# cd /hsphere/shared/scripts
# ./vps-resume.pl <vps_name>
where <vps_name> is a suspended VPS server name.
To resume all suspended VPS servers, run:
# ./vps-resume.pl --all