Article ID: 129293, created on Aug 22, 2016, last review on Aug 22, 2016

  • Applies to:
  • Operations Automation

Symptoms

  1. A VE with container virtualization type gets created and deleted immediately, ending in "Failed to delete" state.
  2. The container's configuration file /vz/private/$VEID/ve.conf is lost.
  3. There are the following messages in /var/log/vzctl.log:

    Unable to rename /path/to/ve/config/YOUR_VE_ID/ve.conf.tmp -> /path/to/ve/config/YOUR_VE_ID/ve.conf: No such file or directory
    Unable to lock Container, failed to parse /etc/vz/conf/YOUR_VE_ID.conf: No such file or directory
    Container configuration file does not exist
    
  4. The rest of VE files are present on the hardware node:

    # ls /vz/private/111/
    dump  root.hdd  scripts  templates
    

Cause

The configuration file was renamed or deleted either manually or as a result of a race condition in VE-related events.

Resolution

  1. The configuration file can be recovered using the available information:

    # grep -C3 '\$VEID\>' /var/log/vzctl.log
    # echo 'cat //VirtualMachine[EnvId=$VEID]' | xmllint --shell /etc/parallels/vmdirectorylist.xml
    
  2. Create /etc/vz/conf/$VEID.conf file and use the following template (note: some options may be different, so apply modifications in accordance with the required configuration):

    IP_ADDRESS="<VE_PRIVATE_IP_ADDRESS>/<VE_PRIVATE_IP_MASK>"
    NETIF="ifname=eth1,mac=<VE_MAC>,host_ifname=veth<VEID>.1,host_mac=<VE_HOST_MAC>,network=Bridged,gw=10.39.1.1,configure=all,ip=<VE_PUBLIC_IP_ADDRESS>/<VE_PUBLIC_IP_MASK>,ip6="
    PHYSPAGES="262144:262144"
    SWAPPAGES="262144:262144"
    DISKSPACE="20971520:20971520"
    DISKINODES="5242880:5242880"
    CPULIMIT_MHZ="1024"
    CPUS="1"
    HOSTNAME="<VE_HOSTNAME>"
    NAMESERVER="<VE_NAMESERVER>"
    UUID="<VE_UUID>"
    RATE="*:1:100000"
    RATEBOUND="yes"
    VE_ROOT="/vz/root/$VEID"
    VE_PRIVATE="/vz/private/$VEID"
    OSTEMPLATE=".centos-6-x86_64"
    DISTRIBUTION="redhat-el6"
    TECHNOLOGIES="x86_64 nptl"
    NAME="<CUSTOMER_ID.VE_HOSTNAME>"
    VEID="<VEID>"
    VERSION="2"
    ONBOOT="yes"
    

Put the missing details to the lines above, where the details can be obtained either from OA CP or from the commands from point 1. MAC addresses can be generated from scratch, taking into account that:

  • HOST_MAC address should start with 00:18:51, e.g. 00:18:51:1F:73:9A.
  • VE_MAC address should start with 00:1c:42, e.g. 00:1C:42:CB:7E:4C.

Search Words

Container configuration file does not exist

ve.conf lost

start

failed to delete

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF