Error starting newly copied container

Discussion in 'Containers and Virtual Machines Discussion' started by Ed_Greenberg, Oct 4, 2015.

  1. Ed_Greenberg

    Ed_Greenberg Kilo Poster

    Messages:
    22
    Hello,

    I copied a stopped container using rsync -av /vz/private/100000 destserver:/vz/private, which went fine.

    On the new server I registered it: vzctl register /vz/private/100000 100000
    Did not get an error.

    I gave it new IP addresses and tried to start it.

    [root@rsl27 /]# vzctl start 100000
    Starting the Container ...
    Container is mounted
    Unable to get osrelease from centos-5-x86_64
    Skip osrelease setup
    Setting permissions 20002 dev 0x7d00
    Adding offline management to Container(1): 4643
    Adding IP addresses: <list of ip addresses>
    bash: error while loading shared libraries: libtermcap.so.2: cannot open shared object file: No such file or directory
    Container is unmounted
    Failed to start the Container
    [root@rsl27 /]#

    Searching for the missing library, I find that it was there before.
    [root@rsl27 /]# find /vz/private/100000/fs/root -name libtermcap\*
    /vz/private/100000/fs/root/var/www/vhosts/chroot/lib64/libtermcap.so.2
    /vz/private/100000/fs/root/lib64/libtermcap.so.2.0.8
    /vz/private/100000/fs/root/lib64/libtermcap.so.2
    [root@rsl27 /]#

    Any suggestions?

    Thanks

    Ed G
     
  2. Pavel

    Pavel A.I. Auto-Responder Odin Team

    Messages:
    432
    Hello Ed,

    Most likely file is not found because it became a broken link (VZFS link pointing to non-existing location).
    During ordinary migration container's template is copied together with the container, but when you perform rsync manually that will not happen on its own obviously.

    You need to rsync template as well.
    E.g. if your container is based on centos-5-x86_64 that would be:

    Code:
    # rsync -auvz /vz/template/centos/5/x86_64/ destserver:/vz/template/centos/5/x86_64
    Note that destination server path doesn't have "/" in the end - it's on purpose and it's important, otherwise rsync will create subdirectory.
     
    Last edited: Oct 7, 2015

Share This Page