Recover Directories and VMs

suiciniv

New Member
Aug 30, 2021
2
1
1
37
After having corrupted files on the proxmox SSD, I needed to reinstall. I had an Images directory on a hd, and VMs on other SSDs, is it possible to "reassemble" (without losing) the structure I had? I performed the mount through mnt /dev/sd*1 /mnt/pve/images (as it was before) and mount -a, but it does not appear in PVE. Thank you.
 
Hi,
do you have a backup of /etc/pve? If not, you need to re-create the storage configuration Datacenter > Storage > Add with the correct type and path. And then you need to re-create the VM configuration files. Easy way is to not create any disk during VM creation, but use an ID that matches the existing disks. Then run qm rescan --vmid <ID> to make the existing disks show up as unused, attach the drives and add the boot drive to the Boot Order setting.
 
Thanks fiona! I didn't have a backup. My friend helped me with this.. he created the storage, like you said and he gave another ID to VM, so, he edited the ID.conf and changed for a new VM.. it works. Thank you for your support.
 
Last edited:
  • Like
Reactions: Kingneutron
he created the storage, like you said and he gave another ID to VM,
he edited the ID.conf and changed for a new VM..
Would it be possible to give the syntax of what he added to file ID.conf and did he create a new file? I am unable to find ID.conf anywhere on my pve 8.2.2. I am able to locate idmapd.conf, but it does not contain any lines related to mount points.
 
Hi,
Would it be possible to give the syntax of what he added to file ID.conf and did he create a new file? I am unable to find ID.conf anywhere on my pve 8.2.2. I am able to locate idmapd.conf, but it does not contain any lines related to mount points.
there is no verbatim ID.conf, but each guest has a config with the actual number, e.g. /etc/pve/lxc/123.conf or /etc/pve/qemu-server/123.conf. If you do not have backups of your guest configuration files, you need to create them newly (by creating new "dummy" guests) and then you can add back the disks. See my post above.
 
  • Like
Reactions: justinclift

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!