OpenVZ Forum


Home » General » Support » Cannot start containers created from precreated templates
Cannot start containers created from precreated templates [message #52208] Fri, 18 September 2015 03:01
puravida is currently offline  puravida
Messages: 6
Registered: September 2015
Location: USA
Junior Member
Hello All,

I am trying to create a container from a precreated template and am having a terrible time of it. It should be simple, but it just doesn't work on my server.

As a background, I wanted to mention that on this same server, I am currently running containers based off of an imported template created by Rackspace's cloud servers from several years ago. Those containers work just fine. They can be created, copied, started, stopped, and managed as can be expected. This is with using the same vps.mount file that works on these but doesn't work on the precreated templates.

However, when I try to use any of the precreated templates, they create fine but will not start. I have tried several templates, some from inside OpenNode and also by copying precreated templates from the OpenVZ site and putting them, unmodified, in the /vz/template/cache directory. I then run the following command:

# vzctl create 176 --ostemplate centos-7-x86_64-minimal

The creation process goes fine, without error.

But when I try to start it, I get the following output:

# vzctl start 176
Starting container...
mount: mount point /vz/root/176/mnt/ipaddr does not exist
Error executing mount script /etc/vz/conf/vps.mount

I have tried creating /vz/root/176/mnt/ipaddr but that makes no difference. I searched for answers and found nothing relevant. The closest I found was a mention of this error and to modify the vps.mount script to also mkdir -p the missing folder. That also made no difference. Same error. I am at a loss and hoping someone could help.

CentOS release 6.4 (Final)

Installed Packages

vzkernel.x86_64 2.6.32-042stab063.2
vzkernel.x86_64 2.6.32-042stab081.3

vzctl.x86_64 4.7.2-1

vzquota.x86_64 3.1-1


vps.mount:
#!/bin/sh
   # If one of these files does not exist then something
   # is really broken
   [ -f /etc/sysconfig/vz ] || exit 1
   [ -f $VE_CONFFILE ] || exit 1
   # Source both files. Note the order is important.
   . /etc/vz/vz.conf
   . $VE_CONFFILE
   PUB_IP=$(/sbin/ifconfig vmbr0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
   SRC=/mnt/ipaddr
   DST=/mnt/ipaddr
   IPFILE=${SRC}/public_ip.txt
   echo ${PUB_IP} > ${IPFILE}
   mount -n -t simfs $SRC ${VE_ROOT}${DST} -o $SRC



/etc/vz/conf/176.conf:
#+--------------------------------------------------------------+
#| CT configuration generated by OpenNode-tui openvz script     |
#+--------------------------------------------------------------+
#| Input parameters were                                                |
#+--------------------------------------------------------------+
#| MEMORY    : 0.4G                                             |
#| SWAPPAGES : 0.8G                                             |
#| DISK      : 4.5G                                             |
#| CPUS      : 1                                                |
#| CPULIMIT  : 50%                                              |
#+--------------------------------------------------------------+
#| Generated : Thu Jan 29 19:38:12 2015                         |
#+--------------------------------------------------------------+


# VSwap limits
PHYSPAGES="0:0.4G"
SWAPPAGES="0:0.8G"

# Disk quota parameters (in form of softlimit:hardlimit)
DISKSPACE="4.5G:4.95G"
DISKINODES="900000:990000"
QUOTATIME="1800"

# CPU fair scheduler parameter
CPUUNITS="1000"
CPULIMIT="50"
CPUS="1"



#UUID: f12c1c8e-1095-49b0-85b1-16346f1bd74a
VE_ROOT="/vz/root/$VEID"
VE_PRIVATE="/vz/private/$VEID"
OSTEMPLATE="centos"
ORIGIN_SAMPLE="101"
NAMESERVER="70.32.45.42"
IP_ADDRESS="192.168.0.76"
HOSTNAME="gen76"
ONBOOT="no"
IOPRIO="4"
Previous Topic: cant install vzkernel on linux 3.10.0-123.el7.x86_64
Next Topic: Convert Ploop to Simfs
Goto Forum:
  


Current Time: Fri Mar 29 06:43:59 GMT 2024

Total time taken to generate the page: 0.01937 seconds