Recovering Server from Disks

vmslinger

Active Member
Apr 24, 2019
5
1
43
45
I do have a server with a dead motherboard (will not boot). Luckily, the disks are fine. There are two disk, and I am able to mount both on another server. I am able to see a swap and a root LV on the first disk, and the "root" disk has the Proxmox file system. The disk also contains a "data" LV. The second disk only contains a "data" LV.

How do I copy my container and VM images from these disks to a second server I have running? I do have the container and VM configuration files from the "root" partition.

I do have a second proxmox server and the disk are recognized if connected via a USB adapter, but I do not see the VM images even after trying to configure them as storage.
 
Last edited:
So you have NO full-VM/LXC backups that can be restored?

https://github.com/kneutron/ansitest/blob/master/proxmox/proxmox-recover-vm-disks-without-backup.sh

If you have another proxmox server that can be temporarily used for recovery ( ideally you would be setting up a new dedicated server for this: )

Fresh install PVE to a new disk, with no other disks connected**. You can use e.g. a Samsung T7 for this. NOTE the pve installer will wipe the target disk(s) for boot/root. Shutdown.

** The reason for this is to have NO vmid conflicts from the old server trying to compete with an existing proxmox install.

Move/migrate the storage disks from the old server to the new one. Leave the server's "regular" disks disconnected - this is important.

Boot from the T7. Define storage as applicable in Datacenter / Storage so it "sees" the lvm-thin and any ZFS pools from the old server config. Recreate network settings as-needed, and only to the point where everything runs.

> I do have the container and VM configuration files from the "root" partition

At least you have that. Copy the config files to the appropriate dirs in /etc/pve on the new / temporary install and then run the script above. READ THE NOTES in the script BEFORE running.

If/When you have everything up and running again, setup Proxmox Backup Server on separate hardware (take advantage of dedup) and DO A PROPER BACKUP of all VM/LXC. Then make a note to schedule regular recurring backup jobs.

After all backups have completed, you can shutdown and reboot the original proxmox server without the T7, with its original disks in place - and WITHOUT the dead server's storage, then restore the VM/LXCs you just backed up from PBS to new VMids.

PROTIP - install webmin (runs on port 10000) on the T7, and keep it handy as a portable PVE recovery environment. WeLees for GUI LVM management may also be worth looking into.

Going forward, you need a proper DR plan, and regular full backups to CYA. PBS will run on e.g. an old quad-core laptop with 4-8GB RAM and 1-2TB SSD. There is literally NO reason not to implement it, even for homelab.

https://github.com/kneutron/ansitest/tree/master/proxmox

Look into the bkpcrit script, point it to separate disk / NAS, run it nightly in cron. Lots of other good admin scripts in that repo.