Would like to move VMs between non-clustered hosts that point to same shared storage.

akulbe

Member
Jan 1, 2023
48
4
13
Portland, OR
The context is this post and I tried what was suggested, by backing up with PBS, and restoring the backup on the new server. The problem is, it created another copy and used double the storage.

It occurs to me that PBS may not be the best way to do this. I have two separate PVE servers that aren't yet clustered.

(I'm trying to empty one node, so I can rename it, and then create a cluster on another node, and add the renamed one to it)

Is there a way to import when the VM already exists on the NFS share?
 
It exist in a directory structure where your PVE1 host does not expect anyone else to mess in. You can, but should not point two independent PVE hosts to the same directory on NFS. There is a high chance of ID collision and data loss, unless you really take care for it not to happen.

You could move the image files manually, ie "mv /mnt/nfs/server1/images/1000/vm-1000-disk-0.qcow /mnt/nfs/server2/images/1001/"
Then move the config file. If IDs are colliding between the two, then you need to edit/rename things in right places to avoid it.

Its not difficult. It is much easier for someone well versed in Linux and who understands the structure of storage and VM configuration. It is also not an officially endorsed method, hence there is no "man" page for it.

Good luck and measure trice before you do anything.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
The context is this post and I tried what was suggested, by backing up with PBS, and restoring the backup on the new server. The problem is, it created another copy and used double the storage.

It occurs to me that PBS may not be the best way to do this. I have two separate PVE servers that aren't yet clustered.
See [1]: qm remote-migrate

I would still keep a backup while doing it.

(I'm trying to empty one node, so I can rename it, and then create a cluster on another node, and add the renamed one to it)

Is there a way to import when the VM already exists on the NFS share?

Are you looking for vzdump [2]?

[1] https://pve.proxmox.com/pve-docs/qm.1.html
[2] https://pve.proxmox.com/pve-docs/vzdump.1.html
 
See [1]: qm remote-migrate

I would still keep a backup while doing it.
If OPs main issue is storage capacity, then this would not alleviate Op's problem. Even with "delete-source" option, there will be a a time when storage usage will double. Both backup/restore and remote-migrate are legitimate supported options if disk space is of no concern. Everything else falls under "advanced hack" category.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox