Disaster recovery in a cluster with network storage
If one of the nodes in a cluster with network storage connected fails, you can resume the operation of its virtual machines (VMs) on another node using the disaster recovery function.
The possibility of disaster recovery doesn't depend on high availability configuration of the cluster.
Note
Use this feature only if you are sure that the cluster node operation will not recover on its own. For example, if the server is physically down. Resuming the node operation during or after an disaster recovery may result in damage to the VM.
How to recover all the VMs in the node
To move all VMs from the failed node, go to Nodes → select the node → VM disaster recovery → Recover. All VMs from this node will be moved to other nodes of the cluster. Read more about the logic of nodes selection in Selecting a cluster node for the virtual machine .
Note
Once the failed node has been recovered, erase its hard drives and prepare for reconnection over again. Read more in Server requirements for the cluster. Connecting a node with the old configuration may damage the VM operation.
How to recover individual VMs
You can move individual VMs from a failed node via an API request:
Get an authorization token:
curl -k -X POST -H "accept: application/json" -H "Content-Type: application/json" 'https://domain.com/auth/v4/public/token' -d '{"email": "admin_email", "password": "admin_pass"}'
CODEComments to the commanddomain.com — domain name or IP address of the server with the platform
admin_email — platform administrator's email
admin_pass — platform administrator's password
In response, you will get the message in the form:
Example of response in JSON
{ "confirmed": true, "expires_at": null, "id": "6", "token": "4-e9726dd9-61d9-2940-add3-914851d2cb8a" }
CODESave the received token value.
Move the required VMs using the received session id:
curl --insecure -X POST 'https://domain.com/vm/v3/host/<vm_id>/relocate' -H 'x-xsrf-token: <token>' -d '{"node": <node_id>}'
CODEComments to the commanddomain.com — domain name of the server with VMmanager
<vm_id> — virtual machine's id
<token> — authorization token
<node_id> — id of the cluster node to which the VMs will be moved