How to start VM/CT from another node

joebaires

Member
May 20, 2015
7
1
23
Hello,

The other day my main node went off unexpectedly.

As I store my images in the nas, I thought that I could start the VMs of that node in another, until I fixed it.

But I could not find the command or way to do it. It seems that you need that the node which holds the VMs to be up and migrate it first. You can't migrate without the node online, even if the images are stored in a shared nfs storage:

vps2:# pct start 105 (105 is a CT stored in vps1, which is a offline node)
Configuration file 'nodes/vps2/lxc/105.conf' does not exist

Is there a way to force migration of machines corresponding to another node? (provided there is enough quorum of course).
 
Is there a way to force migration of machines corresponding to another node? (provided there is enough quorum of course).

Yes. You also need to make sure the the original node is offline (or at least no longer run the machine).

Then you can steal the guest config with:

# mv /etc/pve/nodes/<oldnode>/qemu-server/<vmid>.conf /etc/pve/nodes/<newnode>/qemu-server/

This assumes that the guest storage is on shared storage accessible from <newnode>.
 

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!