Article ID: 118976, created on Dec 2, 2013, last review on May 4, 2014

  • Applies to:
  • Virtuozzo
  • Virtuozzo containers for Linux
  • Virtuozzo hypervisor


How can I promptly start containers on another if original node is down? (I.e. in case of a hardware failure)


Since the node is physically down it will be necessary to detach it's HDD that contains "/vz/" partition and insert it into a "spare" or "recipient" node with Parallels Virtuozzo Containers for Linux (PVCfL) installed.

When it's done (HDD is physically attached to another host where PVCfL is already installed) there are 2 general cases we can outline:

  • There are no running containers on a spare/recipient node - it's free

    In this scenario simply mount "/vz/" from the detached drive over existing "/vz/" folder:

    1. Stop VZ service:

      # service vz stop
    2. Umount /vz/ if any disk drive is already mounted over there:

      # umount /vz/
    3. Mount rescued drive to /vz/ folder:

      # mount /dev/sdXY /vz/

      Where /dev/sdXY is a /vz/ partition from the server that went down.

    4. Start VZ service:

      # service vz start

    NOTE: If you want this setup to survive reboots, make sure necessary change is done to /etc/fstab file.

  • Recipient node already has several containers running - it's not free

    1. Create a mount point for the rescued /vz/ partition:

      # mkdir /vz2/
    2. Mount the disk to /vz2/:

      # mount /dev/sdXY /vz2/

      Where /dev/sdXY is a /vz/ partition from the server that went down.

    3. Rsync templates from vz2 to vz - it is necessary to avoid broken links in rescued containers. If templates are the same on both nodes - rsync would take only a couple minutes (it won't overwrite identical files):

      # rsync -auv /vz2/template/ /vz/template

      Please note the "/" symbol placement - it should be exact the same, otherwise it would create subfolders instead of syncing proper folders.

    4. Register containers on a new node and start them:

      # ls -1 /vz2/private/ | grep -v migrate | grep -v tmp | grep -v lck | grep -v bak | while read path; do vzctl register "/vz2/private/$path" $path; vzctl start $path;done

    After these steps containers will be registered and running on a new server, but still reside on "vz2" partition so you will be able to detach disk quickly when original node is repaired.

Search Words



disaster recovery

move container

a26b38f94253cdfbf1028d72cf3a498b 2897d76d56d2010f4e3a28f864d69223 d02f9caf3e11b191a38179103495106f e8e50b42231236b82df27684e7ec0beb 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF