[SOLVED] How to start a replicated VM?

Erik Roderwald

New Member
May 14, 2019
12
2
3
58
Hi,

searching the internet since a week now without any results I hope I will find the answer here. :)

I have three machines in a cluster (vm5, vm6 and vm7). Vm5 hosts two VMs (kopano and mysql), vm6 and vm7 host a DC (UCS). So the two machines of vm5 are replicated one to vm6 and the other to vm7. DC1 on vm6 replicates to vm7 and vice versa. Everything works fine.

The sense of this is that we'd like to start in case of a hardware error or in case of normal maintenance the replicated machines on the other node. So in case of going down vm5 how to start the kopano and the mysql server on the nodes vm6 and vm7.

I tried to copy the xxx.conf of the VMs to the target machines /etc/pve/qemu-server but it seems that it exists even though I cannot see them.

A HA-cluster is not possible since at the moment we cannot afford to buy an external storage which would fit to our needs. We just bought the three high end servers and our boss would not be amused to spend more money. ;-)

bye

Erik
 
If I get this correctly you did most things right - but you should move the config file not copy it (one VMID can only exist once per cluster for consistency reasons)

Please check the reference documentation: https://pve.proxmox.com/pve-docs/chapter-pvesr.html#_migrating_a_guest_in_case_of_error
should describe your use case.

Test such a recovery in a maintenance window - that way you'll know how to do it if it's unexpected and stressful.

Hope this helps!
 
Hi,

thanx for your reply. That's what I was looking for. So I got this right:

In case of planned maintenance:
1. Stop the VM on the original node
2. Move the conf file from nodes/original_noe/qemu-server to nodes/new_node/qemu-server
3. Start the VM on the new node
4. After maintenance and rebooting the original node the other way around.

In case of failed original node:
Just move the files and start the machine on the other nodes.

Just to be sure that I understood this right: The replication will work the other way so that after starting the VM on the new node it will be replicated to the original one?

bye

Erik
 
Hi,

thanx for your reply. That's what I was looking for. So I got this right:

In case of planned maintenance:
1. Stop the VM on the original node
2. Move the conf file from nodes/original_noe/qemu-server to nodes/new_node/qemu-server
3. Start the VM on the new node
4. After maintenance and rebooting the original node the other way around.

In case of failed original node:
Just move the files and start the machine on the other nodes.

Just to be sure that I understood this right: The replication will work the other way so that after starting the VM on the new node it will be replicated to the original one?

bye

Erik
Hi, you said
"In case of failed original node:
Just move the files"
How do you move the files from a host which is not working?
 
How do you move the files from a host which is not working?
You don't. (We are discussing this for a working cluster, not for a single system.)

/etc/pve is a distributed/replicated mountpoint of the PVE internal configuration-database. Everything in there is present on all nodes.

When the dead node gets restarted it will fetch the new state and know that the moved VM shall not get started on this node.

:)
 

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!