vzctl 3.2

mo_

Active Member
Oct 27, 2011
401
6
38
Germany
Hello,

would it be possible to add vzctl 3.2 to the proxmox repositories? the reason is: the currently shipped vzctl 3.0.30 is too old as it had a bug making it unable to work with upstart in containers such as opensuse 12 or FC 16

right now when trying to start such containers, you'd get:

Starting container ...
Container is mounted
Failed to set upstart as init. Please install upstart into this CT.: No such file or directory
TASK ERROR: command 'vzctl start 200' failed: exit code 47

theres a workaround involving chroot and manually installing upstart but thats really not what Id call comfortable container creation. the source code hack available for that issue is something else Id rather not dig into.
 
Last edited:
Hello,

would it be possible to add vzctl 3.2 to the proxmox repositories? the reason is: the currently shipped vzctl 3.0.30 is too old as it had a bug making it unable to work with upstart in containers such as opensuse 12 or FC 16

right now when trying to start such containers, you'd get:



theres a workaround involving chroot and manually installing upstart but thats really not what Id call comfortable container creation. the source code hack available for that issue is something else Id rather not dig into.

What is the workaround? I am not that familiar with Proxmox coming from VMware ESXi but trying to install openSUSE 12.1 and have this exact problem. How can I manually install upstart?
 

Doesn't appear to work for me. This is openSUSE and yum is not present so I tried using the tool for this distribution, zypper, and get the following:
Code:
zypper install upstart
Retrieving repository 'Updates for openSUSE 12.1 12.1-1.4' metadata [\]
Download (curl) error for 'http://download.opensuse.org/update/12.1/repodata/repomd.xml':
Error code: Connection failed
Error message: Could not resolve host: download.opensuse.org (Could not contact DNS servers)

Abort, retry, ignore? [a/r/i/?] (a): Cannot read input: bad stream or EOF.
If you run zypper without a terminal, use '--non-interactive' global
option to make zypper use default answers to prompts.
Retrieving repository 'Updates for openSUSE 12.1 12.1-1.4' metadata [error]
Repository 'Updates for openSUSE 12.1 12.1-1.4' is invalid.
[|] Valid metadata not found at specified URL(s)
Please check if the URIs defined for this repository are pointing to a valid repository.
Warning: Disabling repository 'Updates for openSUSE 12.1 12.1-1.4' because of the above error.
Retrieving repository 'openSUSE-12.1-Non-Oss' metadata [|]
Download (curl) error for 'http://download.opensuse.org/distribution/12.1/repo/non-oss/media.1/media':
Error code: Connection failed
Error message: Could not resolve host: download.opensuse.org (Could not contact DNS servers)

Abort, retry, ignore? [a/r/i/?] (a): Cannot read input: bad stream or EOF.
If you run zypper without a terminal, use '--non-interactive' global
option to make zypper use default answers to prompts.
Retrieving repository 'openSUSE-12.1-Non-Oss' metadata [error]
Repository 'openSUSE-12.1-Non-Oss' is invalid.
[|] Valid metadata not found at specified URL(s)
Please check if the URIs defined for this repository are pointing to a valid repository.
Warning: Disabling repository 'openSUSE-12.1-Non-Oss' because of the above error.
Retrieving repository 'openSUSE-12.1-Oss' metadata [/]
Download (curl) error for 'http://download.opensuse.org/distribution/12.1/repo/oss/media.1/media':
Error code: Connection failed
Error message: Could not resolve host: download.opensuse.org (Could not contact DNS servers)

Abort, retry, ignore? [a/r/i/?] (a): Cannot read input: bad stream or EOF.
If you run zypper without a terminal, use '--non-interactive' global
option to make zypper use default answers to prompts.
Retrieving repository 'openSUSE-12.1-Oss' metadata [error]
Repository 'openSUSE-12.1-Oss' is invalid.
[|] Valid metadata not found at specified URL(s)
Please check if the URIs defined for this repository are pointing to a valid repository.
Warning: Disabling repository 'openSUSE-12.1-Oss' because of the above error.
Loading repository data...
Reading installed packages...
'upstart' not found in package names. Trying capabilities.
No provider of 'upstart' found.
Resolving package dependencies...

Nothing to do.

Not sure what to do next to try and remediate this issue with the openSUSE container. I got the template from wiki.openvz.org/Download/template/precreated the CentOS 6 one works.
 
well just take a look at the error message you posted.

Error message: Could not resolve host: download.opensuse.org (Could not contact DNS servers)

that container doesnt have network connectivity / missing network settings / no/wrong DNS server in /etc/resolv.conf or something of that magnitude.
 
I am starting to figure out this container stuff :confused: I added information in the /etc/resolv.conf and was able to get the repos to work. I did have to add a new repo to get upstart so I added this one for anyone who might also encounter this issue. Here is what I did.

Code:
cd /var/lib/vz/root
vzctl mount XXX
cd XXX
chroot .

