Browse Source

Auto change protocol to C and allow-two-primary for vm-migrate

tags/0.4.1
Victor Laborie 1 month ago
parent
commit
d2bcb7c337
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      vm-migrate

+ 2
- 0
vm-migrate View File

@@ -17,8 +17,10 @@ slaveKVMIP="${slaveKVMIP:-}"
17 17
 
18 18
 ssh "${slaveKVMIP}" virsh exit || error "Cannot connect to libvirt on ${slaveKVMIP} !"
19 19
 
20
+drbdadm net-options --protocol=C --allow-two-primaries "${vmname}"
20 21
 ssh "${slaveKVMIP}" drbdadm primary "${vmname}"
21 22
 virsh migrate --live --unsafe --verbose "${vmname}" "qemu+ssh://${slaveKVMIP}/system" "tcp://${slaveKVMIP}/"
22 23
 virsh dumpxml "${vmname}" | ssh "${slaveKVMIP}" virsh define /dev/stdin
23 24
 virsh undefine "${vmname}"
24 25
 drbdadm secondary "${vmname}"
26
+drbdadm adjust "${vmname}"

Loading…
Cancel
Save