Symptoms

VPS related task in POA fails with the following diagnostics:

3802 : Error invoking external utility: vzctl set failed: Cannot lock Container

Cause

The VPS (container) in question is locked on the corresponding PVC server due to other (e.g. manual) operation started either from other host (like manual backup from other node) or Power Panel (restart/repair operation, application template installation).

Resolution

Use the instructions below to check if the container is really locked by some operation on the PVC server, wait until operation is completed and resubmit the failed task in POA.

PVC for Linux

  1. Find the PVC server where the problem container is running in the POA Provider Control Panel at Service Director > Virtuozzo Manager > VPSs > 'Node' field.

  2. Log into the found PVC server by SSH.

  3. Check if the file /vz/lock/VPS_ID.lck exists, where VPS_ID is the ID of the container.

    If the file /vz/lock/VPS_ID.lck exists look at its content, it will have PID of process which locked VPS and name of operation, e.g.:

    # cat /vz/lock/1101.lck
    17195
    updating
    

    In the example above it is seen that the process #17195 locked the container #1101 with some update operation, it may be e.g. installation of application template.

    Using the ps utility on the PVC server you may find what exactly process locked the container:

    # ps axwww | grep PROCESS_ID
    

    replace PROCESS_ID with the actual PID found in the .lck file, in the example above it will be 17195.

PVC for Windows

  1. Find the PVC server where the problem container is running in the POA Provider Control Panel at Service Director > Virtuozzo Manager > VPSs > 'Node' field.

  2. Log into the found PVC server by RDP.

  3. Start the 'cmd' application and run the following command:

    C:> test_vzsrvapi query VPS_ID
    

    where VPS_ID is the ID of the problem VPS.

  4. Check the transitionStatus reported by the command above, if it has any value other than none it means container is locked by some operation. E.g. in the example below it is seen that container 105 is being backed up:

    C:\Documents and Settings\Administrator>test_vzsrvapi query 105
    Query result=0 count=1
    VpsId=105
    status=running
    transitionStatus=backing up
    .....
    

Internal content