Import local VPS

From ISPWiki
Jump to: navigation, search

This article goes you through the steps you need to perform to import containers that are managed through the control panels other than VDSmanager.

There are 2 variants of importing such containers:

  • install VMmanager OVZ locally on the same server where required container are running
  • install VMmanager OVZ on a separate server and add the server with required containers as a cluster node.

Complete the following steps before you start importing:

  1. Install VEmanager 5 as described in the article VMmanager OVZ installation guide locally or on a separate server
  2. Deactivate the current control panel (the means may vary depending on a panel type) or uninstall it
  3. The following object must be created in VMmanager OVZ:
    1. all of the servers from which you want to import (including the local server) must be connected as cluster nodes. (How to add a cluster node in VMmanager OVZ)
    2. We recommend that you create a user (How to create a user in VMmanager OVZ) to be able to assign all the containers you want to import to one user; otherwise a separate user will be created for each container.
    3. In the IP addresses management module or in IPmanager create networks corresponding to the IP addresses of your container; network type - "public".

ATTENTION: while importing containers their identifiers will change (CTID)

Execute the following command from the console to start importing the local containers (all the commands are specified according to /usr/local/mgr5 - VEmanager installation default path. Please mind, if you installed the panel into a different directory):

./sbin/mgrctl -m vemgr import.local user=user_id elid=CTID hostnode=id|all

Parameters of the import.local function:

  • user [mandatory] - identifier of the existing user who will own all of the imported containers; if this parameter is not specified, a separate user will be created for each container; the user identifier can be found in the list of users in the id column
  • elid [mandatory] - container identifier [CTID]; if this parameter is specified, only one container will be imported; if the parameter is not specified, all containers will be imported.
  • hostnode [mandatory] - identifier of the cluster node (it can be found in the cluster nodes module in the id column ) from which you want to import containers, or all if you want to import from all of the cluster nodes; if the parameter is not specified, import from the local cluster node will be made.

We recommend that you follow the steps below:

1. Execute the command to import all of the containers:

./sbin/mgrctl -m vemgr import.local user=user_id

2. Make sure that no errors occurred while importing (ideally, the command output is null):

grep "WARNING Skip" ./var/vemgr.log

if no errors occurred, you may start working with VMmanager OVZ

3.If errors occurred, output of the previous command will look something like this:

Jan 22 11:27:38 [63613:14] import WARNING Skip container '108' due to errors
Jan 22 11:38:26 [63613:65] import WARNING Skip container '104' due to errors

Each of the faulty containers should be imported separately. Be sure to resolve the issues:

./sbin/mgrctl -m vemgr import.local user=user_id elid=108
./sbin/mgrctl -m vemgr import.local user=user_id elid=104

After importing, come back to step 2.