Quick: A VM disk in a ZFS pool has lost its partitions, most likely due to overwriting. Where did I screw up, and what are my options to recover the data/ the whole VM?
What Happened:
My setup consists of a ZFS pool called "Proxmox-ZFS" with two 4TB HDDs mirrored.
The VM in question is the 104 with a Win11 installation. The creation worked perfectly and the VM ran without any problems.
Next, I wanted to convert an old laptop into a VM. After creating the VHDX file with disk2vhd, I saved it to /Proxmox-ZFS (mounting of ZFS pool). The reason for this was that my Proxmox host had no space for 313G and since I still had space in the ZFS pool I thought this was not a problem. (I don't know if I already made a mistake here...). But so far all VMs still worked.
Then I created a new VM 103 (previously deleted) , with a new empty hard drive in the "Proxmox-ZFS" pool (Proxmox-ZFS/vm-103-disk-0) sizing 500G. Now I have executed the following command:
The intention was replacing the vm-103-disk-0 with the converted laptop hard disc. At that time, there was probably around 800G of available storage left on the ZFS pool. Since the command took a good amount of time, I left the scenery and when I came back:
VM 101 (previously running) crashed but could be restarted without problems
VM 102 (previously off) can be started without any problems
VM 103 (previously off) boots in secure boot and tries to restore data
VM 104 (previously running) crashed and cannot find a partition when restarting
The big problem is VM 104 which has no partitions anymore. Inspecting the 500G Disk:
So I'm interested to know at what point I screwed up, as it looks to me as a beginner as if I've overwritten the wrong memory or at a moment in time I ran out of memory in my ZFS Pool.
And of course, I'm even more interested in how to fix it.
Thanks in advance
What Happened:
My setup consists of a ZFS pool called "Proxmox-ZFS" with two 4TB HDDs mirrored.
The VM in question is the 104 with a Win11 installation. The creation worked perfectly and the VM ran without any problems.
Next, I wanted to convert an old laptop into a VM. After creating the VHDX file with disk2vhd, I saved it to /Proxmox-ZFS (mounting of ZFS pool). The reason for this was that my Proxmox host had no space for 313G and since I still had space in the ZFS pool I thought this was not a problem. (I don't know if I already made a mistake here...). But so far all VMs still worked.
Then I created a new VM 103 (previously deleted) , with a new empty hard drive in the "Proxmox-ZFS" pool (Proxmox-ZFS/vm-103-disk-0) sizing 500G. Now I have executed the following command:
Code:
sudo qemu-img convert -p -O raw /Proxmox-ZFS/laptopDrive.VHDX /dev/zvol/Proxmox-ZFS/vm-103-disk-0
VM 101 (previously running) crashed but could be restarted without problems
VM 102 (previously off) can be started without any problems
VM 103 (previously off) boots in secure boot and tries to restore data
VM 104 (previously running) crashed and cannot find a partition when restarting
The big problem is VM 104 which has no partitions anymore. Inspecting the 500G Disk:
Code:
fdisk -l /dev/zvol/Proxmox-ZFS/vm-104-disk-1
Code:
kpartx -a /dev/zvol/Proxmox-ZFS/vm-104-disk-1
So I'm interested to know at what point I screwed up, as it looks to me as a beginner as if I've overwritten the wrong memory or at a moment in time I ran out of memory in my ZFS Pool.
And of course, I'm even more interested in how to fix it.
Thanks in advance