Importing old configuration

HankFlaggerty

Member
Oct 15, 2021
10
0
6
47
I've been Googling this for a while and not having any luck. I installed a new SSD and it required a BIOS change that stopped my old configuration from booting. I re-installed Proxmox 7 on the new SSD and it asked to changed the name of the pve LVMs to OLD-XXXXXXX. I imported them back and I can see them, but how do I get information off of them.

I see:

Code:
~# ls /dev/pve-OLD-*
/dev/pve-OLD-22051639:
root  swap  vm-100-disk-0  vm-100-disk-1

/dev/pve-OLD-828B9D01:
root  swap  vm-100-disk-0  vm-100-disk-1  vm-101-disk-0  vm-101-disk-1    vm-102-disk-0  vm-102-disk-1  vm-103-disk-0  vm-105-disk-0  vm-106-disk-0  vm-106-disk-1  vm-107-disk-0  vm-107-disk-1

If I mount either of the roots then /etc/pve is empty.

How to I get to /etc/pve/lxc and /etc/pve/qemu-server directories so I can cp them to the new install.

How do I get the VM disks moved?

Thanks so much.
 
If I mount either of the roots then /etc/pve is empty.

How to I get to /etc/pve/lxc and /etc/pve/qemu-server directories so I can cp them to the new install.
That folder is empty because its not a normal folder. There are no real files. All files you have seen in there are just are just configs stored in a SQLite DB. You need the pve-cluster service running which will convert the stuff stored in the DB into files mounted at /etc/pve. If that service is not running that mountpoint is empty. Thats why you should always regularily backup your /etc/pve folder while PVE is still working...
See here for more info: https://pve.proxmox.com/wiki/Proxmox_Cluster_File_System_(pmxcfs)

What you can do is this:

Recovery​

If you have major problems with your Proxmox VE host, for example hardware issues, it could be helpful to copy the pmxcfs database file /var/lib/pve-cluster/config.db, and move it to a new Proxmox VE host. On the new host (with nothing running), you need to stop the pve-cluster service and replace the config.db file (required permissions 0600). Following this, adapt /etc/hostname and /etc/hosts according to the lost Proxmox VE host, then reboot and check (and don’t forget your VM/CT data).
 
Last edited:
  • Like
Reactions: Forssux
You're a king!!! That got me started. How do I move the disks now?
Not sure if there is a build in LVM function for that. But what always should work is using "dd" to read the block device and write its content into a file and on the other host red that file with dd and write it to an empty blockdevice. Or directly read one block device (-if /dev/yourLVonOldDisk) and write it to another empty LV (-of /dev/anEmptyLV). See for example here: https://opensource.com/article/18/7/how-use-dd-linux
Maybe clonezilla can do that too?
Best you look for a tutorial on how to move a LV between VGs or hosts.
 
Last edited:
Googled for the tutorial for a moment and then edited my /etc/pve/qemu-server/xxx.conf files. Added "old-" in front of the LVMs and then used the Disk Action->Move... function from the GUI. I finished doing those before I found something great on a Google search for a tutorial.