upgraded debian 7 to 8. perl missing. vzdump fails.

Chris_C

New Member
Jul 28, 2012
12
0
1
I upgraded the host node, from debian 7 (wheezy) to 8 (jessie).
Debian 7 has been running proxmox 3.x for some time, with 2-3 openvz containers.
I upgraded to debian 8.
Now apt in debian jessie 8 wants to upgrade to proxmox 4.x
So I consulted the guide here:
https://pve.proxmox.com/wiki/Convert_OpenVZ_to_LXC
And i learn that I did the upgrade of the operating system too early.
Supposedly, you take backups of the containers, manually uninstall proxmox 3.x, then upgrade the operating system to debian 8.
The new proxmox 4.x deb package cannot upgrade itself and backup your containers and convert your containers to lxc format all for you....
Now the debian 8 operating system working, but perl is not fully running!
perl is missing some includes.
vzdump won't run!
pvesm won't run!
vzctl is running fine and containers can start and stop fine.
I'm looking for suggestion on how to safely backup the stopped containers, from the command line, without perl, without vzdump, only running basic system commands.
Can you just tar/gz the container folder in /var/lib/vz/private ???
Or, is there a php version of vzdump that is able to run from the command line?
Any suggestions, to fix the system as it is currently, with minimal effort, are welcome.

Code:
# pvesm status
Can't locate File/Path.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/
5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/per
l/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /usr/sbin/pvesm line
7.
BEGIN failed--compilation aborted at /usr/sbin/pvesm line 7.
#

Code:
# vzdump 114 --storage local
Can't locate File/Basename.pm in @INC (@INC contains: /etc/perl /usr/local/lib/p
erl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib
/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl) at /usr/share/perl5/PV
E/SafeSyslog.pm line 5.
BEGIN failed--compilation aborted at /usr/share/perl5/PVE/SafeSyslog.pm line 5.
Compilation failed in require at /usr/bin/vzdump line 4.
BEGIN failed--compilation aborted at /usr/bin/vzdump line 4.
#

Code:
# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
clvm : Depends: libdlm3 but it is not installed
init-system-helpers : Depends: perl-base (>= 5.20.1-3) but 5.14.2-21+deb7u4 is
installed
libanyevent-perl : Depends: perlapi-5.20.0
                    Recommends: libasync-interrupt-perl but it is not installed
                    Recommends: libguard-perl but it is not installed
libapache2-mod-perl2 : Depends: perlapi-5.20.2
                        Recommends: libbsd-resource-perl but it is not installed
                        Recommends: libapache2-reload-perl but it is not install
ed
libapache2-request-perl : Depends: perlapi-5.20.0
libapparmor-perl : Depends: perl-base (>= 5.20.1-3) but 5.14.2-21+deb7u4 is ins
talled
                    Depends: perlapi-5.20.1
libcommon-sense-perl : Depends: perlapi-5.20.2
libcrypt-ssleay-perl : Depends: perlapi-5.20.0
libperl5.20 : Depends: perl-base (= 5.20.2-3+deb8u6) but 5.14.2-21+deb7u4 is in
stalled
librados2-perl : Depends: perlapi-5.20.0
libterm-readline-gnu-perl : Depends: perlapi-5.20.0
libtext-charwidth-perl : Depends: perl-base (>= 5.20.0-4) but 5.14.2-21+deb7u4
is installed
                          Depends: perlapi-5.20.0
lsof : Depends: libperl4-corelibs-perl but it is not installed or
                 perl (< 5.12.3-7) but 5.20.2-3+deb8u6 is installed
perl : Depends: perl-base (= 5.20.2-3+deb8u6) but 5.14.2-21+deb7u4 is installed
        Recommends: rename but it is not installed
perl-modules : Depends: perl-base (>= 5.20.2-3+deb8u6) but 5.14.2-21+deb7u4 is
installed
                Recommends: libarchive-extract-perl but it is not installed
                Recommends: libmodule-pluggable-perl but it is not installed
                Recommends: libpod-latex-perl but it is not installed
                Recommends: libterm-ui-perl but it is not installed
                Recommends: libtext-soundex-perl but it is not installed
                Recommends: libcgi-pm-perl but it is not installed
                Recommends: libmodule-build-perl but it is not installed
                Recommends: libpackage-constants-perl but it is not installed
