VMmanager: Administrator guide

Moving VMmanager to a new server

To move VMmanager from one server to another you need to perform following steps:

  1. Import VMmanager data. The import order depends on whether you need to migrate statistics data.
  2. Import the domain name if it assigned to the source server.
  3. Change the license token.

Step 1. Import VMmanager data

  1. On the target server:
    1. Install VMmanager. Read more in the article Installation.
    2. Stop VMmanager and delete the containers:

      vm down
    3. Delete the data created by the installer:

      rm -rf /opt/ispsystem/vm/mysql /opt/ispsystem/vm/clickhouse /opt/ispsystem/vm/config.json
      
    4. If you need to migrate statistics data, check if the rsync utility is installed. If not, install it: 
      dnf install rsync || apt install rsync
    5. Check that the nodes and virtual machines of the source server are accessible from the target server. Edit the firewall configuration if needed.
  2. On the source server:
    • If migrating statistics data is not required:
      1. Create a backup of the platform. Read more in the Creating platform backups.
      2. Stop VMmanager and delete its docker containers:

        vm down
      3. If the rsync utility is not installed on the server, install it: 
        dnf install rsync || apt install rsync
      4. Copy the backup file to the target server: 
        rsync -avzP /opt/ispsystem/vm/backup/ user@192.0.2.1:/opt/ispsystem/vm/backup/
        Comments to the command
    • If you need to migrate statistics data:
      1. Stop VMmanager and delete its docker containers:

        vm down
      2. If the rsync utility is not installed on the server, install it: 
        dnf install rsync || apt install rsync
      3. Copy files and directories to the target server:
        • /opt/ispsystem/vm/mysql/ — database;
        • /opt/ispsystem/vm/telegram-srv/ — if you use Telegram notification sending;
        • /opt/ispsystem/vm/clickhouse/ — statistics data;
        • /opt/ispsystem/vm/config.json — platform configuration file.
          Example command
          rsync -avzP /opt/ispsystem/vm/{mysql,telegram-srv,clickhouse,config.json} user@192.0.2.1:/opt/ispsystem/vm/
          Comments to the command
  3. On the target server:
    1. If you moved the /opt/ispsystem/vm/config.json file, specify the IP address or domain name of the target server in the DomainName parameter.
    2. Start VMmanager: 

      vm start
    3. If you migrated your data through a backup, restore the data using the instructions in the Creating platform backups article.
  4. If the migration was successful, remove the platform from the source server:
    1. Stop VMmanager service and disable it: 

      systemctl stop vm.service
      systemctl disable vm.service
    2. Delete the information about the platform operation:  

      rm /opt/ispsystem/vm -rf
    3. Remove the installed docker images and containers: 

      docker system prune -a -f
    4. Remove Docker software: 

      AlmaLinux
      yum remove docker-ce docker-ce-cli docker-ce-rootless-extras containerd.io
      Ubnutu
      apt remove docker-ce docker-ce-cli docker-ce-rootless-extras containerd.io

Step 2. Move the domain name

  1. Edit the A-record of your NS server: change the IP address of the source server into the IP of the target one.
  2. If an SSL certificate is connected to the domain, follow the instructions in the article Connecting the SSL certificate.
Create a temporary subdomain while you are moving the domain. If your SSL certificate doesn't support Wildcard, receive a free Let's Encrypt certificate for the subdomain. 

Step 3. Change the license token

When moving the platform to the new server, you need to recreate the license token. If you purchased a license from ISPsystem, change the Token value for your license in eu.ispsystem.com client area.

To update your license token information:

  1. Connect to VMmanager via SSH protocol with superuser permission (the default level is root).
  2. Delete all files from the /opt/ispsystem/license/ directory except machine_id:  

    find /opt/ispsystem/license/ -type f -not -name 'machine_id' -delete
  3. In VMmanager interface, in the right menu click the icon → System information.

  4. In the License token field enter the value of the license token.
  5. Click the Activate button.