VM in proxmox need to be moved from one node to another

harikrishna075

New Member
Jun 14, 2022
12
0
1
Currently we are having one VM which should be moved from another node. We are using the Passthrough HDD/SSD/Physical disks to VM. Attaching screenshot of the same.

 

Attachments

  • Screenshot from 2023-11-04 16-32-26.png
    Screenshot from 2023-11-04 16-32-26.png
    138.7 KB · Views: 13
Currently we are having one VM which should be moved from another node. We are using the Passthrough HDD/SSD/Physical disks to VM. Attaching screenshot of the same.
I'm not sure what your question is. I would do something like this: shutdown VM, backup (without the passed through disks), copy backup to new node, restore VM from backup (on new node), shutdown both nodes, transplant the physical disks to the other node, start nodes, double check and fix paths to passed through disks, start VM (on new node) and delete VM on old node. Plan each step carefully yourself!
 
Like this post can we move VM from old node to new node.



Thank you, kindly! I was able to transfer the config files to the new node and was impressed to see the VMs populate almost immediately. Taking your tip to remove the config files from the former node to prevent any collisions if both instances were to boot at the same time, here are the steps I took, in case a step-by-step guide helps anybody else. I'll refer to the old and new nodes as Node A and Node B, respectively.
  1. Shutdown the VM and confirm its status is "Stopped" in the Proxmox web GUI
  2. Log into Node A CLI, browse to the config file directory and rename the config file. The VM will disappear from the web GUI.
    cd /etc/pve/qemu-server/
    mv 123.conf 123.conf.bak
  3. Create a directory to store the config files on a shared mount point, accessible by Node B (useful as I was migrating several VMs at once)
    mkdir /mnt/pve/[shared]/pve-conf-files
  4. Copy the config file from Node A to the config folder on the shared drive
    cp 123.conf.bak /mnt/pve/[shared]/pve-conf-files
  5. Log into Node B CLI, browse to the local config file directory, and copy the config files over from the shared drive
    cd /etc/pve/qemu-servers
    cp /mnt/pve/[shared]/pve-conf-files/123.conf.bak .
  6. Rename the copied config file back to its original name
    mv 123.conf.bak 123.conf
  7. The VM will now appear in the web GUI for Node B and may be started normally once it has loaded.
This wasn't that difficult, in the end, though I'm surprised that all I needed to do was move a configuration file that was only about 10-20 lines of text in many cases. This method didn't copy over backup settings but those are easy to replicate if I make sure I've documented things before taking a VM offline.
 

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!