Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

closed as off-topic by mdpc, Ward, dawud, TheCleaner, gWaldo Sep 3 '13 at 17:19

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – Ward, dawud, gWaldo
If this question can be reworded to fit the rules in the help center, please edit the question.

add comment

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
The --verbose option was what I missing. Also /bin/init was helpful. Coming from arch I am used to /bin/systemd –  DarkSheep Sep 3 '13 at 18:48
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.