Search Engine: Elastic

Article ID: 130144, created on Jan 12, 2017, last review on Jul 14, 2018

  • Applies to:
  • Operations Automation 5.5

This KB article contains the detailed instructions of how to convert Shared VPSes into Hardware Nodes on OA, in addition to the ones available in OA guide .

Please note that Virtuozzo version must be at least 4.7

Important(!) - Do not perform a conversion on earlier VZ versions

Preparations part

  1. Passwordless (key-based) access must be configured from OA Management Node to all VZ nodes where shared containers are located. The following resource may be useful - SSH login without password

  2. Configure Front Net and the Back Net virtual networks on VZ node:

    a) check networks - # vznetcfg net list

    b) create new networks if needed - # vznetcfg net new BackNet , # vznetcfg net new FrontNet

    c) check IP addresses and how they are bound to networks - # ip a l or # ifconfig -a

    d) associate new network with one of them according to the following example: # vznetcfg net addif BackNet eth1

    Finally virtual networks configuration on VZ node will be similar to the following example:

    [root@VZnode ~]# vznetcfg net list
    Network ID        Status      Master Interface  Slave Interfaces
    BackNet           active      eth1
    FrontNet          active      eth0
  3. Check the values of the following parametres:

    a) --host-id - VPSes ID in OA , may be found in OA CP at: Services > Cloud Infrastructure > VPSs

    b) --hw-host-id - ID of the VPS Hardware Node (VZ node), may be found at: Services > Cloud Infrastructure > VPS Hardware Nodes

    c) --gateway - Gateway IP address, may be checked on VZ node by running the following command: # netstat -nr


    # netstat -nr
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
    ...     U         0 0          0 eth1         UG        0 0          0 eth0

    See the last line in the output - in this example, Gateway IP is

    *Note that for VPSes that have Internal IP only assigned, Gateway value may be checked by running # netstat -nr inside of the container. Often in such cases Gateway IP is

    d) --backnet - name of the virtual Back Net configured for the container.

    e) --frontnet - name of the virtual Back Net configured for the container.

  4. Create a backup copy of the containers' configs:

    # cp -p /etc/sysconfig/vz-scripts/<CTID>.conf /etc/sysconfig/vz-scripts/<CTID>.conf.bak 

    If the conversion fails for some reason, it is possible to restore container's network settings by replacing it's config with backup and CT restart.

    Alternatively, you may create a full container's backup (clone) using the following command and set --onboot no parameter for the clone (so the cloned CT will not be started automatically after VZ node reboot):

        # vzmlocal -C <source_CTID>:<copy_CTID>
        # vzctl set <copy_CTID> --save --onboot no

    The copy_CTID must be free, i.e. not assigned to any other container.

    Note that cloning of large containers may take a significant amount of time.


Once password-less access from MN to VZ node and and virtual networks are configued and host-id, hw-host-id and gateway values are clarified for a specific VPS, conversion script may be launched on MN according to the following example:

For VPS with both External and Internal IPs assigned:

/usr/local/pem/bin/ --host-id 32 --hw-host-id 2 --gateway --backnet BackNet --frontnet FrontNet --verbose  

For VPS with Internal IP only:

/usr/local/pem/bin/ --host-id 32 --hw-host-id 2 --gateway --backnet BackNet --verbose

Note that the 'host id' values and IP addresses in the above commands are examples only and must be replaced with the real values

Known issues:

  • 128008 Communication failure with remote server
  • 128612 missing networks on venet0
  • 128010 network interfaces are missing on Shared VPS
  • 126740 ValueError: invalid literal for int(): auto
  • 124085 There is no networks on host`
  • 128151 uses ServiceCT IP while SSHing to VPS HW node
  • 128153 RTNETLINK answers: No such process
  • 127179 Shared VPS located on hardware host %d but passed %s'
  • 128609 Host pemhost123 is not a Shared VPS
  • 128096 There is no password, pubkey ssh access to host
  • 127178 Network is missing on host
  • 128608 Failed to find %s backnet IP
  • 128613 ERROR poaupdater.uUtil.ExecFailed
  • 128611 There is no YUM tool installed on host

Other questions about the script:

  • 128464 A Hub article that describes conversion mechanism
  • 128009 Is it necessary to configure yum repositories on shared VPS registered in OA before converting it to hardware node with
  • 127177 Is it possible to convert VPS that already has bridged networks configured?
  • 128610 How to add manually created VPS as a Hardware Node?

5b048d9bddf8048a00aba7e0bdadef37 caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07 5356b422f65bdad1c3e9edca5d74a1ae 2554725ed606193dd9bbce21365bed4e

Email subscription for changes to this article
Save as PDF