0

I start my container and it has a few errors.

[xxx@centosbuilder1 etc]$ sudo vzctl start 1011
Starting container...
Container is mounted
Adding IP address(es): 10.0.64.23
cp: cannot stat '/etc/conf.d/netcfg': No such file or directory
/bin/bash: line 593: /etc/conf.d/netcfg: No such file or directory
/bin/bash: line 594: /etc/conf.d/netcfg: No such file or directory
A unit file for profile 'venet0' already exists
Setting CPU units: 1000

If I create the directories and touch netcfg (in the guest) the errors go away.

I would rather fix the actual problem. What file is it running? I wish to find line 593 and investigate.

DarkSheep
  • 1,036
  • 1
  • 13
  • 23

1 Answers1

1

According to the documentation, vzctl start triggers several action scripts to run. However, the actual code appears to be more complex. As I read it:

  1. Determine the distro running in the container from the name of the template from which it was created.
  2. Mount the container's filesystem and trigger the premount and mount action scripts.
  3. Create the virtual environment and set up its resources (networking and resource limits). To do so, it runs some scripts specific to the distro running in your container — see /etc/vz/dists/*.conf.
  4. Run the prestart and start scripts.
  5. Run init in the container (one of /sbin/init, /etc/init, or /bin/init).

I believe your error happens in step 3. For more information about what scripts are actually run, try vzctl --verbose --verbose start 1011. If that still isn't enough information, you could try strace -f -e file vzctl start 1011.

200_success
  • 4,771
  • 1
  • 25
  • 42
  • The --verbose option was what I missing. Also /bin/init was helpful. Coming from arch I am used to /bin/systemd – DarkSheep Sep 03 '13 at 18:48