]> git.proxmox.com Git - pve-ha-manager.git/commitdiff
fix # 2241: VM resource: allow migration with local device, when not running
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 5 Oct 2019 18:10:27 +0000 (20:10 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 5 Oct 2019 18:17:29 +0000 (20:17 +0200)
qemu-server ignores the flag if the VM runs, so just set it to true
hardcoded.

People have identical hosts with same HW and want to be able to
relocate VMs in such cases, so allow it here - qemu knows to complain
if it cannot work, as nothing bad happens then (VM stays just were it
is) we can only win, so do it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/HA/Resources/PVEVM.pm

index 9dcf55874fb05eeb31d370382553f374855032ae..0a37cf6e6efca3115ce6d375c66118ee9cca5938 100644 (file)
@@ -96,6 +96,10 @@ sub migrate {
     my $params = {
        node => $nodename,
        vmid => $id,
+       # bug #2241 forces is for local resource only, people can ensure that
+       # different host have the same hardware, so this can be fine, and qemu
+       # knows when not, so can only win here
+       force => 1,
        target => $target,
        online => $online,
     };