VMmanager OVZ: Importing VPS from VDSmanager OpenVZ

From ISPWiki
Jump to: navigation, search


Import process

There are two ways of VPS import available:

1. Install VMmanager OVZ on a clear server and add one ore more clear cluster nodes to it.

When importing, VDS are copied on cluster nodes, in this case the original VDS copy stays on the server with VDSmanager. This import method is recommended.

2. Install VMmanager OVZ on the same server where VDSmanager is installed. Installation starts with the command: MIGRATION=mgr5 sh install.sh

When added a local VDSmanager server, it stops (without start permission) for preventing any possible conflicts. When needed it can be started by the following commands:

chmod 555 /usr/local/ispmgr/sbin/vdsnetstatd
chmod 555 /usr/local/ispmgr/sbin/vdsmon
chmod 555 /usr/local/ispmgr/bin/vdsmgr


There're no VDS copied by import from a local VDSmanager, however to secure stable work VMmanager OVZ assigns a new CTID identificator to each imported VDS.


Attention! Import from a local VDSmanager is possible on a local VMmanager OVZ cluster node only.

Attention! We recommend not to create new containers before import of all VDSs from a local server is finished


Requirements

In order to comlete import you will require:

1. At least one cluster node.

2. Sufficient recourses of cluster nodes.

3. If VDSmanager is integrated with IPmanager, VMmanager OVZ should be also integrated with the same IPmanager. There are 2 types of IP-addresses used in VMmanager OVZ: public and private. By VDS import IP-addresses are imported as public. While setting IPmanager, make sure you created new network type "public" and set it for the existing VDS subnetworks.

4. VDSmanager should work with OpenVZ virtualization.

5. Servers should be located at the same network segment.

6. The path to a target VDS can be found in the VDSmanager configuration file (the PrivateDiskDir value). If this value is not set, the default path is "/vz/private".

Import steps

1. Log in as root and open the "VDS import" module.

2. Add the VDSmanager server (the list of VDS located on the server will be recieved automatically).

3. Either import all the VDS at once, or import it one by one (to do so open the VDS list, select one and press "Import")

Description

To import a VDS, log in as root. The "VDS import" option is available in VMmanager OVZ main menu.

Clicking on this button opens up the list of VDSmanager servers, from which VDS import is available.


Adding a VDSmanager server

In order to add a server click the "Add" button and fill the appeared form.


Enter the server IP-address and name. Also there is an open key in the "Public key" field, which should be added to the /root/.ssh/authorized_keys file of the VDSmanager server. If user knows the root-password from the server, you can put a check on the "Available root password" and enter the password in the corresponding fields, the public key will be added automatically. By clicking "OK" the server will be added to the list.


How to change VDSmanager server parameters

In order to change VDSmanager server parameters, select it in the list, click the "Change" button and edit it. By editing only the field "Title" is available.


VDSmanager server deletion

In order to delete a VDSmanager server, select it in the list and click the "delete" button. To avoid accidental deletions, panel will ask to confirm it. After clicking OK button in the confirmation window, the selected servers will be deleted without recover ability.


VDS list

By clicking the "VDS lists" button you will navigate to the list, containing all the virtual machines located on the VDSmanager server.


VDS import

In order to import VDSs into VMmanager OVZ, select it in the list, click the "Import" button and fill in the appeared form.


  • Change VDS name - click if you want to change a container's name.
  • Title - enter a new VDS title. This title is for a new container in VMmanager OVZ; the sourse VDS title will not be changed.
  • Owner - put the name of VMmanager OVZ user, that will own the importing VDS; If "Create new user" is selected, it will be created automatically with the name format user_CTID where user_CTID is the VDS identifier in VDSmanager.
  • File system [At the present time available only in CentOS] - select type of container file system (ploop/simfs).

When importing, all VDSs in VDSmanager stop and lock up. To avoid data loss, make sure importing VDSs are turned on.


How to stop VDS import

Im order to cancel VDS import, select a VDS in the list and click the Stop button. In order to avoid accidental stops, the panel will ask to confirm or to cancel your action. After you click "Ok" in the confirmation window, importing of the chosen VDS will stop.


How to import all VDSs of a server

In order to import all the VDSs from a VDSmanager server select the server in the list, click "Import" and fill the appeared form. The window is similar to one mentioned above, with one exception: the function of VDS name change is not available.


How to stop importing all server VDSs

In order to stop importing all server VDSs select a VDSmanager server in the list and click the stop "button". In order to avoid accidental stops the panel will ask to confirm or to cancel the action. After confirmation importing of all VDS of the selected server will be stopped.


How to renew VDS list

In order to renew VDS list of the VDSmanager server, select the server in the list and click the "renew" button. In oreder to avoid accidental operations the panel will ask to confirm the action or to cancel it. After confirmation the VDS list will be renewed for selected VDSservers.


Technical information

The import process has its own log:

/usr/local/mgr5/var/importve.log
You can check the container importing status in the /usr/local/mgr5/var/run/vemgr/IMPORT/<importve.VDS_IP> file
/usr/local/mgr5/var/run/vemgr/IMPORT/<importve.ip_машины>

Container transition starts a specific process titled "importve" , this process indicates if a container is being reported or not.


# ps aux | grep import
root 330157 0.0 0.0 81688 5292 ? S 13:43 0:00 libexec/lt_wrapper var/run/vemgr/IMPORT/36.importve.15.15.15.15
root 330158 0.2 0.0 217132 11728 ? S 13:43 0:00 sbin/importve --source 10.10.10.1 --dest 10.10.10.2 --vds 15.15.15.15 --layout ploop