pve-cluster : Depends: perlapi-5.20.0
python : Depends: python-minimal (= 2.7.3-4+deb7u1) but 2.7.9-1 is installed
update-inetd : Depends: libfile-temp-perl
W: Duplicate sources.list entry http://security.debian.org/ jessie/updates/main
amd64 Packages (/var/lib/apt/lists/security.debian.org_dists_jessie_updates_main
_binary-amd64_Packages)
W: Duplicate sources.list entry http://security.debian.org/ jessie/updates/contr
ib amd64 Packages (/var/lib/apt/lists/security.debian.org_dists_jessie_updates_c
ontrib_binary-amd64_Packages)
W: You may want to run apt-get update to correct these problems
E: Unmet dependencies. Try using -f.
#

Code:
# apt-get -f upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  proxmox-ve-2.6.32 pve-manager redhat-cluster-pve resource-agents-pve
The following NEW packages will be installed:
  criu libdlm3 libio-socket-inet6-perl libperl4-corelibs-perl libprotobuf9
  libsocket6-perl lxc-pve lxcfs netcat6 pve-container pve-docs python-ipaddr
  python-protobuf
The following packages have been kept back:
  aptitude aptitude-common base-passwd bind9-host cifs-utils curl db5.1-util
  dnsutils fakeroot gettext gir1.2-gdkpixbuf-2.0 gir1.2-gtk-3.0
  gir1.2-pango-1.0 gnuplot gnuplot-x11 ipset isc-dhcp-client isc-dhcp-common
  libasound2 libasprintf0c2 libblas3 libcurl3 libcurl3-gnutls
  libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgettextpo0 libglade2-0
  libgoogle-perftools4 libgpgme11 libgtk-3-0 libgtk-3-bin libgtk-3-common
  libgtk2.0-0 libgtk2.0-bin libhttp-message-perl libjasper1 libnet-ldap-perl
  libnss-winbind libosmesa6 libpam-winbind libpango1.0-0 libpve-common-perl
  libpve-storage-perl librrd4 libsasl2-2 libtcmalloc-minimal4 libv4l-0
  libv4lconvert0 libvncserver0 libwbclient0 mutt nmap openssh-client
  openssh-server policykit-1 procps pve-libspice-server1 pve-qemu-kvm
  python-glade2 python-gtk2 python-oauthlib python-openssl python-pycurl
  python-requests python-soappy rrdcached samba-common samba-common-bin
  smbclient ssh sysvinit texinfo ttf-dejavu ttf-dejavu-core ttf-dejavu-extra
  vzctl wget winbind
The following packages will be upgraded:
  apt apt-transport-https apt-utils at bsdutils build-essential cron dbus
  dstat gdisk gir1.2-atk-1.0 glusterfs-client glusterfs-common initramfs-tools
  iputils-arping iputils-ping ksm-control-daemon libalgorithm-diff-xs-perl
  libapt-pkg-perl libapt-pkg4.12 libatk1.0-0 libatk1.0-data libauthen-pam-perl
  libcrypt-openssl-bignum-perl libcrypt-openssl-random-perl
  libcrypt-openssl-rsa-perl libcups2 libcwidget3 libdevmapper-event1.02.1
  libept1.4.12 libev-perl libfile-fcntllock-perl libfile-sync-perl
  libfilesys-df-perl libgnutls-openssl27 libgudev-1.0-0 libhtml-parser-perl
  libio-socket-ssl-perl libjson-perl libjson-xs-perl libjson0 libldap-2.4-2
  liblinux-inotify2-perl liblocale-gettext-perl liblvm2app2.2 libnet-dns-perl
  libnet-ssleay-perl libpam-modules libpam-modules-bin libpam0g libparted2
  libpolkit-agent-1-0 libpolkit-backend-1-0 libpolkit-gobject-1-0 libpulse0
  librrds-perl libsemanage-common libsemanage1 libsnmp-base libsocket-perl
  libssh2-1 libtext-iconv-perl libusb-1.0-0 libuuid-perl libxapian22
  libxml-parser-perl libxslt1.1 login lynx lynx-cur parted passwd perl-base
  postfix pve-firewall python python-apt python-chardet python-crypto
  python-debian python-gevent python-gobject python-gobject-2 python-numpy
  python-pexpect python-pkg-resources python-reportbug python-six python-suds
  qemu-server reportbug shared-mime-info smartmontools util-linux uuid-runtime
  vlan vncterm xsltproc
98 upgraded, 13 newly installed, 4 to remove and 78 not upgraded.
107 not fully installed or removed.
Need to get 36.5 kB/32.8 MB of archives.
After this operation, 10.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? n

