H-Sphere Sysadmin Guide

Upgrading H-Sphere VPS Host
(HS VPS version 1.2-2)

 

Related Docs:  

VPS Host Installation FreeVPS Documentation

This document contains general procedure of upgrading VPS host to the latest H-Sphere VPS 1.2-2 version.

If you are upgrading from H-Sphere VPS 1.2-1, please follow the much simpler upgrade procedure.

To check what H-Sphere VPS version is installed, run under root:
# rpm -qa hsphere-vps

IMPORTANT:
• H-Sphere VPS requires correct FreeVPS kernel and FreeVPS tools to be installed. Otherwise, it will not work;
• To update H-Sphere VPS packages, DO NOT use the rpm -U command. Instead, uninstall the old packages and then install the new ones with the rpm -i command.

 

Required Packages

The following packages should be installed:

  • Kernel, version 2.4.21-9.0.1.EL, patched to support VPS:
    kernel-freevps-1.2-x package.

    You need to choose suitable for your platform, processors count, memory capacity kernel.
    Note: For servers with RAM 1GB and more, we recommend to install the kernel-freevps-hugemem package (supports up to 64 GB of memory). 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.2-x

  • H-Sphere VPS scripts:
    hsphere-vps-1.2-2

    Note:We provide hsphere-vps package only for:
    Red Hat Linux release 7.3 with Perl v5.6.1 installed.
    Red Hat Enterprise Linux release 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 latest hsphere-vps scripts package , please read building hsphere-vps scripts binaries.

  • H-Sphere hsphere-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 Enterprise Linux release 3

    • H-Sphere hsphere-sudo package:
      hsphere-sudo-1.6.7p5-0

     

    Upgrade Procedure

    1. Suspend all VPS before the server reboot:
      # cd /hsphere/shared/scripts
      # ./vps-suspend.pl -a

    2. Download the packages and put them into a separate directory, for example, to /root/inst:

      Red Hat Linux release 7.3:

      Kernel packages are available here: http://www.freevps.com/download/rpms/RH_73

      # wget http://www.freevps.com/download/rpms/RH_73/modutils-2.4.25-11.EL.i386.rpm
      # wget http://www.freevps.com/download/rpms/RH_73/modutils-devel-2.4.25-11.EL.i386.rpm
      # wget http://www.freevps.com/download/rpms/RH_73/SysVinit-2.85-4.i386.rpm
      # wget http://www.freevps.com/download/rpms/RH_73/pam-0.75-51.i386.rpm
      # wget http://www.freevps.com/download/rpms/RH_73/pam-devel-0.75-51.i386.rpm
      # wget http://www.freevps.com/download/rpms/RH_73/vixie-cron-3.0.1-74.i386.rpm
      # wget http://www.psoft.net/shiv/HS/VPS/RH73/freevps-tools-1.2-1.i386.rpm
      # wget http://www.psoft.net/shiv/HS/VPS/RH73/hsphere-vps-1.2-2.i386.rpm
      # wget http://psoft.net/shiv/HS/RH73/hsphere-script-runner-1-8.rpm
      # wget http://psoft.net/shiv/HS/RH73/hsphere-sudo-1.6.3p5.rpm

      Red Hat Enterprise Linux ES release 3

      Kernel packages are available here: http://www.freevps.com/download/rpms/RH_EL

      # wget http://www.psoft.net/shiv/HS/VPS/RHEL/freevps-tools-1.2-1.i386.rpm
      # wget http://www.psoft.net/shiv/HS/VPS/RHEL/hsphere-vps-1.2-2.i386.rpm
      # wget http://psoft.net/shiv/HS/RHES3/hsphere-script-runner-1-8.rpm
      # wget http://psoft.net/shiv/HS/RHES3/hsphere-sudo-1.6.7p5-0.rpm
    3. Check the VPS build:
      # cat /proc/vservers/setup | grep "vserver build"
      You will get something like this:
      vserver build 1069944738
      If your vserver build is less than the required 1081688192, you need to update your kernel.

    4. Check your kernel release.

      # uname -r

      You will get something like this (for example):

      2.4.18-freevps-1.1-0

      Find out kernel packages installed:

      # rpm -qa | grep kernel

      You will get, for example:

      Red Hat Linux release 7.3:
      kernel-2.4.18-3
      kernel-freevps-1.1-0
      Red Hat Enterprise Linux release 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 specified in the next step.
      Note: You need to uninstall old FreeVPS kernels only!

    5. Check the H-Sphere VPS scripts 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.

    6. Uninstall the old H-Sphere VPS scripts:
      # rpm -e hsphere-vps-x.xx-xx

    7. Check the FreeVPS tools version:
      # rpm -qa | grep freevps-tools

      You will see something like this:
      freevps-tools-x.xx-x

      where x.xx-x is the old freevps-tools version and release number.

    8. Uninstall the old FreeVPS tools:
      # rpm -e freevps-tools-x.xx-xx

    9. Check the Vserver tools version:
      # rpm -qa | grep vserver

      You will see something like this:
      vserver-x.xx-x

    10. Uninstall the Vserver tools, they are not required in new version of VPS:
      # rpm -e vserver-x.xx-xx

    11. 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

    12. 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.2-x.

      2) Go to the /boot directory to check if the kernel update takes place:

      # cd /boot
      # ls -la

      The new kernel is vmlinux-2.4.21-freevps-1.2-2.
      The old one would look like:
      Red Hat Linux release 7.3:
      vmlinuz-2.4.18-3
      vmlinux-2.4.18-freevps-1.1-0
      Red Hat Enterprise Linux release 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 like 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.2-2)
                    root (hd0,0)
                    kernel /vmlinuz-2.4.21-freevps-1.2-2 ro root=/dev/sda5
                    initrd /initrd-2.4.21-freevps-1.2-2.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 Enterprise Linux release 3:

      default=0
      timeout=10
      splashimage=(hd0,0)/grub/splash.xpm.gz
      title Red Hat Enterprise Linux ES (2.4.21-freevps-1.2-2)
                    root (hd0,0)
                    kernel /vmlinuz-2.4.21-freevps-1.2-2 ro root=/dev/sda5
                    initrd /initrd-2.4.21-freevps-1.2-2.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 would 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.2-2
              label=linux_patched
              initrd=/boot/initrd-2.4.21-freevps-1.2-2.img
              read-only
              root=/dev/sda5
      

      Red Hat Enterprise Linux release 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.2-2
              label=linux_patched
              initrd=/boot/initrd-2.4.21-freevps-1.2-2.img
              read-only
              root=/dev/sda5
      

      Step 2: Type lilo to apply changes:
      # lilo
      You will see the line:
      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.2-2, the kernel is updated successfully.

    13. 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

    14. Install generic FreeVPS tools:
      # rpm -ivh freevps-tools-1.2-1.i386.rpm

    15. Install new H-Sphere VPS tools:
      # rpm -ivh hsphere-vps-1.2-2.i386.rpm --replacefiles
      Note: Install the package with --replacefiles option!

    16. Run update script:
      # cd /hsphere/shared/scripts/
      # ./vps-update.pl

      and follow the script instructions step by step.

    17. Run configuration script:
      # ./vps-configure.pl
      and follow the script instructions step by step.

    18. 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

     


Related Docs:  

VPS Host Installation FreeVPS Documentation



© Copyright 1998-2004. Positive Software Corporation.
All rights reserved.