1. A method of achieving data consistency in a shared storage accessible by a first machine and a second machine, the method comprising: receiving a notification that the first machine will overwrite existing data that is stored in the shared storage, wherein the notification is received following a first checkpoint at the first machine, and wherein the first machine and the second machine are configured to perform work that modifies data in the shared storage; in response to receiving the notification that the first machine will overwrite the existing data that is stored in the shared storage: storing a copy of the existing data in a local storage of the second machine; and sending an acknowledgment to the first machine that the copy of the existing data has been successfully stored in the local storage, to trigger the first machine to proceed with overwriting the existing data in the shared storage with new data; and in response to detecting that a failure has occurred in the first machine prior to a next checkpoint: retrieving the copy of the existing data from the local storage of the second machine, overwriting the new data in the shared storage with the copy of the existing data retrieved from the local storage of the second machine, and triggering, by a hypervisor, a processor of the second machine to take over and resume work that was previously being performed by the first machine at the first checkpoint.