Any suggestion to get vzdump to work?? It says missing File/Basename.pm ....
 
Last edited:
You can tar.gz the OpenVZ private data and try to convert to LXC manually - or restore to another Proxmox VE 3.x and then make backups.

BTW:
Why on earth are you upgrading your system without backups or without even considering reading the documentation on this before upgrading?
 
  • Like
Reactions: Chris_C
You can tar.gz the OpenVZ private data and try to convert to LXC manually - or restore to another Proxmox VE 3.x and then make backups.

BTW:
Why on earth are you upgrading your system without backups or without even considering reading the documentation on this before upgrading?
@LnxBill thanks for the tips those are good ones to try.
Upgraded to debian 8 jessie OS while proxmox 3 was still fully installed, before reading the proxmox documentation, because all previous upgrades of proxmox packages were very automatic.

Suddenly jessie upgrade completes, reboot, and see massive list of packages to install and remove, including to remove, some important pve and proxmox named packages.

Continue yes no. No! Luckily, to search and read the proxmox docs on upgrade to 4.x.

Saying Yes at that point might've destroyed the openvz servers which contain some important data.

Proxmox upgrade docs say, the upgrade from proxmox 3 to 4 is a highly manual upgrade procedure, many major steps all of which must be followed correctly, if not, data loss may occur.

Would be great if this proxmox upgrade could be scripted so as to reduce or eliminate the possibilty of error.

Running a very simple proxmox setup, one machine only, a couple of openvz containers, no clustering, no fancy stuff, and one production openvz server inside it.
 

Read the upgrade guide only after the OS was upgraded to debian jessie 8. :eek:

It says, to run vzdump to backup the openvz containers, and THEN to upgrade of the OS. :(

In debian jessie 8, vzdump fails to run, due to a missing perl module, File/Basename.pm ...

Queston, is it possible to cleanly add the missing perl modules needed by vzdump, such as File/Basename.pm and any others, so that vzdump will run and properly backup the openvz containers, from inside the new debian jessie 8 OS?
 
Normally, the file is in perl-base in Jessie:

Code:
$ apt-file search File/Basename.pm
perl-base: /usr/share/perl/5.20.2/File/Basename.pm

Just install another Proxmox 3 machine somewhere (even inside Proxmox 4) and move your containers manually including the config in your current, broken /etc/pve/openvz and try to get the machines running there. Afterwards do a backup inside your Proxmox 3 and import in Proxmox 4.
 
Normally, the file is in perl-base in Jessie:

Code:
$ apt-file search File/Basename.pm
perl-base: /usr/share/perl/5.20.2/File/Basename.pm

Just install another Proxmox 3 machine somewhere (even inside Proxmox 4) and move your containers manually including the config in your current, broken /etc/pve/openvz and try to get the machines running there. Afterwards do a backup inside your Proxmox 3 and import in Proxmox 4.
Sounds good in theory but in practicality, is there's a massive catch.
There's only one physical bare metal server at the location, and that's the server which is running the broken proxmox 3 on debian jessie 8 as the host.
Inside proxmox 3 is the production openvz container which is about 250GB and still running OK.
Would rather not have to upload 250GB over the internet to another 3.x server machine just to run vzdump inside a non-broken proxmox 3 instance, if it were possible to do vzdump locally, inside the physical debian 8 jessie machine.

Is it possible?

Can you install a kvm machine inside the broken proxmox 3 debian 8 physical server?
Enter into that, and install in there debian 7 wheezy, onto which you install proxmox 3.x inside the kvm guest?
Then can you just locally copy over the 250GB container in /var/lib/vz/private/id from the production openvz container to the new perfect kvm running proxmox 3.x?
Then run vzdump inside the kvm holding the new proxmox 3.x instance, thereby creating a third copy of the 250GB instance?
Aand move that vzdump to the side, then blow away the kvm running 3.x, uninstall the broken 3.x running on the host physical node according to the 4.x upgrade guide, trying hard not to miss anything?
Finally convert the vzdump of the openvz container to LXC container as the guide details?

Suggestions or better shortcuts would be appreciated...
 
Yeah, one could do all you said, yet I don't know and probably nobody will, due to the uniqueness of your problem.

You could try to only migrate the OS part of your OpenVZ container, e.g. exclude the database of users or wherever you have all your data in that instance. Yet in the end, you have to try for yourself. Better try on a non-critical installation (e.g. another Proxmox VE) and not on your still somehow working Proxmox VE 3 on Jessie thing.
 

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!