Replicated VM starts along main VM if host is rebooted during transfer phase
-
I have seen this pop up from time to time and add my own experience here. It has been my experience in at least two separate cases that if the host gets rebooted during the transfer phase of a CR job the replicated VM loses the blocked-operations parameter start which causes the VM to start alongside the source VM - which as you might suspect causes a lot of havoc.
It is very rare for this to happen at the right time but it does (as I am now in the process of manually copying rows from the database of the replicated VM to the main VM - fun stuff)
I am not a JS expert but taking a look at @xen-orchestra/backups/_runners/_writers/IncrementalXapiWriter.js it makes me think that the blocked-operations parameter is set after the transfer phase of the changes which it never gets to if the transfer is interrupted. If someone more JS-savvy can take a look and provide a solution it would be great. -
It somehow relateable to https://xcp-ng.org/forum/topic/4791/disaster-recovery-backup-auto-starting-vms-but-shouldn-t
-
Adding @julien-f in the loop
-
I think this is important. When the issue appears the replicated VM that auto-starts has the [IMPORTING] prefix as in the image below.