This document explains how to migrate a pool of IPs on H-Sphere winbox,
including physical server IPs, logical server IPs, and user dedicated IPs.
It is important that H-Sphere winbox software is working correctly
at the time of migration.
Step 1. Bind Target IPs on the Winbox
Make sure all the target IPs are up. If they aren't you can either bind
them manually or use the following steps:
- Create a file named, for instance, target_ips.txt
with the list of IPs and masks to bind, as follows:
Run the IpCreator utility:
IpCreator.exe target_ips.txt > log.txt
Step 2. Add Double Bindings on IIS
On this step, we'll duplicate IP bindings for virtual web hosts on IIS to
use old and new IP bindings simultaneously, which will help us avoid
DNS propagation downtime.
- Create a file named, for instance, ip_map.txt
with space separated old and new IP correspondences, according to the following format:
<old IP1> <new IP1>
<old IP2> <new IP2>
<old IPn> <new IPn>
Run the IpMigrator utility:
ipmigrator.exe ip_map.txt > ipmigrator.log
Note: IpMigrator inserts new bindings AFTER the corresponding old bindings
in the IIS metabase. H-Sphere uses the first binding to obtain virtual web host
name and IP, which means, while the old bindings exist in the bindings list,
H-Sphere will manage resources with the old IP. For instance, H-Sphere will add host
aliases to the old IP's. Thus it is strongly recommended to remove old IP bindings
as soon as they aren't needed.
Step 3. Create Migration XML
Create file ipmigration.xml of the following format and put it on the CP server:
<!DOCTYPE ipmigrate [
<!ELEMENT ips (ip+)>
<!ATTLIST ip name CDATA #REQUIRED>
<!ATTLIST ip new_ip CDATA #REQUIRED>
<!ATTLIST ip new_mask CDATA "255.255.252.0">
<ip name="126.96.36.199" new_ip="188.8.131.52" />
You can find more information on ipmigration.xml in
Changing IPs For The H-Sphere Cluster.
Step 4. Run The Migration
- Stop H-Sphere
Execute the following commands one by one on the CP server.
Replace <LS_ID> with the ID of the Winbox logical server.
To find out the ID of the logical server, go to E.Manager -> L.Servers
in H-Sphere admin panel.
java -Xms64M -Xmx512M psoft.hsphere.tools.IPMigratorFast --ip-change --lServerIds=<LS_ID> ipmigration.xml
java -Xms64M -Xmx512M psoft.hsphere.tools.IPMigratorFast --recreate-zone --lServerIds=<LS_ID> ipmigration.xml
java -Xms64M -Xmx512M psoft.hsphere.tools.IPMigratorFast --service-zone --lServerIds=<LS_ID> ipmigration.xml
java -Xms64M -Xmx512M psoft.hsphere.tools.IPMigratorFast --custom-rec --lServerIds=<LS_ID> ipmigration.xml
- Start H-Sphere
Step 5. Remove Old IP Bindings on IIS
At this point in time, you have duplicate bindings of new and old IPs.
It is recommended that you remove old IP bindings as soon as DNS servers across the world
refresh themselves (usually in no more than 2 days).
Run IpChange utility:
ipchange.exe ip_map.txt > ipchange.log
- Restart H-Sphere