Migration of Openvue to a New Server

These notes are to document the steps taken to migrate an existing OpenSim grid (Openvue) to a new Windows server.

There are basically two mechanisms:

  1. Via a SQL transfer (mysqldump and load) which is the method documented here.
  2. Via OpenSim Archives (OARs), Inventory Archives (IARs) and a new setup creating users using existing avatar UUIDs. This mechanism gives a fresh setup, but does lose some elements such as group information.

On Previous Server

  1. Ensure that no viewers are running, shut down the Robust.exe and any OpenSim.exe servers.
  2. Use the SQL Editor tools to tidy up where you can. I usually remove all map tiles using:
    DELETE FROM opensim.assets WHERE name LIKE "terrainImage_%";
  3. Create a MySQL dump which is a set of SQL commands to replicate the contents of a database using
    mysqldump -u <user> -p <databasename> --hex-blob > dumpfilename.sql
  4. The --hex-dump parameter is useful to ensure that all “blob” data is transferred accurately, though it can double the dump file size (the mysqldump SQL file is 4GB for the current Openvue database).

On New Server – MySQL Setup

  1. Install MySQL, giving root a secure password and creating an extra user to be used for access to the “opensim” database.
  2. Modify the MySQL C:\ProgramData\MySQL\MySQL Server 5.7\my.ini file to add these two essential changes to accommodate large assets and “blobs” that represent their contents:
    • max_allowed_packet=4M change to max_allowed_packet=16M
      (note that OSGrid reports its largest asset is 45M)
    • innodb_log_file_size=45M to innodb_log_file_size=2G
      (for large blob loading from dump)
  3. Put the MySQL binaries directory into your Windows path. E.g.
    C:\Program Files\MySQL\MySQL Server 5.7\bin
  4. In Windows Firewall, ensure that the settings for MySQL57 allow both Private and Public access, if you wish to attach OpenSim.exe region servers that are not on the same server as the database.
  5. Load the dumped SQL from the previous server to the new server, carefully watching for any errors…
    mysql -u <user> -p <databasename> < dumpfilename.sql
  6. If there are any errors, note the line number(s).
  7. If you need to examine the very large SQL dump file to work out the issue(s) use an editor such as Glogg.

On New Server – DNS Name and Firewall

You also need to ensure that the server has a stable external DNS name, and that this can be reached through any outer firewall on ports to be used by Robust (e.g., 8002) and OpenSim.exe (e.g., 9000-…). Note that 8003 (the private OpenSim server-to-server port) and 3306 (the usual MySQL port) need NOT be open beyond your own subnet (assuming all region OpenSim.exe servers are on the same subnet).

On New Server – OpenSim Setup

  1. Install a suitable Visual Studio/.NET 4.0 compatible compiler. Microsoft Visual Studio Community Edition is suitable and provides all that is needed.
  2. For use in Diva Wifi localisation, put the binaries directory where a copy of ResGen.exe exists into your Windows path. E.g.
    C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin
  3. Download the usual latest version of OpenSim from
    http://opensimulator.org/viewgit/?a=shortlog&p=opensim.
    Unzip that to a temporary directory.
  4. It is possible to tell if the latest source version of OpenSim will compile successfully by checking “OpenSimulator Jenkins“. http://jenkins.opensimulator.org/job/opensim/ shows each automated build and whether it was successful (green) or failed (red).
  5. Download the latest Diva Wifi addon module from
    https://github.com/diva/diva-distribution/, extract from that just the “addon-modules” directory and put that in the top level of the OpenSim distribution extracted above.
  6. cd to the temporary directory.
  7. runprebuild.bat
  8. compile.bat
  9. cd addon-modules\21Wifi\Localization
  10. make_languages.bat
  11. Use only the bin directory from the resulting directory contents as a basis for the OpenSim setup. Copy to your usual run time directory (e.g. D:\VW\OpenSim).
  12. Copy in the appropriate configuration files for Robust.HG.ini, OpenSim.ini, GridCommon.ini and Wifi.ini (handling different Robust and OpenSim version in our setup).

On Associated Web Server

Currently the OpenSim “economy helper” is not provided in OpenSim core or in a simple addon module. It is provided typically by a set of simple PHP scripts run on an external web server which can access your MySQL database (in our case running on the same subnet as the MySQL server).

Details can be found at
http://opensim-users.2152040.n2.nabble.com/Buying-and-Selling-Land-What-module-is-needed-td7578626.html#a7578657 [local copy]

The landtool.php file typically used can be found, for example, at http://pastebin.com/atAmukt2. Remember to amend the configuration variables in the .php file and place it in an area that can be served by a PHP-capable web server. The URL for this is used in OpenSim configuration files as the economy helper.

This entry was posted in OpenSim, Virtual World and tagged , , , , , , . Bookmark the permalink.