H-Sphere VPS Scripts

(HS VPS version 1.2 and up)

 

Related Docs:   VPS Host Installation • FreeVPS Docs

 

Default VPS Configuration File

The default VPS configuration file is /hsphere/local/config/vserver/vps.cfg.

WARNING:
1. Do not change location of the configuration file!
2. It is strongly recommended not to make changes to the configuration file manually!

If you need to set parameters to the configuration file, run /hsphere/shared/scripts/vps-configure.pl and follow the step-by-step configuration instructions as specified in VPS Installation Guide of H-Sphere documentation.

See configuration parameters set in the VPS configuration file.

 

Other VPS Related Configuration Files

a) Template configuration files located in $HSINSTALLPKG (Default: /hsphere/local/config/vserver/<Your OS code>/):
where <Your OS code>:
RH73 - Red Hat Linux release 7.3
RHES3 - Red Hat Enterprise Linux ES release 3
RHAS3 - Red Hat Enterprise Linux AS release 3
RHWS3 - Red Hat Enterprise Linux WS release 3
WBEL3 - White Box Enterprise Linux release 3
CentOS3 - CentOS release 3

rpm_base.cfg - base and core of Linux;
rpm_development-tools.cfg - Development Tools
rpm_dns-server.cfg - DNS Name Server
rpm_ftp-server.cfg - FTP Server
rpm_kernel-vps.cfg - kernel emulator for VPS
rpm_mail-server.cfg - Mail Server
rpm_mysql-server.cfg - MySQL Database
rpm_news-server.cfg - News Server
rpm_perl-full.cfg - Perl programing language modules
rpm_pgsql-server.cfg - Postgresql SQL Database
rpm_quota.cfg - quota tools for VPS
rpm_samba-server.cfg - Windows File Server
rpm_system-tools.cfg - System Tools
rpm_web-server.cfg - Web Server

b) VPS box configuration files located in $VPSCONFIGS (Default: /hsphere/local/config/vserver/):

vps.cfg - the main configuration file for all Virtual Private Servers.
vps.cfg.bak - the main configuration file backup.
vps.cfg.default - default configuration for all Virtual Private Servers.
vps.list - the list of all known VPS and the list of Virtual Private Servers scheduled for removal.

 

VPS Scripts Location

All VPS scripts are located in the $VPSSCRIPTS directory (Default: /hsphere/shared/scripts).
Cron scripts are located in the $VPSSCRIPTS/cron (Default: /hsphere/shared/scripts/cron).

 

Perl Modules Used By VPS Scripts

Note: We provide the hsphere-vps package only for:

Red Hat Linux 7.3 with Perl 5.6.1 installed.
Red Hat Enterprise Linux release 3, CentOS 3.x, White Box Enterprise Linux release 3 with Perl 5.8.0 installed.

If you wish to install this package with other versions of Perl, you need to build your own H-Sphere VPS binaries.

Perl modules:
Red Hat Linux 7.3: Perl v5.6.1 modules are installed in [/usr/lib/perl5/site_perl/5.6.1/VServer/]
Red Hat Enterprise Linux release 3, CentOS 3.x, White Box Enterprise Linux release 3: Perl v5.8.0 modules are installed in [/usr/lib/perl5/site_perl/5.8.0/VServer]

Addon.pm
Admin.pm
Net.pm
Util.pm
Vars.pm
Vrpm.pm

 

VPS Configuration

Enter the $VPSSCRIPTS directory (Default: /hsphere/shared/scripts) to run the vps_configure.pl script.

SYNTAX:

./vps-configure.pl [-d|-r|-h]
OPTIONS:
        --defaults|-d   load default settings
        --restore|-r    restore settings you made before
        --help|-h       display this help message

Run vps_configure.pl:

# /hsphere/shared/scripts/vps-configure.pl
Do you really want to reconfigure your VPSs [y/n]?
Kernel: 2.4.21-freevps-1.2-1hugemem
FreeVPS patch build: 1080548030
Base FreeVPS tools package: freevps-tools-1.2-1
H-Sphere VPS scripts package: hsphere-vps-1.2-1
RedHat release: RH73

