PVE installation not bootable anymore, recover of ZFS based VM possible?

dan3o3

New Member
Nov 21, 2024
3
0
1
Hi,

after some broken apt upgrades the installation is not bootable anymore (8.0). Is there any way to rescue a ZFS based VM stored on a local ssd?
I fear a reinstallation cause this will erase the ssd fully a repair installation also didn't succeed (unable to find the existing installation).

A possible path (the only way i saw yet) is to use a Linux boot cd (Ubuntu in my case) but I have no idea how to deal with the ZFS commands to get the data from the VM.

Hope someone can help here.

Regards,
Dan
 
https://github.com/nchevsky/systemrescue-zfs/releases

It's still on zfs 2.2.2, but you could also install PVE to a thumbdrive/microSD to get the latest version and build up a recovery environment with additional packages.

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

Lots of other good stuff in that repo ;-)

Once you get everything back up and running, setup a proxmox backup server on an old laptop or similar. Mine is an old quad-core with 8GB RAM and 1TB SSD.
 
https://github.com/nchevsky/systemrescue-zfs/releases

It's still on zfs 2.2.2, but you could also install PVE to a thumbdrive/microSD to get the latest version and build up a recovery environment with additional packages.

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

Lots of other good stuff in that repo ;-)

Once you get everything back up and running, setup a proxmox backup server on an old laptop or similar. Mine is an old quad-core with 8GB RAM and 1TB SSD.
Many Thanks for your help here!

Unfortunatly I am still unsure how to backup from the ZFS partition, you mentioned this rescue disk but can you explain how to backup the vm after booting it?

Thanks again,
Dan
 
Once you boot into rescue environment:

' zpool import -a -f -d /dev/disk-by-id '

Look at the source code of the script I posted, there's a link to a forum post in there

If you boot into a "portable PVE" you can define the ZFS as usable Storage, create a VM with the same number as the disk, run the script, attach disk to VM, and use PVE's builtin backup/restore to Samba/NFS share or external media.

Others should be able to jump in with more details
 
Last edited:
If I understood correctly this script/forum stuff wants to fresh install PVE to another disk and then import the existing zfs stuff into the new PVE setup. In that case the rescue disk would not help at all here since you need the running PVE instance from another disc.

What i had in mind is to backup the vm from ZFS to a file which can be imported after freshly install a PVE to the existing ssd (killing all before data).

Maybe https://github.com/kneutron/ansites...ke-a-file-backed-backup-of-proxmox-rpool.docx is the correct way for this?

Dan
 

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!