How to upgrade openvz machine Debian 4.0 -> Debian 6.0

nick

Renowned Member
Mar 28, 2007
364
1
83
Hi all,

I have some OpenVZ machines based on Debian 4.0 template and I need to know if and how I can upgrade them to version 5 or 6 of debian. Is this possible?

Thank you!
 
yes, consult the Debian Docu. But make a backup first.
 
I look on Debian doc but all available links for sources.list are not available anymore. I think I need to apply some manual updates.

Anyone make a such updates?
 
there are thousands of upgrade docs for Debian in the web, just google for them.
 
I try to update using other sources and I update to 6.0.3 but with many errors on Apache si PHP. Now, I restore from backup and try using the official sources. All the time I receive errors when I try aptitude update:

W: GPG error: http://security.debian.org stable/updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA
W: GPG error: http://http.us.debian.org stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?


I try to update key but nothing. Any ideea?
 
the error message is clear, you do not got the key installed.

but note, this is just a standard Debian upgrade issue, so you cannot expect too much help here - this is a Proxmox VE support forum, not a generic Debian help forum.
 
I know...I ask because I never upgrade a openVZ machine. Normal when I need an upgrade I create a new machine from template and move all settings and files to the new server.

I don't know if is better to continue this way or to try an upgrade to the existing server.
 
there are more or less no big differences if your run Debian on physical hardware or as container, the upgrade process is the same.

which is better? depends. if you are familiar with Debian upgrades its not that big work. if not, teach yourself :-)

I do always upgrades my Debian containers as soon as new stable Debian versions are available.
 
ok...this is what I want to hear! I will try to upgrade to the stable version step by step using also a backup all the time!
 
My understanding is that Debian only supports upgrading from one version to the next.

So you would likely have best success upgrading from 4.0 to 5.0 (lenny)
Then from lenny to 6.0 (squeeze)

If you get to lenny ok here is how I upgraded my lenny machines to squeeze:
Code:
Make /etc/apt/sources.list look like this:
deb http://ftp.us.debian.org/debian/ squeeze main
deb-src http://ftp.us.debian.org/debian/ squeeze main

deb http://security.debian.org/ squeeze/updates main
deb-src http://security.debian.org/ squeeze/updates main

deb http://ftp.debian.org/debian squeeze-updates main
deb-src http://ftp.us.debian.org/debian/ squeeze-updates main

Run these commands to upgrade:
apt-get update
apt-get install dpkg aptitude apt
aptitude dist-upgrade
 
Last edited:
I would first do an upgrade of etch to the latest status. Then i would do the way written on post over me. The other problem is that there are so much changes in configuration files that it can be the better way to setup the machine with squeeze. But this depends on the installed software. Some packages can also be not available in squeeze anymore. First look which packages are installed and which are available.