To perform basic configuration for all virtual servers, follow the VPS Configuration section of the H-Sphere VPS Installation guide.

 

Create VPS

To create new Virtual Private Server, run the vps-post-config.pl script:

./vps-post-config.pl VPS_HOST_NAME

And put in the following parameters to STDIN:

IP=ADDRESS:MASK:HDEV - IP to be assigned to this VPS and allowed on network interface HDEV on your VPS box;
DLIMIT=XXXX - Disk limit in Mb;
MLIMIT=XXXX - Memory Limit in Mb;
PLIMIT=XXXX - Limit on the number of running processes;
FILELIMIT=XXXX - Number of opened files limit;
TCPLIMIT=XXXX - TCP sockets limit;
ROOTPWD=**** - User root password;
CTRL+D - Press Ctrl+d to stop data input.

Example:

Create a VPS with the following configuration:

Hostname: 231.tst
IP address: 192.168.112.231, mask: 255.255.255.0
Disk limit: 3000Mb
Memory limit: 512Mb
Limit on the number of running processes: 1000
Root password: 1

[root@vps scripts]# ./vps-post-config.pl 231.tst
    IP=192.168.112.231:255.255.255.0[press Enter]
    DLIMIT=3000[press Enter]
    MLIMIT=512[press Enter]
    PLIMIT=1000[press Enter]
    ROOTPWD=1[press Enter]
    [press Ctrl+d] (end of data input)

vps-post-config.pl creates the $HSVPSFILES/231.tst/231.tst.in file (Default: /hsphere/local/config/vserver/cp/231.tst/231.tst.in) with the input parameters, and registers VPS in the list of known vservers: $VPSCONFIGS/vps.list (Default: /hsphere/local/config/vserver/vps.list)

Check the list of VPSs:

[root@vps scripts]# cat /hsphere/local/config/vserver/vps.list

You would get something like this:

DELETE=""
VSERVERS="3:231.tst"

Format:

DELETE="HOSTNAME1 HOSTNAME2 HOSTNAME3" - the list of VPSs scheduled for deletion, separated with whitespaces;
VSERVERS="CONTEXT_ID1:HOSTNAME1 CONTEXT_ID2:HOSTNAME2" - the list of known VPSs, separated with whitespaces; CONTEXT_ID is a virtual server ID

 

Migrate VPS in HS VPS 1.3-6.4

VPS migration is performed by the vps-migrate.pl script that moves VPS(s) to another host. This script uses:

  • OpenSSH client:
    • for secure copying (scp remote file copy program)
    • for executing commands on a remote machine
  • tar archiving utility.

To perform a migration, access to remote servers and logging into them automatically without entering the password each time is required from the "source" box. So, the access keys should be copied from the "source" box into the destination box. If such keys are not uploaded, the script does it for you (use the --put-ssh-key option).

Preparation:

  1. Suspend the VPS server on the "source" box.
  2. Configure the destination machine to be VPS server host:
    • Install all required packages (FreeVPS kernel, FreeVPS tools, H-Sphere VPS scripts).
    • Complete all configuration tasks.

Actions performed by the script:

  • The remote host VPS servers configuration is loaded and checked
  • Platform compatibity is checked for the VPS box and the destination host. For example, a VPS under Enterprise Linux can't be moved to a host under RedHat Linux release 7.3.
  • The script checks whether a VPS with the same name as the migrated one exists on the destination box
  • Available free disk space on the destination host VPS home partition is checked as Free_space > VPS_disk_usage*1.5
  • The script checks if the VPS server virtual context number exists on the destination box:
    • if the migrated VPS server virtual context does not exist on the destination box, the VPS is created with this context
    • if it does exist, the first free virtual context is used for the migrated VPS.
  • Network interface which all the virtual network interfaces were attached to is checked. If a network interface doesn't exist on the destination host, new one is used, and the VPS network is reconfigured to be used to assign virtual network interfaces.
  • VPS home is archived using the tar utility filtered through gzip
  • MD5SUM for the source file is compared with that of the file copied to the remote host
  • VPS traffic data is migrated to the destination box
  • Post-migration:
    • Migrated VPS server(s) are scheduled for fix and configuration restore. The configuration (virtual context creation, limits comfiguration, disk usage quota check) is restored within 3 minutes by the crpn/vps-cron-fix.pl cron
    • Migrated VPS is suspended on the destination box, and should be resumed via H-Sphere or manualy.

