Migrate VMs from Offline Clusternode

kstieger

New Member
Nov 2, 2011
4
0
1
Hi,

i have here a installation with 3 Clusternodes running PVE 2.1.
I did no enable any HA-Features because i don't have any suppurted fencing-devices.

But i wonder how i can migrate a vm from a offline node (eg. when the hardware is gone, ...)?

With PVE 1.x i did backup the vm-configuration files (/etc/qemu-server/*.conf).
If a node failed, i just copied the *.conf files form the node to a new node and started the vms.

Is this also working in PVE 2.x?
I think there is a clusterdatabase which holds the configuration, because if i power down one node, i can see the configuration and the vms further on in the webinterface.

Regards,
Kurt
 
all configuration files are on all nodes, see http://pve.proxmox.com/wiki/Proxmox_Cluster_file_system_(pmxcfs)

so if one node dies, you can just move the config files to the right place and if the storage is available, you can start them again.

just analyze the dir structure in your cluster - /etc/pve/...

if you use HA, the move/restart is done automatically.
 
something like this should help to move confs around easily:

Code:
#/bin/bash

CT=$1
FROM=$2
TO=$3
DIR=/etc/pve/nodes

if [ $# -ne 3 ]; then
    echo "You need to run it as: $0 CT sourceNode destionationNode"
    exit;
fi
if [ ! -d $DIR/$FROM ]; then
    echo "Looks like source node \"$FROM\" does not exist!"
    exit;
fi
if [ ! -d $DIR/$TO ]; then
        echo "Looks like destination node \"$TO\" does not exist!"
        exit;
fi
if [ -f $DIR/$TO/openvz/$CT.conf ]; then
    echo "CT \"$CT\" already exists on destination node $TO!";
    exit;
fi
if [ ! -f $DIR/$FROM/openvz/$CT.conf ]; then
        echo "CT \"$CT\" does not exist on source node $FROM!";
        exit;
fi

mv $DIR/$FROM/openvz/$CT.conf $DIR/$TO/openvz/$CT.conf
 

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!