Copy vm images from old server

dan.d

New Member
Jan 29, 2024
3
0
1
I upgraded my motherboard and storage and did a fresh install of Proxmox 8.1.4 on a pair of NVME ssds using ZFS Raid 1.
The SATA SSD from the old install is physically in the new(ish) machine and it is visible in the web interface under Disks/LVM pve /dev/sda3.

I can't figure out how to access the virtual disks from my old install of proxmox.
What would be the easiest way to copy the vdisks to the new zfs pool?

I'm assuming I'll need to create new VM's, which is fine, but is there a way I can use the old disks?

It would be great if there was also a way to view the hardware config of the old vms also.
 
Last edited:
It would be great if there was also a way to view the hardware config of the old vms also.
VM/LXC configs were on the old system disk. In case you still got the system disk and you reinstalled PVE using the same hostname see here: https://pve.proxmox.com/wiki/Proxmox_Cluster_File_System_(pmxcfs)#_recovery
The SATA SSD from the old install is physically in the new(ish) machine and it is visible in the web interface under Disks/LVM pve /dev/sda3.

I can't figure out how to access the virtual disks from my old install of proxmox.
What would be the easiest way to copy the vdisks to the new zfs pool?
Go to "Datacenter -> Storage -> Add -> TypeOfStorageYourOldInstallationWasUsing" and add the old storage which probably was a LVM-Thin. Once your new PVE is using the old storage you can use the "move disk" button to move the virtual disks from the LVM-Thin to the ZFS storage.
 
I can see the virtual disks now but I don't see an move disk button. When I select a disk the only button is Remove.

The old system only had a single physical disk in it. I shutdown proxmox via the web gui and waited for all the VMs to shutdown and the server to turn off before beginning surgery. Dumb question, how would I access "config.db" on the old drive? Will it matter that it's an older version of PVE? If I can extract the old config.db hopefully I can find what I need using sqlite.
 
Dumb question, how would I access "config.db" on the old drive?
You first mount the etx4 of old "root" LV somewhere (see "mount" command). Then use "cd", "ls", "cp", "mv" and so on to work with files.
 
I can see the virtual disks now but I don't see an move disk button. When I select a disk the only button is Remove.
Create your VMs without virtual disk using the same VMIDs. Then run "qm rescan YourVMID" so the VM will see the old disks. Once the VM sees the old disks you can move them between storages.

By the way...would be so much easier if you simpy backed up all your VMs before changing hardware. You should have recent backups anyway...not just in case you want to restore them on a new PVE installation. Keep in mind: Raid is not a backup! ;)
 
Last edited:
Create your VMs without virtual disk using the same VMIDs. Then run "qm rescan YourVMID" so the VM will see the old disks. Once the VM sees the old disks you can move them between storages.

By the way...would be so much easier if you simpy backed up all your VMs before changing hardware. You should have recent backups anyway...not just in case you want to restore them on a new PVE installation. Keep in mind: Raid is not a backup! ;)

I actually had backups weekly to a SMB share on a windows desktop linked to OneDrive. I didn't think of it because that machine hasn't worked in awhile and I forgot about the OneDrive part. I have backups from 12/31. I plan on recreating most of my home lab from scratch anyway there is just one VM I'd like to have back up asap and I'm an idiot for not backing it up before starting.

Would it be possible to restore the backup and then swap the disk?

I'm tempted to try just booting to the old drive, not sure if that would mess things up or not. I went from a X9DRD-LF to X9DRD-7LN4F so similar hardware.
 

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!