2.2. Deploying Compute Nodes

To deploy compute nodes, that is, make your Virtuozzo Hybrid Server nodes manageable by the controller, do the following on the controller node:

  1. Create a file, e.g. nodes.lst, with a list of Virtuozzo Hybrid Server nodes to be attached to the cluster. Specify each node, one per line, in the form <user>:<password>@<node_hostname>.


    Hostnames are case-sensitive.

    For example:


    Use root credentials because deployment involves package installation, service setup, and other actions that require root privileges.


    Keep this file if you plan to add more compute nodes later. For details, see Adding Compute Nodes.

  2. Set the required owner and file permissons to the nodes list file:

    # chown root nodes.lst
    # chmod 600 nodes.lst
  3. Run the deploy script:

    # vzapi-installer computes --nodes=nodes.lst

    The vzapi-installer script will place SSH keys stored in /var/lib/vzapi on each node in the list and launch ansible-playbook to perform actual deployment.

    Note the following:

    • Once the compute component is deployed on a node, that node’s name is added to the computes section of the file /var/lib/vzapi-installer/inventory.json.

    • Virtuozzo does not have the firewall enabled by default. If, however, you have configured and started a firewall manually on a compute node, create rules to open the required ports on that compute node (see Appendix A: Controller and Compute Ports).

    When deployment is completed successfully, you will see a recap from Ansible. For example:

    PLAY RECAP *********************************************************************
    compute1.example.com     : ok=15   changed=9    unreachable=0    failed=0
    compute10.example.com     : ok=15   changed=8    unreachable=0    failed=0
    Compute nodes have been deployed successfully!

If you later need to redeploy existing compute nodes listed in your nodes.lst file or update PowerPanel components on them, run

# vzapi-installer computes

2.2.1. Adding Compute Nodes

To add more compute nodes after installation, specify their information in nodes.lst in addition to compute nodes already deployed and run the deploy script:

# vzapi-installer computes --nodes=nodes.lst


If invoked with the --nodes=nodes.lst option, the deploy script will only deploy compute nodes specified in nodes.lst and remove from Ansible configuration files all existing compute nodes that are not listed in this file. For information on how to remove a compute node from Virtuozzo PowerPanel completely, see Removing Compute Nodes.

2.2.2. Removing Compute Nodes

To remove a deployed compute node from Virtuozzo PowerPanel, do the following:

  1. Stop and disable the vzapi-compute service on the compute node:

    # systemctl stop vzapi-compute
    # systemctl disable vzapi-compute
  2. Remove the vzapi-compute package from the compute node:

    # yum remove vzapi-compute
  3. Remove information on the compute node and its VEs from the Virtuozzo PowerPanel database. Do the following on the controller node:

    1. Find out the ID of the node to delete by means of the vzapi host list command. For example:

      # vzapi host list
              "created_at": "2017-03-06T12:18:27.000000",
              "hostname": "compute4.example.com",
              "id": "6ddbb2c1632a42ce9d2d8a83a7c93e04"
    2. Using the compute node ID, delete the information about the node and its VEs from the database. For example:

      # vzapi host delete 6ddbb2c1632a42ce9d2d8a83a7c93e04


    If you remove host information from the database without stopping and removing the vzapi-compute service, said information will be restored in the database on next vzapi-compute restart.