Added this repo for upstart
zypper ar http://download.opensuse.org/repositories/home:/nick_at_seakr:/misc/openSUSE_12.1/ upstart

Encountered this bug and did the following:
http://lists.opensuse.org/opensuse-bugs/2012-01/msg05885.html

zypper in upstart selecting solution 1
Solution 1: Following actions will be done:
  deinstallation of systemd-sysvinit-1:37-3.4.1.ps.1.x86_64
  deinstallation of sysvinit-2.88+-66.58.2.x86_64

Once I did all that I was able to start my container. Thanks mo_ for the help. Now I am off to see about creating a custom SUSE container. :D
 
Thanks but how do I install this patch that is in your link you posted?
 
Before putting it into any production system I would wait for the proxmox team to update the vzctl release for proxmox.
That said you can build the debian package yourself by following this guide: https://git.proxmox.com/?p=pve-common.git;a=blob_plain;f=README.dev;hb=HEAD
When you get to step 3 it is enough to clone the vzctl.git repository. Use "git apply" to apply the patch. Afterwards use "make dinstall" to build and install the patched vzctl.

/Bo
 
Hello,

My server was up for 3 month! now, today when I was installing bugzilla, the CT virtual machine suddenly stopped! When I click on start, it says
Starting container ...
Container is mounted
Setting CPU units: 1000
Setting CPUs: 1
Configure veth devices: veth101.0
Adding interface veth101.0 to bridge vmbr0 on CT0 for CT101
Killing container ...
Unable to start init, probably incorrect template
Container start failed
Container was stopped
Container is unmounted
TASK ERROR: command 'vzctl start 101' failed: exit code 47

Can anyone help? everything is down because of this:(
 
hm you should probably create a new thread for this.

But before doing that you should check, whether the /sbin/init file (of the container!) is still there and executable. You can check for that in /var/lib/vz/private/101/ (sbin/init), assuming you don't store your containers in a different location. If its not, you could copy it from a different container with the same linux distribution or from the template you used to create the container with
 
The container's files are stored in /var/lib/vz/private/101/ if you did not chance it.
There you need to check if the sbin/init file is still there and executable. This file is required
 
Thanks. I checked and saw that the sbin is missing in ct 101 so I entered to CT 100, another ct I created before, I copied the sbin and paste like this:
cp -r /var/lib/vz/private/100/sbin /var/lib/vz/private/101but again it is not starting. I also checked init.conf file there is no init too
when I do this :
cd /var/lib/vz/private/100/sbin/init
it says no file or dir and when I do this:
nano /var/lib/vz/private/100/sbin/init

an empty file shows up so the sbin I copy and past to the new one is not ok? but the CT 100 is working good
hm you should probably create a new thread for this.

But before doing that you should check, whether the /sbin/init file (of the container!) is still there and executable. You can check for that in /var/lib/vz/private/101/ (sbin/init), assuming you don't store your containers in a different location. If its not, you could copy it from a different container with the same linux distribution or from the template you used to create the container with
 
Thanks. I checked and saw that the sbin is missing in ct 101 so I entered to CT 100, another ct I created before, I copied the sbin and paste like this:
cp -r /var/lib/vz/private/100/sbin /var/lib/vz/private/101

This looks okay to me, but you can maybe try to directly copy only init: cp /var/lib/vz/private/100/sbin/init /var/lib/vz/private/101/sbin/

The errors you posted tell me that the /sbin/init file is not there.
but again it is not starting. I also checked init.conf file there is no init too
when I do this :
cd /var/lib/vz/private/100/sbin/init
that won't work, init is a file, not a folder ;)
it says no file or dir and when I do this:
nano /var/lib/vz/private/100/sbin/init
init is a binary file. Opening it is not exactly harmful, but it may or may not mess up the settings of your terminal/ssh session, so use "stat" instead of nano to check if a file is present to be on the safe side
 
Thanks so much I tried this too cp /var/lib/vz/private/100/sbin/init /var/lib/vz/private/101/sbin

And I got this error:
cannot create regular file ' /var/lib/vz/private/101/sbin/iit' :Text file busy

This looks okay to me, but you can maybe try to directly copy only init: cp /var/lib/vz/private/100/sbin/init /var/lib/vz/private/101/sbin/

The errors you posted tell me that the /sbin/init file is not there.
that won't work, init is a file, not a folder ;)
init is a binary file. Opening it is not exactly harmful, but it may or may not mess up the settings of your terminal/ssh session, so use "stat" instead of nano to check if a file is present to be on the safe side
 
Never seen that. Seems to be an ancient error message from antique unix systems meaning that the file in question is already opened by another process. You can use lsof to figure out which. But that also most likely means that the file is actually still present, otherwise it couldn't be in use.

I'm not sure how to say this without sounding rude, but: All of this has been google research though, which you should have done yourself in the first place actually
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!