Ok, so is there anything other than the ####.conf files that needs to be copied over to the new server when doing a manual copy ?
I have two scenarios that I'm most concerned with.
One is, I am on the new proxmox server and I have attached the storage drive from the broken server and the question is how to migrate the old VM and CT to the new server.
The solution to that seems to be, look in the ###.conf file for lvm (or other) partitions, copy and compare to the new storage and then copy the ###.conf file to the right place.
Would that have been all that it takes to do it ?
And the second scenario would be to have a "single file intermediary"
so create a file that contains each of the partition and include the ###.conf file
and then zip all that up into a single file. Now that single, I could copy to any proxmox server, do the reverse process and have my old VM running.
(And optionally, how to copy a live snapshot in this method, for instance for software with cloud restriction that would be snapshotted with the restriction pre-fullfilled for long term preservation)
From that I would like to make a script for each of the scenario possible into a single action command like
CopyMachineFrom /mnt/old-pve-root/ /mnt/new-pve-root/ 101 102 103 104
This would copy the machine id numbers (whether they are VM or CT, including live snapshots) to the new proxmox server, in a single command reliably
CopyMachineToFIle /mnt/old-pve-root/ /root/ 101 102 103 104
This would create zip files 101 102 103 104 .zip for each CT/VM and the zip file would contain everything to re-create the machines on any other proxmox server
Then you would use
CopyMachineFromFile /mnt/new-pve-root/ /root/ 101.zip 102.zip 103.zip 104.zip
And that would in a single action, create the VM/CT exactly as it was when CopyMachineToFIle was run on the source promox server
I suspect the proxmox cluster stuff already can do something like this, so maybe I don't need to code that up from scratch ?
I asked chatgpt,
https://chatgpt.com/share/66f7745f-4660-8005-9bc6-9f8e4982289e
It suggests using vzdump / qmrestore / pct restore