Transfering VM's Between Proxmox Installs (Only one powered on install at a time)

js2

New Member
Apr 9, 2020
13
5
3
Hello!

I am really enjoying Proxmox. I'm currently working on migrating my homelab from ESXi. Maybe one day my work will get there too. Here is my problem quickly:

I installed Proxmox initially onto a SATA SSD. It was reliable, but I worked on my host (installed another nvme SSD, changed the power switch), and for some reason, my installation won't boot anymore. I was using PCIE (GPU), and USB passthrough to a VM, and it was set to start automatically on boot (that was maybe stupid). I would like to install Proxmox onto a different SATA SSD now.

In ESXi, I could reinstall esxi onto another drive, and my "Storage Directory" drives would always just show up. I would just import my VMs, and I'd be off and running. From my reading, Proxmox uses a "Backup" function? I'm totally fine adopting that, but I've read a bit, and am a little confused on the process.

So far, in Proxmox, I have an FSTAB rule to automatically mount the NVME SSD (to /mnt folder). I can see all my directories inside of it (iso, templates, etc).

- Can I create a new VM, and just attach these qcow2 disk images to them? The GUI appears to only let me create a new disk. I was thinking about doing some renaming of files, but then I thought I should ask first.

- Can I mount my old (non booting) installation, and copy the VM configurations from there? I mounted the "root" LVM, but there was nothing inside /etc/pve (was looking for qemu-server).

Thank you for your time! It is greatly appreciated.
 
- Can I create a new VM, and just attach these qcow2 disk images to them? The GUI appears to only let me create a new disk. I was thinking about doing some renaming of files, but then I thought I should ask first.

you can use 'qm rescan' after having configured the mountpoint as directory storage again. that will reference the disk as unused disk in the associated VM config. alternatively, if you want to add it to some 'other' VM, you can use 'qm importdisk' to copy it into the namespace of another VMID (or to switch format/storage).

- Can I mount my old (non booting) installation, and copy the VM configurations from there? I mounted the "root" LVM, but there was nothing inside /etc/pve (was looking for qemu-server).

/etc/pve is backed by an sqlite DB and mounted via fuse (pmxcfs). you can only have one instance of pmxcfs running, so extraction from some 'old' rootfs is not a good idea directly on a PVE host. you can start that old rootfs as VM though (you can even pass whole block devices to a VM if you have root access).
 
  • Like
Reactions: js2 and Moayad
Thank you for this information. I will definitely do some research on qm rescan. I ended up creating a VM, removing the EFI/main disks I created, and replacing them with the previous efi/main disks. It worked, but I know I could do thing better.
 

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!