Proxmox root drive failed - Want to recreate containers with raw files. Possible?

baretomas

New Member
Aug 13, 2019
15
0
1
44
As the subject says:
My crappy SSD I used to run proxmox failed completely last night. Luckily I didnt have any data on there, but ofc I hadn't backed up anything either. So now I installed proxmox on a different drive and want to recreate my containers and VMs from the RAW files that is left.

I tried to create a container with the same ID and copy my old RAW file over the new. But the container won't start. I can't remember the exact config for the container, so I assume that might be it? Can anyone tell what settings is important, and how to circumvent them? Does amount of CPU, RAM etc have to be exactly right? What about mount points?

I've tried to rescue the old SSD drive, by doing a DD image of it and using testdisk on the image. Doesn't really help as testdisk complains it doesn't support LVM partitions or something like that. fsck fails completely too complaining about superblock. I'm adding this part so if its possible to extract the config files from the SSD drive image somehow then that would be great also, but I don't know how to. Is there a surefire way to browse a DD image and find the conf files? That would be much appreciated.

Or: Is there an alternative route to recreate my containers from the RAW files I haven't found myself?

Any help much appreciated...! I have months of data on there I want back... :( (yes I will set up backup routines. I promise ... and never use SSD as system disk again)
 
Last edited:
and never use SSD as system disk again

In your case, you need RAID, nothing else will prevent a complete disk failure (SSD or HDD) than redundancy. Backup is just another layer of security that has to be on another computer, best also on different disks or redundant disks.

I've tried to rescue the old SSD drive, by doing a DD image of it and using testdisk on the image.

That is good. The config file is located in an SQLite database (/var/lib/pve-cluster/config.db) and it stores text, so you may be able to just grep for it. I'd do something like this:

Code:
grep --text --before-context=100 --after-context=100 rootfs /path/to/your/dded/image > findings

After that you need to open the findings, which may most probably contain binary data, so it is not a text file. Now you can extract the config and try to fix your containers.
 
Thanks for input. This rig, its 5 actually, are just old computers I set up to play with, but ofc as any temporary system in the world: it always turns into permanent! ;D
When I have the money, Ill make sure Ill invest in a proper raid setup for sure.

I never managed to read the image from the DD properly, but I was lucky and found a few months old backup of my containers. When I copied the raw files over the newly restored backup, I was back in action... *phew*

Thanks again.
 

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!