Restore from VM Disks?

RCNunya

Renowned Member
Nov 17, 2011
22
0
66
OK, today I reloaded my primary Proxmox NVME. The machine still has 2 other drives in it with files. I was able to restore my "important" docker VM from backup and get it going. Just now realized the other machines were not being backed up, but the SSD has the qcow2 and raw files for them? Is there anyway to get them back? I would assume I could create a new VM and point it to the disks, but then I would have to know which OS each was running as well. Any other way?

1752358973138.png
 
You can recover your VMs from the remaining .qcow2 and .raw disk files by recreating the VMs manually, skipping the default disk creation, and then attaching the existing disks via CLI. For example, to restore VM 102:
Bash:
qm set 102 -scsi0 /path/to/vm-102-disk-0.raw
qm set 102 -scsi1 /path/to/vm-102-disk-1.qcow2
qm set 102 -scsi2 /path/to/vm-102-disk-2.raw
Use -scsiX, -sataX, or -ideX based on how the disks were originally attached

Then, open the Options tab for the VM in the WebUI and configure the Boot Order:
  • Add the attached disk(s).
  • Uncheck devices like ide2 (CD-ROM) or net0 (network boot) to avoid boot issues.
Try starting the VM and check if the OS boots.
 
Does it matter what OS I choose when creating the VM? How would I know how the disks were originally attached?