From d2bcb7c337621f8a2be6762f8aad8174333c7779 Mon Sep 17 00:00:00 2001 From: Victor LABORIE Date: Thu, 16 May 2019 16:11:40 +0200 Subject: [PATCH] Auto change protocol to C and allow-two-primary for vm-migrate --- vm-migrate | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vm-migrate b/vm-migrate index d4bb7a9..1980ea7 100755 --- a/vm-migrate +++ b/vm-migrate @@ -17,8 +17,10 @@ slaveKVMIP="${slaveKVMIP:-}" ssh "${slaveKVMIP}" virsh exit || error "Cannot connect to libvirt on ${slaveKVMIP} !" +drbdadm net-options --protocol=C --allow-two-primaries "${vmname}" ssh "${slaveKVMIP}" drbdadm primary "${vmname}" virsh migrate --live --unsafe --verbose "${vmname}" "qemu+ssh://${slaveKVMIP}/system" "tcp://${slaveKVMIP}/" virsh dumpxml "${vmname}" | ssh "${slaveKVMIP}" virsh define /dev/stdin virsh undefine "${vmname}" drbdadm secondary "${vmname}" +drbdadm adjust "${vmname}"