For help, run:

# ./vps-migrate.pl --help
vps-migrate.pl         # Moves VPS(s) to another host.
Usage:
   vps-migrate.pl --host=<host> [--user=<name>] --vps=v<ps_name>|--all [--put-ssh-key] [--help]
--host            # <host> - host (DNS name/IP address) to migrate VPS(s) to.
--user            # <name> - username to be used to log into the host.
                  # If username is not specified, the name of the user executing the script will be taken.
--vps             # <vps_name> - VPS to be migrated.
--all             # Migrate all known VPSs.
--put-ssh-key     # Generate and upload public SSH keys to remote box.
--help            # Print this help information.

 

Delete VPS

vps-delete.pl

SYNTAX:
./vps-delete.pl VPS_HOST_NAME

  1. It removes existing VPS [VPS_HOST_NAME], all its configuration files, removes [VPS_HOST_NAME] from the list of known VPS.
  2. If [VPS_HOST_NAME] is being created by cron at the moment, [vps-delete.pl] posts deletion request for VPS (sets the DELETE parameter in the vps.list file)
  3. All deletion requests are processed by vps-cron-delete.pl cron every 4 minutes.

 

VPS Cron Scripts

These are VPS scripts scheduled in cron on the host server:

*/5 * * * * /hsphere/shared/scripts/cron/vps-cron.pl >/dev/null 2>&1
59 */1 * * * /hsphere/shared/scripts/cron/vps-cron-traf.pl >/dev/null 2>&1
*/4 * * * * /hsphere/shared/scripts/cron/vps-cron-delete.pl >/dev/null 2>&1
*/3 * * * * /hsphere/shared/scripts/cron/vps-cron-fix.pl >/dev/null 2>&1

1. vps-cron.pl

The $VPSSCRIPTS/cron/vps-cron.pl script (Default: /hsphere/shared/scripts/cron/vps-cron.pl) runs every 5 minutes. It is used to install and configure new Virtual Private Servers.

The script works as follows:

  1. It checks the list of known vservers and takes each VPS and processes requested tasks from the $HSVPSFILES/VPS_NAME/VPS_NAME.in file (Default: .../cp/VPS_NAME/VPS_NAME.in).
  2. If the requested task is successfully done, it creates a note in the $HSVPSFILES/VPS_NAME/VPS_NAME.out file (Default: .../cp/VPS_NAME/VPS_NAME.out)
  3. If all of the requested tasks are done, it creates the DONE file: $HSVPSFILES/VPS_NAME/VPS_NAME.done (Default: .../cp/VPS_NAME/VPS_NAME.done), and deletes the request file: $HSVPSFILES/VPS_NAME/VPS_NAME.in (Default: .../cp/VPS_NAME/VPS_NAME.in).
  4. It creates the FLAG file: $STATCRONPID (Default: /var/log/hsphere/vps_cron.pid) with its own PID, to prevent executing another copy of it.
  5. It creates all configuration files required for VPSs: $VPSCONFIGS/VPS_NAME.conf (Default: /hsphere/local/config/vserver/VPS_NAME.conf) $VPSCONFIGS/VPS_NAME.sh (Default: /hsphere/local/config/vserver/VPS_NAME.sh)
  6. It installs basic Linux RH7.3 packages and additional packages if configured, creates services, set limits, assigns IPs, and finally, starts VPS.

2. vps-cron-traf.pl

