All my vms are gone

Yakov

Member
Nov 24, 2021
5
0
6
I accidentally forcefully shut-down my server and the proxmox ui stopped showing up. I followed some guides on the forum and that made it worse. The database file is gone. I'm just trying to backup the disks.

I can access /dev/pve when dualbooting on Ubuntu, When I boot into proxmox, there are no vms showing up anymore.

(although it looks like the disks are still intact when on Ubuntu running fdisk -l or lsblk -f)

Please help!
 
is the pve-cluster service running ?

it should mount /etc/pve , where the vm config are located.

(the true database is /var/lib/pve-cluster/config.db , the the pve-cluster service expose the content in /etc/pve)
 
is the pve-cluster service running ?

it should mount /etc/pve , where the vm config are located.

(the true database is /var/lib/pve-cluster/config.db , the the pve-cluster service expose the content in /etc/pve)
It is running, I found a forum post and it told me to delete that DB file.
 
I found a forum post and it told me to delete that DB file.
Well, if you deleted the backing database where most of PVE's configuration files, including VM/CT ones are saved it would explain that those VMs are gone.. That .db file should never be deleted without clarifying with a PVE expert that it actually is required, and even then one does not just delete it, but creates a backup and renames it to another filename, like <old>.bak.

If you have no backups you need to re-create the configuration files, good thing is that you did not remove the disks so can all still be recovered.

Check the list of volumes with pvesm list STORAGE --content images for VMs and pvesm list STORAGE --content rootdir for container.
Create new VMs ideally with the same VMID as then you could re-attach the disks by running qm rescan --dryrun
(note, I added dryrun explicitly to make it safer. Drop that parameter to actually do the actions).
 
Last edited:
I am currently trying to help @Yakov but.
Code:
pvesm list tom-nasi --content images
didn't work. Here are some screenshots.
unknown.png

unknown.png
 
I am currently trying to help @Yakov but.
Code:
pvesm list tom-nasi --content images
didn't work. Here are some screenshots.
unknown.png

unknown.png
I think you need to re-add a lvm storage "tom-nasi" in /etc/pve/storage.cfg. (as it's gone too with the removal of /var/lib/pve-cluster/config.db)
 
I think you need to re-add a lvm storage "tom-nasi" in /etc/pve/storage.cfg. (as it's gone too with the removal of /var/lib/pve-cluster/config.db)
That file doesn't exist for some reason. (I have no idea what the file structure looks like)1637823532493.png
 
Hi,
try to re-create the file /etc/pve/storage.cfg with the following contents (default for an LVM-based installation):
Code:
dir: local
        path /var/lib/vz
        content vztmpl,iso,backup

lvmthin: local-lvm
        thinpool data
        vgname pve
        content images,rootdir
If you had any more storages configured, just add them via UI or pvesm afterwards.
 
Hi,
try to re-create the file /etc/pve/storage.cfg with the following contents (default for an LVM-based installation):
Code:
dir: local
        path /var/lib/vz
        content vztmpl,iso,backup

lvmthin: local-lvm
        thinpool data
        vgname pve
        content images,rootdir
If you had any more storages configured, just add them via UI or pvesm afterwards.
1637859723401.png
Alright the images are all showing now. Thanks.
 

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!