[SOLVED] Proxmox VE 8.1: Recover data from vm-103-disk-1.qcow2

ReD1991

New Member
Apr 9, 2024
21
2
3
Hi all,

I'm trying to recover all possible data, because my proxmox install became corrupted and I had to reinstall. I was able to reclaim all backups from the backup HDD and got the VMs up and running again.

I had/have a VM103 running debian 12 with CasaOS, I'm terrible with command based systems so I use CasaOS as a GUI for installing docker containers. My previous Proxmox install only had 1 SSD (for proxmox root and VMs) and 1 HDD (for backups and additional datastorage for CasaOS). As said I was able to mount the directory with the backups and get my VMs back up and running again. I now would also like to get this data back, it should be still somewhere on this HDD as it says 36% used. I just don't know how to

I mounted the drive with /etc/fstab to /mnt/HDD4TB.
Now when I ls /mnt/HDD4TB I get the following directories: dump, images, lost+found, private, snippets and template.

As I just mounted the HDD in VM103 with Hardware >> Add >> Hard Disk I don't know where to find the data, is it in one of these directories or somewhere else.

When I ls /mnt/HDD4TB/images I get 103, dump, images, private, snippets and template.
When I ls /mt/HDD4TB/images/103 I get a file called vm-103-disk-1.qcow2, I found online that the .qcow2 can be recovered into the vm-103-disk-1.RAW.

How to continue? Please let me know.


Kind regards,
ReD1991
 
I mounted the drive with /etc/fstab to /mnt/HDD4TB.
Now when I ls /mnt/HDD4TB I get the following directories: dump, images, lost+found, private, snippets and template.
This directory structure is indicative of previouse PVE using the disk as a storage device. The directories you listed are created automatically by PVE when you add the disk as storage to hypervisor.

Its unclear whether you mounted in the PVE or VM. Assuming it was PVE: since you mounted the disk via fstab, your next step should have been to add "Directory" type "Storage Pool" in PVE. Then, if your VM ID is still 103, you could have "qm disk rescan" to bring the "qcow" from images/103 into your VM hardware panel.

As I just mounted the HDD in VM103 with Hardware >> Add >> Hard Disk I don't know where to find the data, is it in one of these directories or somewhere else.
I would undo this before doing anything else.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: ReD1991
I would undo this before doing anything else.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
I meant that this is what I did in my previous build to add the disk to the Debian 12 VM, so before the reinstallation of proxmox. I have not done anything yet. I only found the location of the .qcow2 file.

So what I did today was rebuild the VM from the backup which was also stored on this HDD. Now I would like to get the data (when I was using it as a storage device) back to the VM so that I can have everything as it was.
 
Last edited:
I meant that this is what I did in my previous build to add the disk to the Debian 12 VM, so before the reinstallation of proxmox. I have not done anything yet. I only found the location of the .qcow2 file.
Sounds good, proceed with the steps I outlined in the first portion of previous reply.

good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Sounds good, proceed with the steps I outlined in the first portion of previous reply.

good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
I don't know how to continue, could you go through it step-by-step?

When I go to Datacenter >> Storage >> Add >> Directory
I don't see the option to add storage pool, or I don't know what to do.
 
Sounds good, proceed with the steps I outlined in the first portion of previous reply.

good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
With your directions and some help from chatGPT I was able to figure it out:

What I did:

- Datacenter >> Storage >> Add >> Directory
- In Directory ID = HDD4TB-Storage | Directory = /mnt/HDD4TB | Content = Disk image >> Add
- SSH into my proxmox >> qm disk rescan --> the vm-103-disk-1.qcow2 appeared in the HDD4TB-storage storage pool under VM-Disks tab.

- VM103 under Hardware now shows a UNUSED DISK. Click on the disk and press the Edit button, don't change anything just press Add.
- It now appears as Hard Disk (scsi1) and I'm able to view the contents.
 
  • Like
Reactions: bbgeek17

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!