Rebooting OpenVZ containers

Deafboy

Renowned Member
Jan 25, 2010
12
1
68
Hello,
First of all I have to say, that proxmox is wonderfull piece of software.

So where is the problem...
If I create new virtual machine with template downloaded in proxmox web admin, everything is fine, and i can reboot vm in console.
But if I download template by myself from OpenVZ wiki, and import it in proxmox web admin, after "reboot", or "shutdown -r now" vm stays in status "mounted" and I have to start it manualy.

I have tried to resolve this problem on my own, but location of config files differs from OpenVZ documentation.
I will be happy if someone tell me how to solve the problem.

Thanks.
 
Normally the containers should be started by a cronjob if their status is "mounted".

This can take sometimes 1-2 minutes.
Normally there should be no difference between official Proxmox-Templates and OpenVZ templates.
 
I have changed the cron entry to start rebooted vm every minute.
No change... ( I have waited more then 1-2 minutes, now it is about half an hour ;) )
I know there should not be a difference, but there is.
 
I have changed the cron entry to start rebooted vm every minute.
No change... ( I have waited more then 1-2 minutes, now it is about half an hour ;) )
I know there should not be a difference, but there is.

I will try to reproduce the issue here.

  • what template do you use (download link)?
  • what Proxmox VE version do you use (post the output 'pveversion -v')
 
Code:
templar:/# pveversion -v
pve-manager: 1.4-9 (pve-manager/1.4/4390)
qemu-server: 1.1-6
pve-kernel: 2.6.24-16
pve-qemu-kvm: 0.11.0-2
pve-firmware: 1
vncterm: 0.9-2
vzctl: 3.0.23-1pve3
vzdump: 1.2-3
vzprocps: 2.0.11-1dso2
vzquota: 3.0.11-1
templar:/#
I have tried templates from this site:
http://wiki.openvz.org/Download/template/precreated


arch-0.8-x86_64-minimal.tar.gz
slackware-12.0-i386-minimal.tar.gz

After download, I have renamed it to correct form, uploaded, and everything was fine, expect rebooting.

I have also tried debian and fedora from proxmox web administration, where reboot working fine
 
Hi tom, please tell me that yout have some good news for me. Have you successfully reproduced the error?
 
Hi tom, please tell me that yout have some good news for me. Have you successfully reproduced the error?

I tried the slackware template, also not rebooting. I did not investigate further, its from minor quality - even the syslog from the creator is inside ...
As most templates does not have this issue, I think the issue is on the template side.

Try contacting the template creator, maybe he knows more.
 
Resolved.
If I want to let OpenVZ know that I want to reboot a container, I have to edit init script of vm, to write /reboot file before shutdown.
So yes, it was bad template. But... why didn't anyone told me this ? :D It is SO easy! Easy to check, easy to repair vm, easy to repair whole template!
 
Resolved.
If I want to let OpenVZ know that I want to reboot a container, I have to edit init script of vm, to write /reboot file before shutdown.
So yes, it was bad template. But... why didn't anyone told me this ? :D It is SO easy! Easy to check, easy to repair vm, easy to repair whole template!

Maybe you think it is easy, but it is not. Normally, the init script to write /reboot is automatically created. So you should find out why that does not work.
 
Hi all, sorry to up this thread but I have exactly the same problem :(
The VMs gets stuck at "mounted" and don't reboot
I am using the Debian 6.0 official template (downloaded from the web UI), and it don't create the reboot file (I tested, when I create the file myself, that work),
Are all the templates contaminated with this bug ? (Missing "reboot" file when using "reboot")

Thanks :)
 
all our templates reboots without problems, there is only one which does not - Debian Squeeze (Debian testing). But we will fix it soon.
 
Same problem here - affected are these templates:
debian 5.0 - amd64
debian 6.0 - amd64
Can anybody post a link to the (openvz?) docs where the "reboot file" is explained?
 
Same problem here - affected are these templates:
debian 5.0 - amd64
debian 6.0 - amd64
Can anybody post a link to the (openvz?) docs where the "reboot file" is explained?

Please can you post a bug report to the OpenVZ bug tracker?
 
Ok, sorry, after waiting _more_ than 2 minutes the status changes to "running".

Anyhow it would be great to know where and how this behaviour is configured.
 
working also with Debian 6?

take a look into /etc/vz/cron/vz
 
Now after a fresh install of Debian-6-amd64 for testing I found that it does _not_ switch into "running" state on its own.

Thanks for the path, maybe this could be mentioned somewhere on pve.proxmox.com/wiki.
 
Now after a fresh install of Debian-6-amd64 for testing I found that it does _not_ switch into "running" state on its own.

Thanks for the path, maybe this could be mentioned somewhere on pve.proxmox.com/wiki.

you can add a note in the wiki, its open for everybody - just do it.
 
Now after a fresh install of Debian-6-amd64 for testing I found that it does _not_ switch into "running" state on its own.

I've just put a "touch /reboot" in /etc/init.d/reboot (function do_stop())

It works, but the next update of the script will wipe it away... what's the best solution ?

regards - Flo.
 

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!