Proxmox Update Broken Node

Jonpaulh

New Member
Nov 16, 2017
15
0
1
45
I have tried to upgrade my version of proxmox from 3.x to 4.4 and then to 5.1. Currently I get
/bin/sh: 1: /usr/share/proxmox-ve/pve-apt-hook: not found
When running apt-get install proxmox-ve

I have the following sources
Code:
root@vm03:~# cat /etc/apt/sources.list
#deb http://ftp.es.debian.org/debian stretch main contrib
deb http://ftp.debian.org/debian stretch main contrib
deb http://download.proxmox.com/debian/pve stretch pve-no-subscription
# security updates
deb http://security.debian.org stretch/updates main contrib

When running pveversion I get
Code:
Can't locate PVE/API2/APT.pm in @INC (you may need to install the PVE::API2::APT module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/bin/pveversion line 7.
BEGIN failed--compilation aborted at /usr/bin/pveversion line 7.

I tried everything I can find but cannot seem to get the node operational again.

I cannot find any information on how to reinstall proxmox-ve or get over the error
/bin/sh: 1: /usr/share/proxmox-ve/pve-apt-hook: not found
 
As far as I can see it has upgraded all the way up to 5.1. I then could not access the gui at which point I found I was missing the no subscription repository so I added this and ran
apt-get install proxmox-ve

I then would receive the errors
Code:
Can't locate PVE/API2/APT.pm in @INC (you may need to install the PVE::API2::APT module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/bin/pveversion line 7.
BEGIN failed--compilation aborted at /usr/bin/pveversion line 7.

When trying to start vm's I saw
Code:
detected old qemu-kvm binary

I have since removed proxmox-ve in an attempt to reinstall it, but I got the message
Code:
If you really you want to permanently remove 'proxmox-ve' from your system, run the following command touch '/please-remove-proxmox-ve'

I did this and now I cannot install again as I get
Code:
/bin/sh: 1: /usr/share/proxmox-ve/pve-apt-hook: not found
 
I believe I followed the guide as indicated but seemingly not. I seem to be having hard drive issue on the server and I suspect during the upgrade I had a problem due to this, at one pointed i booted up and it was stuck in read only, a fsck fixed this, but I still see some IO errors during boot so the server is clearly not long for this world.

I did manage to get the node back up at a previous point but then I started getting `detected old qemu-kvm binary` when starting VM's so I continued to try to fix and unfortunately seem to have gone backwards quite drastically.

I did backup all the VM's but my HD on PC died yesterday after these issues occurred, was not a good day for me or for hard drives yesterday. Whilst I had backups of the VM's elsewhere that were slightly older and I have successfully restored these on a new server, I am trying to get hold of one of the vm's that does some monitoring work, hence why I need the latest backup and why I am trying to get this server back up to do a quick vzdump.

The intention once/if I get the backup of the last vm is to bin the hd and repurpose the server as we are upgrading all our node servers to higher cpu/ram/ssd's etc.

If possible I would love to get the server at least to the point I can do the vzdump so i assume I need to fix the errors
Code:
Can't locate PVE/API2/APT.pm in @INC (you may need to install the PVE::API2::APT module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/bin/pveversion line 7.
BEGIN failed--compilation aborted at /usr/bin/pveversion line 7.

Any pointers would be much appreciated and certainly thank your for your time so far.
 
How is/was the storage configured? If you have the images in files, then you also can copy those image files and configure a VM on the new server, then replace the image.
 
How is/was the storage configured? If you have the images in files, then you also can copy those image files and configure a VM on the new server, then replace the image.
Apologies for the delayed response. I am able to access the server still and I can see disk image. These were configured as basic lvm storage disk.

Code:
root@PM02:/# find -name *137*
./usr/share/alsa/cards/ENS1371.conf
./usr/share/alsa/cards/ENS1370.conf
./usr/lib/x86_64-linux-gnu/gconv/IBM1371.so
./usr/lib/x86_64-linux-gnu/gconv/IBM1137.so
./lib/firmware/dvb-usb-it9137-01.fw
./lib/modules/4.13.13-2-pve/kernel/sound/pci/snd-ens1371.ko
./lib/modules/4.13.13-2-pve/kernel/sound/pci/snd-ens1370.ko
./lib/modules/4.13.13-2-pve/kernel/drivers/input/misc/mc13783-pwrbutton.ko
./lib/modules/4.13.13-2-pve/kernel/drivers/input/touchscreen/mc13783_ts.ko
./lib/modules/4.13.13-2-pve/kernel/drivers/hwmon/mc13783-adc.ko
./lib/modules/4.13.13-2-pve/kernel/drivers/leds/leds-mc13783.ko
./lib/modules/4.13.13-2-pve/kernel/drivers/regulator/mc13783-regulator.ko
./lib/modules/4.13.13-2-pve/kernel/drivers/rtc/rtc-ds1374.ko
./dev/pve/vm-137-disk-1
./dev/disk/by-id/dm-name-pve-vm--137--disk--1
./dev/mapper/pve-vm--137--disk--1
./proc/137
./proc/137/task/137
./proc/1748/map_files/7f0d69137000-7f0d6914c000
./proc/29810/map_files/55e2d607a000-55e2d6137000
./run/lock/qemu-server/lock-137.conf
./run/udev/links/\x2fpve\x2fvm-137-disk-1
./run/udev/links/\x2fmapper\x2fpve-vm--137--disk--1
./run/udev/links/\x2fdisk\x2fby-id\x2fdm-name-pve-vm--137--disk--1
./etc/ssl/certs/8c24b137.0
./etc/pve/nodes/PM02/qemu-server/137.conf
./var/lib/rrdcached/db/pve2-vm/137
./var/log/pve/tasks/7/UPID:PM02:000073E2:10FC622E:5B0BD0E7:qmcreate:137:root@pam:
./sys/devices/system/memory/memory137
./sys/devices/system/node/node0/memory137
./sys/bus/memory/devices/memory137


Can you confirm the directory of the disk image and presumably as you say I just setup a new VM on another server and then copy the disk image file from the old to the new replacing.
 
These were configured as basic lvm storage disk.
Then they are not lying around as files. You need to export them. You can do this, as long as the lvs are exposed, eg. with qemu-img or dd. This way you get a raw image (or something else with qemu-img) and could copy it to the new server.
 
  • Like
Reactions: Jonpaulh

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!