Processes VPS network traffic statistics. Creates files with VPS daily traffic statistics: /hsphere/local/var/statistic/DD.MM.YYYY.vps.txt

3. vps-cron-delete.pl

This cron script that runs every 4 minutes deletes VPS server(s) scheduled for removing.

VPS server is scheduled for removing in case it can't be deleted immediately after the removing request was sent, e.g. when other tasks need to be finished first.

Names of the VPS servers(s) scheduled for removing are listed delimited with whitespace in the DELETE parameter of the /hsphere/local/config/vserver/vps.list configuration file.

Example:

# cat /hsphere/local/config/vserver/vps.list
DELETE="vps1.psoft vps2.psoft"
VDU=""
VSERVERS="3:230.psoft 4:vps1.psoft 5:test.test 6:vps2.psoft 7:vps4.psoft 8:vps5.psoft 9:vps6.psoft 10:vps3.psoft 11:vps7.psoft 12:vps9.psoft 13:blabla.test.tst 14:vps11.psoft 15:vps12.psoft 16:vps13.psoft 17:vps-rh73-blank.psoft 18:vps14.psoft 21:newacc.test.tst 22:jumbo.jumbo23:vps200.hs.test 24:vps203.hs.test 25:vps207.hs.test 26:vps212.hs.test 27:myvps.test 28:my-server.test 29:krambambuli.test"
 

4. ( in HS VPS 1.3-6.4) vps-cron-fix.pl

This script fixes some VPS(s) configuration: limits, usage, etc.

For instance, it can fix VPS server(s) configuration that was "lost" when you upgraded the FreeVPS kernel after the host system (physical box) reboot.

