Sunday, 6 September 2009

Working with Megaregions

3) Using the Diva Distribution

Now OpenSim 0.66 is running successfully on CentOS 5.3 on two servers the next step for me was to investigate megaregions on our test server. Note this is in many ways developmental code and should not be used on a production server.

The simplest way turned out to be to download the Diva distribution, which is preconfigured for hypergrided standalones. Four adjacent 256x256 regions are combined to form a 512x512 hypergrid.

In order for this to work I asked our network team leader to open ports 9000 to 9010 on the ISA firewall to incoming and outgoing UDP traffic.

Login as user opensim and download the distribution zip file into the opensim users home directory using the lynx browser:


Unzip the distribution and change to the config-include subdirectory:

cd diva-r10708/bin/config-include/

The config-include subdirectory contains some configuration files that are included with the settings from OpenSim.ini when the simulator is started.

Before going any further it is a good idea to create a new database to use with megaregions. The default database name pre-configured into the diva distribution is opensim, but I had already used that so created a new database called simtest. I can still use the opensim user account to access this database as it has appropriate privileges.

Note: Diva/Crista kindly commented on this blog and said:

"It would be great if you could make it more clear that people don't necessarily need to change the name of the DB schema, just that in your case you wanted to use a different one from the default."

Because I was using a database other than the default of opensim it was necessary to edit the file MyWorld.ini.example to change the name of the database to use with megaregions to simtest in all 3 instances e.g.

[opensim@standbyvle config-include]$ cat MyWorld.ini.example
; ### Set the password
storage_connection_string="Data Source=localhost;Database=simtest;User ID=opensim;Password=***;";

The User ID and Password fields can be left unchanged as the Password field will be populated when the Configure command is run in a minute. Amongst other things this takes the contents of MyWorld.ini.example and generates MyWorld.ini from it.

It is also necessary to change the IP addresses at the bottom of the MyWorld.ini.example file to the external IP's of the server:

http_listener_port = 9000
; # If you want to be able to Hypergrid around, you need to have an IP address
; # or domain name reacheable from the outside.
; # Change these to that IP address or domain name mapped to this machine
; # Leave the same port 9000
user_server_url = ""
asset_server_url = ""
inventory_server_url = ""
grid_server_url = ""

Now run the configure command from the bin directory:

cd ..
mono Configure.exe

This will ask for various things such as the database password, the master avatar account password and internal ( & external ( IP address settings.

It is also necessary to edit the following files:

1) Regions/RegionConfig.ini - check the External IP addresses are correct for each region
2) OpenSim.ini - check the GridInfo section including the Login URI and other settings are correct

It is now possible to start the simulator:

mono OpenSim.exe

Using the Hippo client it is now possible to get the new grid information from and login using the Master Avatar account.

I now have a seamless 512x512 sim :)

1) Updating the installation

To update the installation I simply logged on as user opensim and ran the update script from the bin directory of the existing diva installation as shown below:

[opensim@standbyvle bin]$ mono Update.exe
Using download link
Your current release is diva-r10708. Available release is diva-r11056
New release available. Updating...
Downloading new release from to /tmp/ This may take a few minutes.
Extracting new release to /home/opensim
Migrating previous configuration data
Your installation has been updated. The new release is in >> /home/opensim/diva-r11056 <<
Your regions have been migrated.
If you made changes to OpenSim.ini, please copy that file over or change the new one.

[opensim@standbyvle ~]$ cd
[opensim@standbyvle ~]$ cp diva-r10708/bin/OpenSim.ini diva-r11056/bin
[opensim@standbyvle ~]$ cd diva-r11056/bin
[opensim@standbyvle ~]$ mono 0penSim.exe

It works :D

2) Megaregion Stability

Megaregions are very much under development, so its important to keep avatars away from the very edge of a megaregion as otherwise the simulator may crash.

Return to Menu

No comments:

Post a Comment