Site Tools

en:vm_server

Installing and configuring an RC server on a VM

Work in progress/Page under construction!!

I created this page to serve as a tutorial about installing an vm server locally..

Even if the “ideal” will remain going to the use of Spofu, it is still good to have a local alternative offline.

And even then if everything does not work perfectly, then at least “ca” can do test without having to compile , config and “lose Neuron” on the config server… as long as it not will purge error warnings and other tricks that can make this hellish.

See also installer_vm_basic for the start of the installation. ←- Do not exist!!

The following has been transferred from another “work in progress” tutorial. Do not hesitate to rework everything in order to detail:

  1. how to prepare a VM with the game server.
  2. how to retrieve an already made VM and use it to do tests.

Yannk: I am trying(here) to compile the information i have on how to install a “Ryzom Core test VM” on a host system. All this from mails and notes i have been keeping during installations made by Others. All this remains highly theoretical for me, and all of it require to be tested/validated.
The tricky part to it is setting up the network connection, because by doing(what is shown below), an configuration used for other VM's must be cleared.

It still lacks the part of server maintenance of the “Ryzom Core” on a VM(personal note: maintenance_server_RC_et_VM.txt).

On the server we have the directory /home/khaganat/VM which contains the file kh-dev.ova. This is a VM configured for VirtualBox(the selected virtualization system) containing a functional Ryzom Core server. This is the established data to install for an fully functional virtual server.

What? Or perhaps? Does this VM still exist? Is it up-to-date with our current server?

zatalyz 2016/11/29 13:23

VirtualBox

This requires a recent version of Virtualbox, this VM is based on 4.2.12, but what counts are the guest-additions on the vm that are 4.1.18(stable Debian), so it at least needs this version.

Interface vboxnet0

This is the Network interface that the VM will attempt to use. To create this interface, this theoretical solution should work:

$ VBoxManage hostonlyif create
$ VBoxManage hostonlyif ipconfig vboxnet0 --ip 192.168.56.1
$ VBoxManage dhcpserver add --ifname vboxnet0 --ip 192.168.56.100 --netmask 255.255.255.0 --lowerip 192.168.56.101 --upperip 192.168.56.254
$ VoxManage dhcpserver modify --ifname vboxnet0 --enable

Meaning of commands:

  • Line 1: adding the “vboxnet0” interface
  • Line 2: configuration of the interface vboxnet0(ip)
  • Line 3: added DHCP guest-side config
  • Line 4: guest dhcp server activation

In case it creates a vboxnet1 interface at the first statement, it is then necessary to erase a remainder of another vboxnet(or at least to verify what it is). If the deletion is retained, it is enough to do:

 $ VBoxManage hostonlyif remove vboxnet0 

then:

$ VBoxManage hostonlyif remove vboxnet1

Then, again:

$ VBoxManage hostonlyif create

And then:

Interface 'vboxnet0' was successfully created

One then connects with the other controls(lines 2 to 4).

IF one obtains:
VBoxManage:error:DHCP server already exists to command three, then it is the dpu that does a remainder of an already existing DHCP server. To check(in case) if an erasure is possible, do:
$ VBoxManage dhcpserver remove –ifname vboxnet0 Then retype commands “3 and 4” over again.

To verify that everything works, type:
$ ifconfig
and one must obtain from the results:

vboxnet0 Link encap:Ethernet HWaddr 0a:00:27:00:00:00
\\ inet adr:192.168.56.1 Bcast:192.168.56.255 Masque:255.255.255.0

Installing the VM

To import the VM command line, type:

$ VBoxManage import kh-dev.ova --dry-run

To view import options, change the following:

  • Keep the same name(more convenient for orders):
 - vsys 0 --vmname "kh-dev"
  • Indicate allocated memory, 2 GB is fine, but it may still tho be possible to run with 1024 MB(and perhaps 512 MB?):
 - memory 2048
  • Indicate the path of the final disk image to be extracted:
--unit 17 --disk path=/home/khaganat/vm/kh-dev.vmdk

* Accept the license [mandatory]

--eula accept

In the end:

$ VBoxManage import kh-dev.ova --vsys 0 --vmname "kh-dev" --memory 2048 --unit 17 --disk path=/home/khaganat/vm/kh-dev.vmdk --eula accept

Launching the VM

The status of the VM can be checked with a:

 $ VBoxManage showvminfo "kh-dev" | Grep "^ State"

And to start the VM if it is off:

 $ VBoxManage startvm "kh-dev" --type headless

One can connect locally with:

 $ ssh login_connection@192.168.56.101

The VM can be stopped:

 $ VBoxManage controlvm "kh-dev" acpipowerbutton

And even do it savagely if nothing wants to obey(be careful, it's equivalent to snatch the plug):

 $ VBoxManage controlvm "kh-dev" poweroff

The VM(as it is) is not particularly secure. The used services are: ssh only + apache2/mysql + services Ryzom Core when they are launched(for shard commands, see: the dedicated tutorial). The connection identifier is an “sudo'er”.

Using the VM

We connect to the server(hosting the VM) and then type(if the ports have not been remapped differently, in which case we may have a timeout in response):

$ ssh identifiant_de_connexion@192.168.56.101 -p 22

Then, when connected.. you enter the password. We are now then on the server where “Ryzom Core” is installed. Now Type: <Code> $ shard start </ code> And all the services are launched and the terminal changes it's appearance(this is normal because we are now under “Screen mode”. You can now safely close the terminal.

To be able to navigate the services(of the shard), use these macro combinations:

  • CTRL-A + D (to detach from the “screen” session).
  • CTRL-A + n (to switch to another service(in screen mode).
  • CTRL-A? (Brings up the screen-based “help screen”).
  • $ shard join

    (join an active shard).

  • $ shard stop

    (stop the active shard).

search?q=VM%20Ryzom_Core%20server&amp;btnI=lucky

en/vm_server.txt · Last modified: 2016/12/28 20:02 by Domperss