Fixed parameters:

  • VPS server virtual context recreated
  • VPS root directory (new root for the created virtual context) set
  • VPS server files context fixed
  • VPS server inside user/group quotas for all filesystems configured in /etc/fstab checked
  • VPS disk usage calculated
  • all limits restored
  • The script runs as a cron job and is configured to fix corrupted configuration every 3 minutes. The script also checks and fixes VPS servers(s) daily.

    If needed, you can run the script manually. Use --vps to fix a particular VPS and -f|--force to forcefully fix a virtual server(s) even if its(their) configuration is uncorrupted.

    IMPORTANT:
    It is recommended that you stop/suspend VPS server(s) before the fix.

    For help, run:

    # vps-cron-fix.pl --help
    vps-cron-fix.pl         # Script for checking and fixing VPS(s) configuration: limits, usage, etc.
                            # The script is configured to check (and to fix if needed) VPS(s) configuration every 3 minutes (run as a cron job).
                            # VPS(s) are fixed daily anyway.
    Usage:
       vps-cron-fix.pl [--vps=<name>|-v <name>] [--force|-f]
    -v|--vps    # Fixes particular VPS.
                # If not set - script will fix all known VPS servers.
    -f|--force  # Run script by force (even if it was run today already).
    --help      # Print this help information.

     

    VPS Configuration Scripts

    1) ./vps-addip.pl VPS_HOST_NAME IP:MASK
    Assigns new IP address to the VPS_HOST_NAME virtual server.

    2) ./vps-rmip.pl VPS_HOST_NAME IP[:MASK]
    Removes IP from VPS_HOST_NAME.

    3) ./vps-dlimit-set VPS_HOST_NAME DISK_LIMIT_VALUE
    Sets disk usage limit for VPS_HOST_NAME to DISK_LIMIT_VALUE, in Mb.

    4) ./vps-dlimit-get VPS_HOST_NAME
    Returns disk limit and disk usage for VPS_HOST_NAME.

    5) ./vps-mlimit-set VPS_HOST_NAME MEMORY_LIMIT_VALUE
    Sets memory limit for the VPS_HOST_NAME server to MEMORY_LIMIT_VALUE, in Mb

    6) ./vps-mlimit-get VPS_HOST_NAME
    Returns memory limit and memory usage for VPS_HOST_NAME

    7) ./vps-plimit-set VPS_HOST_NAME PROCESS_LIMIT_VALUE
    Sets limit on the number of processes running on VPS_HOST_NAME to PROCESS_LIMIT_VALUE, in Mb

    8) ./vps-plimit-get VPS_HOST_NAME
    Returns the limit on and the number of processes running on VPS_HOST_NAME

    9) ./vps-flimit-get VPS_HOST_NAME
    Returns file handlers limit, and the number of opened at this moment files VPS_HOST_NAME

    10) ./vps-flimit-set VPS_HOST_NAME
    Sets file handlers limit for VPS_HOST_NAME

    11) ./vps-tcplimit-get VPS_HOST_NAME
    Returns the limit on socket connections and the number of established connections for VPS VPS_HOST_NAME

    12) ./vps-tcplimit-set VPS_HOST_NAME
    Sets limit for established socket connections for VPS VPS_HOST_NAME

    13) ./vps-dev-speed.pl
    Tools to get|set the speed of virtual network interface.
    Note: Virtual network interface speed must be divisible by 64000.
    Usage: vps-eth-speed.pl VPS_NAME [--dev=<device>|-d <device>] --get|--set <SPEED>
    For more information, please run: vps-dev-speed.pl --help

    14) ./vps-dev-speed-set VPS_NAME [--dev=<device>|-d <device>] <SPEED>
    Sets work speed to <SPEED> Kb/sec for virtual network interface <device> on Virtual Private Server VPS_NAME
    Note: Virtual network interface speed (<SPEED> value) must be divisible by 64000.
    Note: If --dev=<device>|-d <device> option not specified, <SPEED> value will be set to all registered virtual network interfaces on VPS VPS_NAME

    15) ./vps-dev-speed-get VPS_NAME [--dev=<device>|-d <device>]
    Returns work speed for virtual network interface <device> on Virtual Private Server VPS_NAME
    Note: If --dev=<device>|-d <device> option not specified, returns speed for all virtual network interfaces registered on VPS VPS_NAME, in the following format:

    VDEV0 SPEED0
    VDEV1 SPEED1
    ...

    16) ./vps-start.pl [VPS_HOST_NAME | [-a|--all]]
    Turns on VPS_HOST_NAME, or all known stopped VPS servers if the -a|--all option is specified.

    17) ./vps-stop.pl [VPS_HOST_NAME | [-a|--all]]
    Turns off VPS_HOST_NAME, or all known running VPS servers if the -a|--all option is specified.

    18) ./vps-suspend.pl [VPS_HOST_NAME | [-a|--all]]
    Suspends (turns off and sets ONBOOT=no) vserver [VPS_HOST_NAME], or all known VPS servers if the -a|--all option is specified.

    19) ./vps-resume.pl [VPS_HOST_NAME | [-a|--all]]
    Resumes (turns on and sets ONBOOT=yes) vserver [VPS_HOST_NAME], or all known VPS servers if the -a|--all option is specified.

    20) ./vps-rootpwd.pl VPS_HOST_NAME
    To set new password for user root, send it to STDIN.

    21) ./vps-du.pl
    Returns disk usage for all known VPSs on the host server in the format required by H-Sphere Control Panel.

    22) ./vps-get-config.pl VPS_HOST_NAME
    Returns all VPS configuration parameters in the format required by H-Sphere Control Panel.

     

    View Installed VPS List

    The ./vps-list.pl script returns brief information about all VPS installed on the host server, installed VPS packages, values of configuration variables.

    Example:

    # ./vps-list.pl
    Kernel release: 2.4.21-freevps-1.3-22smp
    FreeVPS kernel patch build: 0
    FreeVPS tools release: 1.3-9
    H-Sphere VPS release: 1.3-6.4
    Linux release: CentOS release 3.3 (final) [CentOS3]
    Free disk space on VPS home [/home/hsphere/local/vservers]: 9346 Mb
    Virtual Private Servers found on the host:
    ----------------------------------------------------------------------------------------------------------------------------
    ID NAME                  STATUS VDEV:HDEV:IP/MASK+|-(UP|DOWN) DISK (Mb)     MEMORY (Mb) SWAP   PROCESSES CPU (%)    TRAFFIC
    -----------------------------------------------------------------------------------------(Mb)------------s--h--used-----(Mb)
    5  vps1.psoft              run. eth0:eth0:10.0.0.2/24-        0     1707.6  0    0.8    0.5    0    5    0  0  0    0.0
    6  vps2.psoft              run. eth0:eth0:160.79.224.138/24+  0     425.0   0    2.2    1.4    0    8    0  0  0    0.0
    ----------------------------------------------------------------------------------------------------------------------------
    Display all settings for VPSs on this host [y/n]? 

     

    Install Additional Packages

    To install additional packages on existing VPS, use the vps-pkg-inst.pl script. It installs package/lists of packages to the VPS you specified or to all known VPS on the host.

    Run # ./vps-pkg-inst.pl -h to get help on the script options:

    vps-pkg-inst.pl - tools to install package(s) on Virtual Private Server(s)
      usage: vps-pkg-inst.pl VPS_NAME|--all|-a OPTIONS
            [VPS_NAME]      Virtual Private Server name to install package(s)
            --all|-a        install package(s) to all known VPSs
      OPTIONS:
            --package=<package_name>|-p <package_name>
            Install package. Full path to the package required.
            --template=<template>|-t <template>
            Install package(s) included to the <template>.
    

    The first script argument is the VPS name. If -a (or --all) option is specified, the installation will be performed to all known VPSs.

    Options:

    1. --package=<package_name>
      -p <package_name>
      - installs RPM package <package_name>. Full path to <package_name> is required.

      Example:

      --package=/pub/RedHat/7.3/RedHat/RPMS/mc-4.5.55-5.i386.rpm
      -p /pub/RedHat/7.3/RedHat/RPMS/mc-4.5.55-5.i386.rpm
    2. --template=<mytemplate>
      -t <mytemplate>
      - installs package(s) included to <mytemplate>. The rpm_<mytemplate>.cfg file must be located in the VPSCONFIGS/OS_TYPE directory, where VPSCONFIGS is by default /hsphere/local/config/vserver/,and OS_TYPE is:

      • RH73 for Red Hat 7.3;
      • RHAS3 for Red Hat AS 3;
      • RHES3 for Red Hat ES 3;
      • RHWS3 for Red Hat WS 3;
      • WBEL3 for White Box EL 3
      • CentOS3 for CentOS 3.x

      Example:

      # ls -la /hsphere/local/config/vserver/RH73/rpm_php.cfg
      -rw-r--r-- 1 root root 126 /hsphere/local/config/vserver/RH73/rpm_php.cfg

    Examples:

    1. # cd /hsphere/shared/scripts
      # ./vps-pkg-inst.pl 241.tst -l php    (# ./vps-pkg-inst.pl 241.tst --list=php)
      Preparing...                ########################################### [100%]
         1:php                    ########################################### [ 20%]
         2:php-devel              ########################################### [ 40%]
         3:php-imap               ########################################### [ 60%]
         4:php-ldap               ########################################### [ 80%]
         5:php-odbc               ########################################### [100%]
      
    2. # ./vps-pkg-inst.pl -a --package=/RPMS/mc-4.5.55-5.i386.rpm
      Installing packages to all known Virtual Private Servers...
      Installing on [231.tst]...
      Preparing...                ########################################### [100%]
         1:mc                     ########################################### [100%]
      [OK] installation successful
      Installing on [232.tst]...
      Preparing...                ########################################### [100%]
      package mc-4.5.55-5 is already installed
      [ERROR] installation failed.
      

     

    Check VPS Files For Changes in HS VPS 1.3-6.4

    This action is performed by the vps-files-md5-check.pl script. It compares info of the package installed files with that of the package metadata stored in the rpm database. Parameters compared are size, MD5 sum, permissions, type, owner, and group of each file.

    The --verify option of the RPM Package Manager is used. For reference, please turn to the rpm manual.

    Example of usage: Say, the file info has been changed as a result of the box hacking. The script checks the file inside VPS for changes and proposes to copy this file from the host system.

    WARNING:
    We strongly recommend not to overwrite non-binary files, e.g. configs. This may cause the system malfunction.
    Before copying, find out which files have been changed by running the script with the listing options.

    For help info, run:

    # vps-files-md5-check.pl --help
    vps-files-md5-check.pl          # Check installed files information for changes.
    Usage:
       vps-files-md5-check.pl --vps=<vps_name>|--root=<directory> [--list|--list-all [--detailed]] [--copy-all]
    --vps           # <vps_name> - VPS name to check.
    --root          # <directory> - new root directory to check (packages must be installed with the --root option).
    --list          # List changed files.
    --list-all      # List all changed files (config, license, readme, doc, ghost file, etc.).
    --detailed      # Show file changes.
    --copy-all      # Do not ask to copy modified file from the host.
    --help          #Print this help information.

    Example:

    # ./vps-files-md5-check.pl --vps=vps4.psoft --list-all --detailed
    S.5....T c /etc/pam.d/system-auth
       %config configuration file.
           file Size differs
           MD5 sum differs
           mTime differs
    .......T c /etc/inittab
       %config configuration file.
           mTime differs
    .......T c /etc/mail/sendmail.cf
       %config configuration file.
           mTime differs
    .......T c /etc/krb5.conf
       %config configuration file.
           mTime differs
    S.5....T c /etc/sysconfig/rhn/up2date-uuid
       %config configuration file.
           file Size differs
           MD5 sum differs
           mTime differs

    In the above example, there are no files to overwrite because all of them are %config configuration files.

    In the next example we are changing /bin/true binary:

    # ./vps-files-md5-check.pl --vps=vps4.psoft --list-all --detailed
    <...>
    ..5....T   /bin/true
           MD5 sum differs
           mTime differs
    <...>

    The script shows that MD5 sum for rpm database differs from that of the binary file. To copy the file from the host, run:

    # ./vps-files-md5-check.pl --vps=vps4.psoft
    Would you like to copy /bin/true from the host [y/n]? y

     

    IP Migration Tool in HS VPS 1.3-6.6

    vps-ip-migrate.pl is used to change VPS servers IP addresses (the process is called IP migration).

    For help, run:

    # ./vps-ip-migrate.pl --help
    vps-ip-migrate.pl   # VPS server IP migration script.
    Usage:
       vps-ip-migrate.pl --vps=<vps_name>|--all --xml=<xml_ip_map> [--help]
    --vps       # <vps_name> - VPS server name to perform IP migration
    --all       # perform IP migration for all registered VPS servers
    --xml       # <xml_ip_map> - XML structured IP map migration file
    --help      # Print this help information.

    Example:

    vps-ip-migrate.pl --vps=vps.test --xml=ip_map.xml
       # Perform IP migration for vps.test according to the ip_map.xml IP map file
    vps-ip-migrate.pl --all --xml=ip_map.xml
       # Perform IP migration for all registered in the host VPS servers according to the ip_map.xml IP map file

    Options:

    • --all - when it's used, IPs will be changed for all Virtual Servers registered in the host (physical machine)
    • --vps=<vps_name> - used for IP change/migration on a single <vps_name> VPS
    • --xml=<xml_ip_map> - full name of structured IP migration map xml file

    When calling the script, it's mandatory to use --all or --vps option.

    IMPORTANT!
    This script doesn't make any changes to H-Sphere cluster. It physicaly changes IP(s) created ONLY inside VPS server(s).
    Read on IP migration (changing IPs) for the H-Sphere cluster.

    Related Docs:   VPS Host Installation • FreeVPS Docs







    Home   Products   Services   News
    © Copyright. . PSOFT. All Rights Reserved. Terms | Site Map