[SOLVED] What to do when a VM is not on a node that contains its hard drive?

damon1

Active Member
Apr 18, 2019
95
9
28
57
Hi All,
this just happened to me and I hope the solution will help someone one day.



Problem:
Due to a power cable failure a node when down (turns out it was a crap cooler master Power Supply).
All but one VM use a shared storage like NAS or Ceph.
The one which uses a local drive on Node 1 was also marked as HA (High availablity)
When the node when down the config file was moved from node 1 to node 2 via HA but the HARD DISK did not move.
You will need a shared drive for this which I assume you do else you would not use HA.

Action:
move the VM from node 2 to node 1
It cannot be done via migrate or any other way I could find.

Solution: :)
On the NODE which has the VM (but not the hard disk)

Use mc to go to this folder (left panel) - mc is a simple GUI for moving and viewing files super easy to use and i'm a linux idiot . run "apt-get install mc"
click back to the root then click to /etc/pve/qemu-server/

Use mc to go to this folder (right panel)
click back to the root then click to /mnt/pve/NFS-2-Slow (or any mounted NAS you have)

Select the VM config file then F5 to copy and then Click on OK

We must rename the file as well so click on F5 again but this time in the TO section remove everything and rename to VM config from 102.conf to 202.conf or any number out of your VM count.



On the NODE which has the HARD DISK

Use mc to go to this folder (left panel)
/mnt/pve/NFS-2-Slow

Use mc to go to this folder (right panel)
/etc/pve/qemu-server/



Select the VM config file then F5 to copy and then Click on OK

Start the VM once it is all running and OK you should delete the config on NFS-2-Slow and the 202.config from the other NODE.

Hope this helps someone (maybe me) one day

Thanks
Damon
 
Last edited:
  • Like
Reactions: t.lamprecht
Hi, while this is a valid way for manual error recovery it could be done in less steps.

Code:
cd /etc/pve
mv nodes/WRONGNODE/qemu-server/VMID.conf nodes/CORRECTNODE/qemu-server/
This allows to avoid the extra copy. (NOTE: above should only be done after closely checking the situation and for manual error recovery).

But anyway, thanks for sharing your workarounds for issues to the community!
 

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!