vzctl restore fails on plain ubuntu template

jmartin

Member
Mar 17, 2009
40
0
6
Created a new plain ubuntu hardy template using dab:
excerpt from dab.conf:
Code:
Suite: hardy
Name: plain-hardy-8.04
Architecture: amd64
dab init
dab bootstrap
dab finalize

created VM from this template.

VM starts fine.
vzctl chkpnt works without problems.

vzctl restore fails to restore the VM:
Code:
Restoring container ...
Starting container ...
Container is mounted
        undump...
Adding IP address(es): 10.100.100.140
Setting CPU units: 1000
Setting CPUs: 1
Configure meminfo: 262144
Error: undump failed: Input/output error
Restoring failed:
Error: can't open file /dev/ptyp0
Error: rst_file: -5 31600
Error: rst_files: -5
Error: make_baby: -5
Error: rst_clone_children
Container start failed
Stopping container ...
Container was stopped
Container is unmounted
Any hints what I might be doing wrong?
 
Why do you get an IO Error?

I wish I knew... It's a brand new proxmox installation, all updates installed, plenty of space on the hard disks.

What commands do you use exactly?

Code:
dab init
dab bootstrap
dab finalize
mv <the-template>.tar.gz /var/lib/vz/template/cache/
... create and start the machine in web interface ...
vzctl chkpnt 105
vzctl restore 105
 
I found a workaround.

lsof /dev/ptyp0 shows that /dev/ptyp0 is opened by the init-logger process. If I kill the process, chkpointing and restoring work with my templates.

init-logger also runs in the debian template and lsof also shows it as having /dev/ptyp0 open - but for some reason in a plain debian template that doesn't hurt.
 
I have just added this workaround to the bug report:

For those who are waiting this to be fixed and if you do not care about init logging (logs from init normally goes to /var/log/init.log thanks to init-logger),
you may want to disable init-logging. You may do so globally in vz.conf, or locally in each CT, by adding/changing:

INITLOG=no

This will not start init-logger in your CT at all, and live migration will work like a charm. Until you need to check init logs, this does not have a real
impact on your VM and is quite safe.

Please note that putting INITLOG=no in the config of a given CT will break Proxmox front-end (at least in 1.3). So for Proxmox, I suggest to change the global setting in vz.conf, and if for debugging, you need logging in a given CT, add temporarily the setting in the given CT (restart required).

A good improvement for Proxmox would be to have a checkbox in each CT for setting that. And, also it would be nice to support "unsupported" parameters in someway, without breaking the interface.
 
I found a workaround.

lsof /dev/ptyp0 shows that /dev/ptyp0 is opened by the init-logger process. If I kill the process, chkpointing and restoring work with my templates.

init-logger also runs in the debian template and lsof also shows it as having /dev/ptyp0 open - but for some reason in a plain debian template that doesn't hurt.


Hi, thanx for the tip. That helpes me to live-migrate openvz container.

Regards, Valle
 
Last edited: