Index: /trunk/include/VBox/settings.h
===================================================================
--- /trunk/include/VBox/settings.h	(revision 80073)
+++ /trunk/include/VBox/settings.h	(revision 80074)
@@ -1213,9 +1213,4 @@
     com::Utf8Str            strTeleporterAddress;
     com::Utf8Str            strTeleporterPassword;
-    FaultToleranceState_T   enmFaultToleranceState;
-    uint32_t                uFaultTolerancePort;
-    com::Utf8Str            strFaultToleranceAddress;
-    com::Utf8Str            strFaultTolerancePassword;
-    uint32_t                uFaultToleranceInterval;
     bool                    fRTCUseUTC;
     IconBlob                ovIcon;
Index: /trunk/include/VBox/vmm/em.h
===================================================================
--- /trunk/include/VBox/vmm/em.h	(revision 80073)
+++ /trunk/include/VBox/vmm/em.h	(revision 80074)
@@ -344,6 +344,4 @@
 VMMR3_INT_DECL(int)             EMR3ExecuteVM(PVM pVM, PVMCPU pVCpu);
 VMMR3_INT_DECL(int)             EMR3CheckRawForcedActions(PVM pVM, PVMCPU pVCpu);
-VMMR3_INT_DECL(int)             EMR3NotifyResume(PVM pVM);
-VMMR3_INT_DECL(int)             EMR3NotifySuspend(PVM pVM);
 VMMR3_INT_DECL(VBOXSTRICTRC)    EMR3HmSingleInstruction(PVM pVM, PVMCPU pVCpu, uint32_t fFlags);
 
Index: unk/include/VBox/vmm/ftm.h
===================================================================
--- /trunk/include/VBox/vmm/ftm.h	(revision 80073)
+++ 	(revision )
@@ -1,77 +1,0 @@
-/** @file
- * FTM - Fault Tolerance Manager.
- */
-
-/*
- * Copyright (C) 2010-2019 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- *
- * The contents of this file may alternatively be used under the terms
- * of the Common Development and Distribution License Version 1.0
- * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
- * VirtualBox OSE distribution, in which case the provisions of the
- * CDDL are applicable instead of those of the GPL.
- *
- * You may elect to license modified versions of this file under the
- * terms and conditions of either the GPL or the CDDL or both.
- */
-
-#ifndef VBOX_INCLUDED_vmm_ftm_h
-#define VBOX_INCLUDED_vmm_ftm_h
-#ifndef RT_WITHOUT_PRAGMA_ONCE
-# pragma once
-#endif
-
-#include <VBox/types.h>
-
-
-RT_C_DECLS_BEGIN
-
-/** @defgroup grp_ftm        The Fault Tolerance Monitor / Manager API
- * @ingroup grp_vmm
- * @{
- */
-
-/**
- * Fault tolerance checkpoint type.
- */
-typedef enum FTMCHECKPOINTTYPE
-{
-    FTMCHECKPOINTTYPE_INVALID = 0,
-    FTMCHECKPOINTTYPE_NETWORK,
-    FTMCHECKPOINTTYPE_STORAGE,
-    FTMCHECKPOINTTYPE_END,
-    FTMCHECKPOINTTYPE_32BIT_HACK = 0x7fffffff
-} FTMCHECKPOINTTYPE;
-
-VMM_INT_DECL(bool)  FTMIsDeltaLoadSaveActive(PVM pVM);
-VMM_INT_DECL(int)   FTMSetCheckpoint(PVM pVM, FTMCHECKPOINTTYPE enmType);
-
-#ifdef IN_RING3
-/** @defgroup grp_ftm_r3     The FTM Host Context Ring-3 API
- * @{
- */
-VMMR3DECL(int)      FTMR3PowerOn(PUVM pUVM, bool fMaster, unsigned uInterval, const char *pszAddress, unsigned uPort, const char *pszPassword);
-VMMR3DECL(int)      FTMR3CancelStandby(PUVM pUVM);
-
-VMMR3_INT_DECL(int) FTMR3Init(PVM pVM);
-VMMR3_INT_DECL(int) FTMR3Term(PVM pVM);
-VMMR3_INT_DECL(int) FTMR3SetCheckpoint(PVM pVM, FTMCHECKPOINTTYPE enmType);
-
-#endif /* IN_RING3 */
-
-/** @} */
-
-/** @} */
-
-RT_C_DECLS_END
-
-#endif /* !VBOX_INCLUDED_vmm_ftm_h */
-
Index: /trunk/include/VBox/vmm/pdmdrv.h
===================================================================
--- /trunk/include/VBox/vmm/pdmdrv.h	(revision 80073)
+++ /trunk/include/VBox/vmm/pdmdrv.h	(revision 80074)
@@ -45,5 +45,4 @@
 #include <VBox/vmm/dbgf.h>
 #include <VBox/vmm/mm.h>
-#include <VBox/vmm/ftm.h>
 #include <iprt/stdarg.h>
 
@@ -648,18 +647,9 @@
     DECLRCCALLBACKMEMBER(bool, pfnAssertOther,(PPDMDRVINS pDrvIns, const char *pszFile, unsigned iLine, const char *pszFunction));
 
-    /**
-     * Notify FTM about a checkpoint occurrence
-     *
-     * @param   pDrvIns             The driver instance.
-     * @param   enmType             Checkpoint type
-     * @thread  Any
-     */
-    DECLRCCALLBACKMEMBER(int, pfnFTSetCheckpoint,(PPDMDRVINS pDrvIns, FTMCHECKPOINTTYPE enmType));
-
     /** Just a safety precaution. */
     uint32_t                        u32TheEnd;
 } PDMDRVHLPRC;
 /** Current PDMDRVHLPRC version number. */
-#define PDM_DRVHLPRC_VERSION                    PDM_VERSION_MAKE(0xf0f9, 2, 0)
+#define PDM_DRVHLPRC_VERSION                    PDM_VERSION_MAKE(0xf0f9, 3, 0)
 
 
@@ -748,18 +738,9 @@
     DECLR0CALLBACKMEMBER(bool, pfnAssertOther,(PPDMDRVINS pDrvIns, const char *pszFile, unsigned iLine, const char *pszFunction));
 
-    /**
-     * Notify FTM about a checkpoint occurrence
-     *
-     * @param   pDrvIns             The driver instance.
-     * @param   enmType             Checkpoint type
-     * @thread  Any
-     */
-    DECLR0CALLBACKMEMBER(int, pfnFTSetCheckpoint,(PPDMDRVINS pDrvIns, FTMCHECKPOINTTYPE enmType));
-
     /** Just a safety precaution. */
     uint32_t                        u32TheEnd;
 } PDMDRVHLPR0;
 /** Current DRVHLP version number. */
-#define PDM_DRVHLPR0_VERSION                    PDM_VERSION_MAKE(0xf0f8, 2, 0)
+#define PDM_DRVHLPR0_VERSION                    PDM_VERSION_MAKE(0xf0f8, 3, 0)
 
 
@@ -1281,13 +1262,4 @@
      */
     DECLR3CALLBACKMEMBER(int, pfnCallR0,(PPDMDRVINS pDrvIns, uint32_t uOperation, uint64_t u64Arg));
-
-    /**
-     * Notify FTM about a checkpoint occurrence
-     *
-     * @param   pDrvIns             The driver instance.
-     * @param   enmType             Checkpoint type
-     * @thread  Any
-     */
-    DECLR3CALLBACKMEMBER(int, pfnFTSetCheckpoint,(PPDMDRVINS pDrvIns, FTMCHECKPOINTTYPE enmType));
 
     /**
@@ -1343,5 +1315,5 @@
 } PDMDRVHLPR3;
 /** Current DRVHLP version number. */
-#define PDM_DRVHLPR3_VERSION                    PDM_VERSION_MAKE(0xf0fb, 3, 0)
+#define PDM_DRVHLPR3_VERSION                    PDM_VERSION_MAKE(0xf0fb, 4, 0)
 
 #endif /* IN_RING3 */
@@ -1425,12 +1397,4 @@
 # define PDMDRV_ASSERT_OTHER(pDrvIns)  do { } while (0)
 #endif
-
-/**
- * @copydoc PDMDRVHLPR3::pfnFTSetCheckpoint
- */
-DECLINLINE(int) PDMDrvHlpFTSetCheckpoint(PPDMDRVINS pDrvIns, FTMCHECKPOINTTYPE enmType)
-{
-    return pDrvIns->CTX_SUFF(pHlp)->pfnFTSetCheckpoint(pDrvIns, enmType);
-}
 
 
Index: /trunk/include/VBox/vmm/pgm.h
===================================================================
--- /trunk/include/VBox/vmm/pgm.h	(revision 80073)
+++ /trunk/include/VBox/vmm/pgm.h	(revision 80074)
@@ -314,18 +314,4 @@
 /** Pointer to PGM invalidation callback. */
 typedef FNPGMR3VIRTINVALIDATE *PFNPGMR3VIRTINVALIDATE;
-
-
-/**
- * PGMR3PhysEnumDirtyFTPages callback for syncing dirty physical pages
- *
- * @param   pVM             The cross context VM structure.
- * @param   GCPhys          GC physical address
- * @param   pRange          HC virtual address of the page(s)
- * @param   cbRange         Size of the dirty range in bytes.
- * @param   pvUser          User argument.
- */
-typedef DECLCALLBACK(int) FNPGMENUMDIRTYFTPAGES(PVM pVM, RTGCPHYS GCPhys, uint8_t *pRange, unsigned cbRange, void *pvUser);
-/** Pointer to PGMR3PhysEnumDirtyFTPages callback. */
-typedef FNPGMENUMDIRTYFTPAGES *PFNPGMENUMDIRTYFTPAGES;
 
 
@@ -822,5 +808,4 @@
 VMMR3DECL(int)      PGMR3PhysChangeMemBalloon(PVM pVM, bool fInflate, unsigned cPages, RTGCPHYS *paPhysPage);
 VMMR3DECL(int)      PGMR3PhysWriteProtectRAM(PVM pVM);
-VMMR3DECL(int)      PGMR3PhysEnumDirtyFTPages(PVM pVM, PFNPGMENUMDIRTYFTPAGES pfnEnum, void *pvUser);
 VMMR3DECL(uint32_t) PGMR3PhysGetRamRangeCount(PVM pVM);
 VMMR3DECL(int)      PGMR3PhysGetRange(PVM pVM, uint32_t iRange, PRTGCPHYS pGCPhysStart, PRTGCPHYS pGCPhysLast,
Index: /trunk/include/VBox/vmm/vm.h
===================================================================
--- /trunk/include/VBox/vmm/vm.h	(revision 80073)
+++ /trunk/include/VBox/vmm/vm.h	(revision 80074)
@@ -963,6 +963,5 @@
 #define VMSTATE_IS_RUNNING(a_enmVMState) \
     (   (enmVMState) == VMSTATE_RUNNING \
-     || (enmVMState) == VMSTATE_RUNNING_LS \
-     || (enmVMState) == VMSTATE_RUNNING_FT )
+     || (enmVMState) == VMSTATE_RUNNING_LS )
 
 /** @def VM_IS_RUNNING_FOR_ASSERTIONS_ONLY
@@ -973,6 +972,5 @@
 #define VM_IS_RUNNING_FOR_ASSERTIONS_ONLY(pVM) \
     (   (pVM)->enmVMState == VMSTATE_RUNNING \
-     || (pVM)->enmVMState == VMSTATE_RUNNING_LS \
-     || (pVM)->enmVMState == VMSTATE_RUNNING_FT )
+     || (pVM)->enmVMState == VMSTATE_RUNNING_LS )
 
 /** @def VM_ASSERT_IS_NOT_RUNNING
Index: /trunk/include/VBox/vmm/vmapi.h
===================================================================
--- /trunk/include/VBox/vmm/vmapi.h	(revision 80073)
+++ /trunk/include/VBox/vmm/vmapi.h	(revision 80074)
@@ -434,10 +434,8 @@
 VMMR3_INT_DECL(VBOXSTRICTRC) VMR3ResetTripleFault(PVM pVM);
 VMMR3DECL(int)          VMR3Save(PUVM pUVM, const char *pszFilename, bool fContinueAfterwards, PFNVMPROGRESS pfnProgress, void *pvUser, bool *pfSuspended);
-VMMR3_INT_DECL(int)     VMR3SaveFT(PUVM pUVM, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser, bool *pfSuspended, bool fSkipStateChanges);
 VMMR3DECL(int)          VMR3Teleport(PUVM pUVM, uint32_t cMsDowntime, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser, PFNVMPROGRESS pfnProgress, void *pvProgressUser, bool *pfSuspended);
 VMMR3DECL(int)          VMR3LoadFromFile(PUVM pUVM, const char *pszFilename, PFNVMPROGRESS pfnProgress, void *pvUser);
 VMMR3DECL(int)          VMR3LoadFromStream(PUVM pUVM, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser,
                                            PFNVMPROGRESS pfnProgress, void *pvProgressUser);
-VMMR3_INT_DECL(int)     VMR3LoadFromStreamFT(PUVM pUVM, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser);
 
 VMMR3DECL(int)          VMR3PowerOff(PUVM pUVM);
Index: /trunk/include/VBox/vmm/vmm.h
===================================================================
--- /trunk/include/VBox/vmm/vmm.h	(revision 80073)
+++ /trunk/include/VBox/vmm/vmm.h	(revision 80074)
@@ -123,6 +123,4 @@
      *  handle VERR_INTERRUPTED in kernel context. */
     VMMCALLRING3_VM_R0_PREEMPT,
-    /** Sync the FTM state with the standby node. */
-    VMMCALLRING3_FTM_SET_CHECKPOINT,
     /** The usual 32-bit hack. */
     VMMCALLRING3_32BIT_HACK = 0x7fffffff
Index: /trunk/src/VBox/Devices/Network/DrvIntNet.cpp
===================================================================
--- /trunk/src/VBox/Devices/Network/DrvIntNet.cpp	(revision 80073)
+++ /trunk/src/VBox/Devices/Network/DrvIntNet.cpp	(revision 80074)
@@ -499,7 +499,4 @@
     if (pSgBuf->pvUser)
         STAM_COUNTER_INC(&pThis->StatSentGso);
-
-    /* Set an FTM checkpoint as this operation changes the state permanently. */
-    PDMDrvHlpFTSetCheckpoint(pThis->CTX_SUFF(pDrvIns), FTMCHECKPOINTTYPE_NETWORK);
 
     /*
Index: /trunk/src/VBox/Devices/Network/DrvNAT.cpp
===================================================================
--- /trunk/src/VBox/Devices/Network/DrvNAT.cpp	(revision 80073)
+++ /trunk/src/VBox/Devices/Network/DrvNAT.cpp	(revision 80074)
@@ -598,7 +598,4 @@
     if (pThis->pSlirpThread->enmState == PDMTHREADSTATE_RUNNING)
     {
-        /* Set an FTM checkpoint as this operation changes the state permanently. */
-        PDMDrvHlpFTSetCheckpoint(pThis->pDrvIns, FTMCHECKPOINTTYPE_NETWORK);
-
         rc = RTReqQueueCallEx(pThis->hSlirpReqQueue, NULL /*ppReq*/, 0 /*cMillies*/,
                               RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT,
Index: /trunk/src/VBox/Devices/Network/DrvTAP.cpp
===================================================================
--- /trunk/src/VBox/Devices/Network/DrvTAP.cpp	(revision 80073)
+++ /trunk/src/VBox/Devices/Network/DrvTAP.cpp	(revision 80074)
@@ -247,7 +247,4 @@
     Assert((pSgBuf->fFlags & PDMSCATTERGATHER_FLAGS_MAGIC_MASK) == PDMSCATTERGATHER_FLAGS_MAGIC);
     Assert(RTCritSectIsOwner(&pThis->XmitLock));
-
-    /* Set an FTM checkpoint as this operation changes the state permanently. */
-    PDMDrvHlpFTSetCheckpoint(pThis->pDrvIns, FTMCHECKPOINTTYPE_NETWORK);
 
     int rc;
Index: /trunk/src/VBox/Devices/Network/DrvUDPTunnel.cpp
===================================================================
--- /trunk/src/VBox/Devices/Network/DrvUDPTunnel.cpp	(revision 80073)
+++ /trunk/src/VBox/Devices/Network/DrvUDPTunnel.cpp	(revision 80074)
@@ -201,7 +201,4 @@
     Assert((pSgBuf->fFlags & PDMSCATTERGATHER_FLAGS_MAGIC_MASK) == PDMSCATTERGATHER_FLAGS_MAGIC);
     Assert(RTCritSectIsOwner(&pThis->XmitLock));
-
-    /* Set an FTM checkpoint as this operation changes the state permanently. */
-    PDMDrvHlpFTSetCheckpoint(pThis->pDrvIns, FTMCHECKPOINTTYPE_NETWORK);
 
     int rc;
Index: /trunk/src/VBox/Devices/Network/DrvVDE.cpp
===================================================================
--- /trunk/src/VBox/Devices/Network/DrvVDE.cpp	(revision 80073)
+++ /trunk/src/VBox/Devices/Network/DrvVDE.cpp	(revision 80074)
@@ -216,7 +216,4 @@
     Assert((pSgBuf->fFlags & PDMSCATTERGATHER_FLAGS_MAGIC_MASK) == PDMSCATTERGATHER_FLAGS_MAGIC);
     Assert(RTCritSectIsOwner(&pThis->XmitLock));
-
-    /* Set an FTM checkpoint as this operation changes the state permanently. */
-    PDMDrvHlpFTSetCheckpoint(pThis->pDrvIns, FTMCHECKPOINTTYPE_NETWORK);
 
     int rc;
Index: /trunk/src/VBox/Devices/Storage/DrvRamDisk.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DrvRamDisk.cpp	(revision 80073)
+++ /trunk/src/VBox/Devices/Storage/DrvRamDisk.cpp	(revision 80074)
@@ -1043,5 +1043,4 @@
         || enmVmState == VMSTATE_RUNNING
         || enmVmState == VMSTATE_RUNNING_LS
-        || enmVmState == VMSTATE_RUNNING_FT
         || enmVmState == VMSTATE_RESETTING
         || enmVmState == VMSTATE_RESETTING_LS
Index: /trunk/src/VBox/Devices/Storage/DrvVD.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DrvVD.cpp	(revision 80073)
+++ /trunk/src/VBox/Devices/Storage/DrvVD.cpp	(revision 80074)
@@ -1557,7 +1557,4 @@
     }
 
-    /* Set an FTM checkpoint as this operation changes the state permanently. */
-    PDMDrvHlpFTSetCheckpoint(pThis->pDrvIns, FTMCHECKPOINTTYPE_STORAGE);
-
     int rc = drvvdKeyCheckPrereqs(pThis, true /* fSetError */);
     if (RT_FAILURE(rc))
@@ -3162,5 +3159,4 @@
         || enmVmState == VMSTATE_RUNNING
         || enmVmState == VMSTATE_RUNNING_LS
-        || enmVmState == VMSTATE_RUNNING_FT
         || enmVmState == VMSTATE_RESETTING
         || enmVmState == VMSTATE_RESETTING_LS
Index: /trunk/src/VBox/Devices/USB/DrvVUSBRootHub.cpp
===================================================================
--- /trunk/src/VBox/Devices/USB/DrvVUSBRootHub.cpp	(revision 80073)
+++ /trunk/src/VBox/Devices/USB/DrvVUSBRootHub.cpp	(revision 80074)
@@ -926,6 +926,5 @@
         VMSTATE enmState = PDMDrvHlpVMState(pThis->pDrvIns);
         if (   enmState == VMSTATE_RUNNING
-            || enmState == VMSTATE_RUNNING_LS
-            || enmState == VMSTATE_RUNNING_FT)
+            || enmState == VMSTATE_RUNNING_LS)
         {
             rc = PDMR3ThreadResume(pThis->hThreadPeriodFrame);
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 80073)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 80074)
@@ -730,11 +730,4 @@
                      "                            [--iocache on|off]\n"
                      "                            [--iocachesize <I/O cache size in MB>]\n"
-#endif
-#if 0
-                     "                            [--faulttolerance master|standby]\n"
-                     "                            [--faulttoleranceaddress <name>]\n"
-                     "                            [--faulttoleranceport <port>]\n"
-                     "                            [--faulttolerancesyncinterval <msec>]\n"
-                     "                            [--faulttolerancepassword <password>]\n"
 #endif
 #ifdef VBOX_WITH_USB_CARDREADER
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp	(revision 80073)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp	(revision 80074)
@@ -179,6 +179,4 @@
         case MachineState_TeleportingIn:
             return fShort ? "teleportingin"        : "teleporting (incoming)";
-        case MachineState_FaultTolerantSyncing:
-            return fShort ? "faulttolerantsyncing" : "fault tolerant syncing";
         case MachineState_DeletingSnapshotOnline:
             return fShort ? "deletingsnapshotlive" : "deleting snapshot live";
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp	(revision 80073)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp	(revision 80074)
@@ -202,9 +202,4 @@
     MODIFYVM_IOCACHE,
     MODIFYVM_IOCACHESIZE,
-    MODIFYVM_FAULT_TOLERANCE,
-    MODIFYVM_FAULT_TOLERANCE_ADDRESS,
-    MODIFYVM_FAULT_TOLERANCE_PORT,
-    MODIFYVM_FAULT_TOLERANCE_PASSWORD,
-    MODIFYVM_FAULT_TOLERANCE_SYNC_INTERVAL,
     MODIFYVM_CPU_EXECTUION_CAP,
     MODIFYVM_AUTOSTART_ENABLED,
@@ -397,9 +392,4 @@
     { "--iocache",                  MODIFYVM_IOCACHE,                   RTGETOPT_REQ_BOOL_ONOFF },
     { "--iocachesize",              MODIFYVM_IOCACHESIZE,               RTGETOPT_REQ_UINT32 },
-    { "--faulttolerance",           MODIFYVM_FAULT_TOLERANCE,           RTGETOPT_REQ_STRING },
-    { "--faulttoleranceaddress",    MODIFYVM_FAULT_TOLERANCE_ADDRESS,   RTGETOPT_REQ_STRING },
-    { "--faulttoleranceport",       MODIFYVM_FAULT_TOLERANCE_PORT,      RTGETOPT_REQ_UINT32 },
-    { "--faulttolerancepassword",   MODIFYVM_FAULT_TOLERANCE_PASSWORD,  RTGETOPT_REQ_STRING },
-    { "--faulttolerancesyncinterval", MODIFYVM_FAULT_TOLERANCE_SYNC_INTERVAL, RTGETOPT_REQ_UINT32 },
     { "--chipset",                  MODIFYVM_CHIPSET,                   RTGETOPT_REQ_STRING },
 #ifdef VBOX_WITH_RECORDING
@@ -2879,47 +2869,4 @@
             }
 
-            case MODIFYVM_FAULT_TOLERANCE:
-            {
-                if (!RTStrICmp(ValueUnion.psz, "master"))
-                {
-                    CHECK_ERROR(sessionMachine, COMSETTER(FaultToleranceState(FaultToleranceState_Master)));
-                }
-                else
-                if (!RTStrICmp(ValueUnion.psz, "standby"))
-                {
-                    CHECK_ERROR(sessionMachine, COMSETTER(FaultToleranceState(FaultToleranceState_Standby)));
-                }
-                else
-                {
-                    errorArgument("Invalid --faulttolerance argument '%s'", ValueUnion.psz);
-                    rc = E_FAIL;
-                }
-                break;
-            }
-
-            case MODIFYVM_FAULT_TOLERANCE_ADDRESS:
-            {
-                CHECK_ERROR(sessionMachine, COMSETTER(FaultToleranceAddress)(Bstr(ValueUnion.psz).raw()));
-                break;
-            }
-
-            case MODIFYVM_FAULT_TOLERANCE_PORT:
-            {
-                CHECK_ERROR(sessionMachine, COMSETTER(FaultTolerancePort)(ValueUnion.u32));
-                break;
-            }
-
-            case MODIFYVM_FAULT_TOLERANCE_PASSWORD:
-            {
-                CHECK_ERROR(sessionMachine, COMSETTER(FaultTolerancePassword)(Bstr(ValueUnion.psz).raw()));
-                break;
-            }
-
-            case MODIFYVM_FAULT_TOLERANCE_SYNC_INTERVAL:
-            {
-                CHECK_ERROR(sessionMachine, COMSETTER(FaultToleranceSyncInterval)(ValueUnion.u32));
-                break;
-            }
-
             case MODIFYVM_HARDWARE_UUID:
             {
Index: /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp	(revision 80073)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp	(revision 80074)
@@ -79,5 +79,4 @@
         case KMachineState_TeleportingPausedVM:    return QColor(Qt::blue);
         case KMachineState_TeleportingIn:          return QColor(Qt::blue);
-        // case KMachineState_FaultTolerantSyncing:
         case KMachineState_DeletingSnapshotOnline: return QColor(Qt::green);
         case KMachineState_DeletingSnapshotPaused: return QColor(Qt::darkGreen);
@@ -116,5 +115,4 @@
         case KMachineState_TeleportingPausedVM:    return UIIconPool::iconSet(":/state_saving_16px.png");
         case KMachineState_TeleportingIn:          return UIIconPool::iconSet(":/state_restoring_16px.png");
-        // case KMachineState_FaultTolerantSyncing:
         case KMachineState_DeletingSnapshotOnline: return UIIconPool::iconSet(":/state_discarding_16px.png");
         case KMachineState_DeletingSnapshotPaused: return UIIconPool::iconSet(":/state_discarding_16px.png");
@@ -153,5 +151,4 @@
         case KMachineState_TeleportingPausedVM:    return QApplication::translate("UICommon", "Teleporting Paused VM", "MachineState");
         case KMachineState_TeleportingIn:          return QApplication::translate("UICommon", "Teleporting", "MachineState");
-        case KMachineState_FaultTolerantSyncing:   return QApplication::translate("UICommon", "Fault Tolerant Syncing", "MachineState");
         case KMachineState_DeletingSnapshotOnline: return QApplication::translate("UICommon", "Deleting Snapshot", "MachineState");
         case KMachineState_DeletingSnapshotPaused: return QApplication::translate("UICommon", "Deleting Snapshot", "MachineState");
Index: /trunk/src/VBox/Main/cbinding/tstCAPIGlue.c
===================================================================
--- /trunk/src/VBox/Main/cbinding/tstCAPIGlue.c	(revision 80073)
+++ /trunk/src/VBox/Main/cbinding/tstCAPIGlue.c	(revision 80074)
@@ -85,5 +85,4 @@
         case MachineState_TeleportingPausedVM: return "TeleportingPausedVM";
         case MachineState_TeleportingIn:       return "TeleportingIn";
-        case MachineState_FaultTolerantSyncing: return "FaultTolerantSyncing";
         case MachineState_DeletingSnapshotOnline: return "DeletingSnapshotOnline";
         case MachineState_DeletingSnapshotPaused: return "DeletingSnapshotPaused";
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 80073)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 80074)
@@ -628,5 +628,5 @@
   <enum
     name="MachineState"
-    uuid="87f085c3-ca67-4e45-9225-6057f32e9e8e"
+    uuid="00bc01b5-00a4-48db-000a-9061008357aa"
     >
     <desc>
@@ -865,10 +865,5 @@
       </desc>
     </const>
-    <const name="FaultTolerantSyncing"      value="16">
-      <desc>
-        The machine is being synced with a fault tolerant VM running elsewhere.
-      </desc>
-    </const>
-    <const name="DeletingSnapshotOnline"    value="17">
+    <const name="DeletingSnapshotOnline"    value="16">
       <desc>
         Like @c DeletingSnapshot, but the merging of media is ongoing in
@@ -876,5 +871,5 @@
       </desc>
     </const>
-    <const name="DeletingSnapshotPaused"    value="18">
+    <const name="DeletingSnapshotPaused"    value="17">
       <desc>
         Like @c DeletingSnapshotOnline, but the machine was paused when the
@@ -882,5 +877,5 @@
       </desc>
     </const>
-    <const name="OnlineSnapshotting"        value="19">
+    <const name="OnlineSnapshotting"        value="18">
       <desc>
         Like @c LiveSnapshotting, but the machine was paused when the
@@ -888,10 +883,10 @@
       </desc>
     </const>
-    <const name="RestoringSnapshot"         value="20">
+    <const name="RestoringSnapshot"         value="19">
       <desc>
         A machine snapshot is being restored; this typically does not take long.
       </desc>
     </const>
-    <const name="DeletingSnapshot"          value="21">
+    <const name="DeletingSnapshot"          value="20">
       <desc>
         A machine snapshot is being deleted; this can take a long time since this
@@ -900,10 +895,10 @@
       </desc>
     </const>
-    <const name="SettingUp"                 value="22">
+    <const name="SettingUp"                 value="21">
       <desc>
         Lengthy setup operation is in progress.
       </desc>
     </const>
-    <const name="Snapshotting"              value="23">
+    <const name="Snapshotting"              value="22">
       <desc>
         Taking an (offline) snapshot.
@@ -916,5 +911,5 @@
       </desc>
     </const>
-    <const name="LastOnline" value="19" wsmap="suppress"> <!-- OnlineSnapshotting -->
+    <const name="LastOnline" value="18" wsmap="suppress"> <!-- OnlineSnapshotting -->
       <desc>
         Pseudo-state: last online state (for use in relational expressions).
@@ -927,5 +922,5 @@
       </desc>
     </const>
-    <const name="LastTransient" value="23" wsmap="suppress"> <!-- Snapshotting -->
+    <const name="LastTransient" value="22" wsmap="suppress"> <!-- Snapshotting -->
       <desc>
         Pseudo-state: last transient state (for use in relational expressions).
@@ -1178,22 +1173,4 @@
     <const name="KVM"      value="5">
       <desc>Linux KVM.</desc>
-    </const>
-  </enum>
-
-  <enum
-    name="FaultToleranceState"
-    uuid="5124f7ec-6b67-493c-9dee-ee45a44114e1"
-    >
-    <desc>
-      Used with <link to="IMachine::faultToleranceState" />.
-    </desc>
-    <const name="Inactive" value="1">
-      <desc>No fault tolerance enabled.</desc>
-    </const>
-    <const name="Master" value="2">
-      <desc>Fault tolerant master VM.</desc>
-    </const>
-    <const name="Standby" value="3">
-      <desc>Fault tolerant standby VM.</desc>
     </const>
   </enum>
@@ -5851,9 +5828,9 @@
   <interface
     name="IMachine" extends="$unknown"
-    uuid="5047460a-265d-4538-b23e-ddba5fb84976"
+    uuid="008d62ad-00dc-4685-00f4-60bf00fc0dbd"
     wsmap="managed"
     wrap-hint-server-addinterfaces="IInternalMachineControl"
     wrap-hint-server="manualaddinterfaces"
-    reservedMethods="8" reservedAttributes="10"
+    reservedMethods="8" reservedAttributes="12"
     >
     <!-- Note! This interface is not compatible between 5.0 and 5.1 as it had too many
@@ -6454,39 +6431,4 @@
       <desc>
         The paravirtualized guest interface provider.
-      </desc>
-    </attribute>
-
-    <attribute name="faultToleranceState" type="FaultToleranceState">
-      <desc>
-        Fault tolerance state; disabled, source or target.
-        This property can be changed at any time. If you change it for a running
-        VM, then the fault tolerance address and port must be set beforehand.
-      </desc>
-    </attribute>
-
-    <attribute name="faultTolerancePort" type="unsigned long">
-      <desc>
-        The TCP port the fault tolerance source or target will use for
-        communication.
-      </desc>
-    </attribute>
-
-    <attribute name="faultToleranceAddress" type="wstring">
-      <desc>
-        The address the fault tolerance source or target.
-      </desc>
-    </attribute>
-
-    <attribute name="faultTolerancePassword" type="wstring">
-      <desc>
-        The password to check for on the standby VM. This is just a
-        very basic measure to prevent simple hacks and operators accidentally
-        choosing the wrong standby VM.
-      </desc>
-    </attribute>
-
-    <attribute name="faultToleranceSyncInterval" type="unsigned long">
-      <desc>
-        The interval in ms used for syncing the state between source and target.
       </desc>
     </attribute>
Index: /trunk/src/VBox/Main/include/MachineImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/MachineImpl.h	(revision 80073)
+++ /trunk/src/VBox/Main/include/MachineImpl.h	(revision 80074)
@@ -942,14 +942,4 @@
     HRESULT getParavirtDebug(com::Utf8Str &aParavirtDebug);
     HRESULT setParavirtDebug(const com::Utf8Str &aParavirtDebug);
-    HRESULT getFaultToleranceState(FaultToleranceState_T *aFaultToleranceState);
-    HRESULT setFaultToleranceState(FaultToleranceState_T aFaultToleranceState);
-    HRESULT getFaultTolerancePort(ULONG *aFaultTolerancePort);
-    HRESULT setFaultTolerancePort(ULONG aFaultTolerancePort);
-    HRESULT getFaultToleranceAddress(com::Utf8Str &aFaultToleranceAddress);
-    HRESULT setFaultToleranceAddress(const com::Utf8Str &aFaultToleranceAddress);
-    HRESULT getFaultTolerancePassword(com::Utf8Str &aFaultTolerancePassword);
-    HRESULT setFaultTolerancePassword(const com::Utf8Str &aFaultTolerancePassword);
-    HRESULT getFaultToleranceSyncInterval(ULONG *aFaultToleranceSyncInterval);
-    HRESULT setFaultToleranceSyncInterval(ULONG aFaultToleranceSyncInterval);
     HRESULT getRTCUseUTC(BOOL *aRTCUseUTC);
     HRESULT setRTCUseUTC(BOOL aRTCUseUTC);
Index: /trunk/src/VBox/Main/src-all/Global.cpp
===================================================================
--- /trunk/src/VBox/Main/src-all/Global.cpp	(revision 80073)
+++ /trunk/src/VBox/Main/src-all/Global.cpp	(revision 80074)
@@ -600,5 +600,4 @@
         case MachineState_TeleportingPausedVM:  return "TeleportingPausedVM";
         case MachineState_TeleportingIn:        return "TeleportingIn";
-        case MachineState_FaultTolerantSyncing: return "FaultTolerantSyncing";
         case MachineState_DeletingSnapshotOnline: return "DeletingSnapshotOnline";
         case MachineState_DeletingSnapshotPaused: return "DeletingSnapshotPaused";
Index: /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp	(revision 80073)
+++ /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp	(revision 80074)
@@ -118,5 +118,4 @@
 #endif /* VBOX_WITH_NETSHAPER */
 #include <VBox/vmm/mm.h>
-#include <VBox/vmm/ftm.h>
 #include <VBox/vmm/ssm.h>
 #include <VBox/err.h>
@@ -231,10 +230,8 @@
     VMPowerUpTask(Console *aConsole,
                   Progress *aProgress)
-        : VMTask(aConsole, aProgress, NULL /* aServerProgress */,
-                 false /* aUsesVMPtr */),
-          mConfigConstructor(NULL),
-          mStartPaused(false),
-          mTeleporterEnabled(FALSE),
-          mEnmFaultToleranceState(FaultToleranceState_Inactive)
+        : VMTask(aConsole, aProgress, NULL /* aServerProgress */, false /* aUsesVMPtr */)
+        , mConfigConstructor(NULL)
+        , mStartPaused(false)
+        , mTeleporterEnabled(FALSE)
     {
         m_strTaskName = "VMPwrUp";
@@ -246,5 +243,4 @@
     bool mStartPaused;
     BOOL mTeleporterEnabled;
-    FaultToleranceState_T mEnmFaultToleranceState;
 
     /* array of progress objects for hard disk reset operations */
@@ -2167,14 +2163,4 @@
             return setError(VBOX_E_INVALID_VM_STATE, tr("Cannot power down at this point in a live snapshot"));
 
-        /* Try cancel the FT sync. */
-        case MachineState_FaultTolerantSyncing:
-            if (!mptrCancelableProgress.isNull())
-            {
-                HRESULT hrc = mptrCancelableProgress->Cancel();
-                if (SUCCEEDED(hrc))
-                    break;
-            }
-            return setError(VBOX_E_INVALID_VM_STATE, tr("Cannot power down at this point in a fault tolerant sync"));
-
         /* extra nice error message for a common case */
         case MachineState_Saved:
@@ -7181,5 +7167,4 @@
         case VMSTATE_RUNNING:
         case VMSTATE_RUNNING_LS:
-        case VMSTATE_RUNNING_FT:
         case VMSTATE_RESETTING:
         case VMSTATE_RESETTING_LS:
@@ -7654,11 +7639,4 @@
 #endif
 
-        /* test the FaultToleranceState property  */
-        FaultToleranceState_T enmFaultToleranceState;
-        rc = mMachine->COMGETTER(FaultToleranceState)(&enmFaultToleranceState);
-        if (FAILED(rc))
-            throw rc;
-        BOOL fFaultToleranceSyncEnabled = (enmFaultToleranceState == FaultToleranceState_Standby);
-
         /* Create a progress object to track progress of this operation. Must
          * be done as early as possible (together with BeginPowerUp()) as this
@@ -7671,6 +7649,4 @@
         else if (fTeleporterEnabled)
             progressDesc = tr("Teleporting virtual machine");
-        else if (fFaultToleranceSyncEnabled)
-            progressDesc = tr("Fault Tolerance syncing of remote virtual machine");
         else
             progressDesc = tr("Starting virtual machine");
@@ -7752,5 +7728,4 @@
             catch (std::bad_alloc &) { throw rc = E_OUTOFMEMORY; }
         task->mTeleporterEnabled = fTeleporterEnabled;
-        task->mEnmFaultToleranceState = enmFaultToleranceState;
 
         /* Reset differencing hard disks for which autoReset is true,
@@ -7893,5 +7868,5 @@
         }
         else if (   mMachineState == MachineState_Saved
-                 || (!fTeleporterEnabled && !fFaultToleranceSyncEnabled))
+                 || !fTeleporterEnabled)
         {
             rc = pPowerupProgress->init(static_cast<IConsole *>(this),
@@ -7907,14 +7882,4 @@
                                         10   /* ulTotalOperationsWeight */,
                                         Bstr(tr("Teleporting virtual machine")).raw(),
-                                        1    /* ulFirstOperationWeight */);
-        }
-        else if (fFaultToleranceSyncEnabled)
-        {
-            rc = pPowerupProgress->init(static_cast<IConsole *>(this),
-                                        progressDesc.raw(),
-                                        TRUE /* aCancelable */,
-                                        3    /* cOperations */,
-                                        10   /* ulTotalOperationsWeight */,
-                                        Bstr(tr("Fault Tolerance syncing of remote virtual machine")).raw(),
                                         1    /* ulFirstOperationWeight */);
         }
@@ -8021,6 +7986,4 @@
         else if (fTeleporterEnabled)
             i_setMachineState(MachineState_TeleportingIn);
-        else if (enmFaultToleranceState == FaultToleranceState_Standby)
-            i_setMachineState(MachineState_FaultTolerantSyncing);
         else
             i_setMachineState(MachineState_Starting);
@@ -8121,5 +8084,4 @@
               || mMachineState == MachineState_Restoring
               || mMachineState == MachineState_TeleportingPausedVM
-              || mMachineState == MachineState_FaultTolerantSyncing
               || mMachineState == MachineState_TeleportingIn
               , ("Invalid machine state: %s\n", Global::stringifyMachineState(mMachineState)));
@@ -8136,5 +8098,4 @@
         && (   mMachineState == MachineState_Starting
             || mMachineState == MachineState_Restoring
-            || mMachineState == MachineState_FaultTolerantSyncing
             || mMachineState == MachineState_TeleportingIn)
        )
@@ -8155,5 +8116,4 @@
         && mMachineState != MachineState_TeleportingIn
         && mMachineState != MachineState_TeleportingPausedVM
-        && mMachineState != MachineState_FaultTolerantSyncing
        )
         i_setMachineState(MachineState_Stopping);
@@ -8982,5 +8942,4 @@
                 && that->mMachineState != MachineState_Restoring
                 && that->mMachineState != MachineState_TeleportingIn
-                && that->mMachineState != MachineState_FaultTolerantSyncing
                 && that->mMachineState != MachineState_TeleportingPausedVM
                 && !that->mVMIsAlreadyPoweringOff
@@ -9108,8 +9067,4 @@
                     that->i_setMachineState(MachineState_Teleported);
                     break;
-                case MachineState_FaultTolerantSyncing:
-                    /* Fault tolerant sync failed or was canceled.  Back to powered off. */
-                    that->i_setMachineState(MachineState_PoweredOff);
-                    break;
             }
             break;
@@ -9153,5 +9108,4 @@
                 case MachineState_Stopping:
                 case MachineState_TeleportingIn:
-                case MachineState_FaultTolerantSyncing:
                 case MachineState_OnlineSnapshotting:
                     /* The worker thread handles the transition. */
@@ -9205,6 +9159,5 @@
         {
             if (   enmOldState == VMSTATE_POWERING_ON
-                || enmOldState == VMSTATE_RESUMING
-                || enmOldState == VMSTATE_RUNNING_FT)
+                || enmOldState == VMSTATE_RESUMING)
             {
                 AutoWriteLock alock(that COMMA_LOCKVAL_SRC_POS);
@@ -9221,7 +9174,5 @@
                                || that->mMachineState == MachineState_Saving
                               )
-                           && enmOldState == VMSTATE_RESUMING)
-                       || (   that->mMachineState == MachineState_FaultTolerantSyncing
-                           && enmOldState == VMSTATE_RUNNING_FT));
+                           && enmOldState == VMSTATE_RESUMING));
 
                 that->i_setMachineState(MachineState_Running);
@@ -9234,10 +9185,4 @@
             AssertMsg(   that->mMachineState == MachineState_LiveSnapshotting
                       || that->mMachineState == MachineState_Teleporting,
-                      ("%s/%s -> %s\n", Global::stringifyMachineState(that->mMachineState),
-                      VMR3GetStateName(enmOldState), VMR3GetStateName(enmState) ));
-            break;
-
-        case VMSTATE_RUNNING_FT:
-            AssertMsg(that->mMachineState == MachineState_FaultTolerantSyncing,
                       ("%s/%s -> %s\n", Global::stringifyMachineState(that->mMachineState),
                       VMR3GetStateName(enmOldState), VMR3GetStateName(enmState) ));
@@ -10210,14 +10155,4 @@
 }
 
-/**
- * Progress cancelation callback for fault tolerance VM poweron
- */
-static void faultToleranceProgressCancelCallback(void *pvUser)
-{
-    PUVM pUVM = (PUVM)pvUser;
-
-    if (pUVM)
-        FTMR3CancelStandby(pUVM);
-}
 
 /**
@@ -10292,6 +10227,5 @@
          *       SessionMachine::i_setMachineState() when the VM is powered down.
          */
-        if (    !pTask->mTeleporterEnabled
-            &&  pTask->mEnmFaultToleranceState != FaultToleranceState_Standby)
+        if (!pTask->mTeleporterEnabled)
         {
             rc = pConsole->mControl->LockMedia();
@@ -10516,58 +10450,4 @@
                         pConsole->mptrExtPackManager->i_callAllVmPowerOffHooks(pConsole, pVM);
 #endif
-                    }
-                }
-                else if (pTask->mEnmFaultToleranceState != FaultToleranceState_Inactive)
-                {
-                    /*
-                     * Get the config.
-                     */
-                    ULONG uPort;
-                    rc = pMachine->COMGETTER(FaultTolerancePort)(&uPort);
-                    if (SUCCEEDED(rc))
-                    {
-                        ULONG uInterval;
-                        rc = pMachine->COMGETTER(FaultToleranceSyncInterval)(&uInterval);
-                        if (SUCCEEDED(rc))
-                        {
-                            Bstr bstrAddress;
-                            rc = pMachine->COMGETTER(FaultToleranceAddress)(bstrAddress.asOutParam());
-                            if (SUCCEEDED(rc))
-                            {
-                                Bstr bstrPassword;
-                                rc = pMachine->COMGETTER(FaultTolerancePassword)(bstrPassword.asOutParam());
-                                if (SUCCEEDED(rc))
-                                {
-                                    if (pTask->mProgress->i_setCancelCallback(faultToleranceProgressCancelCallback,
-                                                                              pConsole->mpUVM))
-                                    {
-                                        if (SUCCEEDED(rc))
-                                        {
-                                            Utf8Str strAddress(bstrAddress);
-                                            const char *pszAddress = strAddress.isEmpty() ? NULL : strAddress.c_str();
-                                            Utf8Str strPassword(bstrPassword);
-                                            const char *pszPassword = strPassword.isEmpty() ? NULL : strPassword.c_str();
-
-                                            /* Power on the FT enabled VM. */
-#ifdef VBOX_WITH_EXTPACK
-                                            vrc = pConsole->mptrExtPackManager->i_callAllVmPowerOnHooks(pConsole, pVM);
-#endif
-                                            if (RT_SUCCESS(vrc))
-                                                vrc = FTMR3PowerOn(pConsole->mpUVM,
-                                                                   pTask->mEnmFaultToleranceState == FaultToleranceState_Master /* fMaster */,
-                                                                   uInterval,
-                                                                   pszAddress,
-                                                                   uPort,
-                                                                   pszPassword);
-                                            AssertLogRelRC(vrc);
-                                        }
-                                        pTask->mProgress->i_setCancelCallback(NULL, NULL);
-                                    }
-                                    else
-                                        rc = E_FAIL;
-
-                                }
-                            }
-                        }
                     }
                 }
Index: /trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp	(revision 80073)
+++ /trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp	(revision 80074)
@@ -4792,6 +4792,5 @@
                  *        that. Grumble. */
                 if (   enmType == DeviceType_HardDisk
-                    && (   aMachineState == MachineState_TeleportingIn
-                        || aMachineState == MachineState_FaultTolerantSyncing))
+                    && aMachineState == MachineState_TeleportingIn)
                     InsertConfigInteger(pCfg, "TempReadOnly", 1);
 
Index: /trunk/src/VBox/Main/src-client/MachineDebuggerImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/MachineDebuggerImpl.cpp	(revision 80073)
+++ /trunk/src/VBox/Main/src-client/MachineDebuggerImpl.cpp	(revision 80074)
@@ -1378,6 +1378,5 @@
             VMSTATE enmVmState = VMR3GetStateU(ptrVM.rawUVM());
             if (   enmVmState == VMSTATE_RUNNING
-                || enmVmState == VMSTATE_RUNNING_LS
-                || enmVmState == VMSTATE_RUNNING_FT)
+                || enmVmState == VMSTATE_RUNNING_LS)
             {
                 alock.release();
Index: /trunk/src/VBox/Main/src-server/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 80073)
+++ /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 80074)
@@ -2894,116 +2894,4 @@
 
     return hrc;
-}
-
-HRESULT Machine::getFaultToleranceState(FaultToleranceState_T *aFaultToleranceState)
-{
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    *aFaultToleranceState = mUserData->s.enmFaultToleranceState;
-    return S_OK;
-}
-
-HRESULT Machine::setFaultToleranceState(FaultToleranceState_T aFaultToleranceState)
-{
-    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    /** @todo deal with running state change. */
-    HRESULT rc = i_checkStateDependency(MutableOrSavedOrRunningStateDep);
-    if (FAILED(rc)) return rc;
-
-    i_setModified(IsModified_MachineData);
-    mUserData.backup();
-    mUserData->s.enmFaultToleranceState = aFaultToleranceState;
-    return S_OK;
-}
-
-HRESULT Machine::getFaultToleranceAddress(com::Utf8Str &aFaultToleranceAddress)
-{
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    aFaultToleranceAddress = mUserData->s.strFaultToleranceAddress;
-    return S_OK;
-}
-
-HRESULT Machine::setFaultToleranceAddress(const com::Utf8Str &aFaultToleranceAddress)
-{
-    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    /** @todo deal with running state change. */
-    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
-    if (FAILED(rc)) return rc;
-
-    i_setModified(IsModified_MachineData);
-    mUserData.backup();
-    mUserData->s.strFaultToleranceAddress = aFaultToleranceAddress;
-    return S_OK;
-}
-
-HRESULT Machine::getFaultTolerancePort(ULONG *aFaultTolerancePort)
-{
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    *aFaultTolerancePort = mUserData->s.uFaultTolerancePort;
-    return S_OK;
-}
-
-HRESULT Machine::setFaultTolerancePort(ULONG aFaultTolerancePort)
-{
-    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    /** @todo deal with running state change. */
-    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
-    if (FAILED(rc)) return rc;
-
-    i_setModified(IsModified_MachineData);
-    mUserData.backup();
-    mUserData->s.uFaultTolerancePort = aFaultTolerancePort;
-    return S_OK;
-}
-
-HRESULT Machine::getFaultTolerancePassword(com::Utf8Str &aFaultTolerancePassword)
-{
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    aFaultTolerancePassword = mUserData->s.strFaultTolerancePassword;
-
-    return S_OK;
-}
-
-HRESULT Machine::setFaultTolerancePassword(const com::Utf8Str &aFaultTolerancePassword)
-{
-    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    /** @todo deal with running state change. */
-    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
-    if (FAILED(rc)) return rc;
-
-    i_setModified(IsModified_MachineData);
-    mUserData.backup();
-    mUserData->s.strFaultTolerancePassword = aFaultTolerancePassword;
-
-    return S_OK;
-}
-
-HRESULT Machine::getFaultToleranceSyncInterval(ULONG *aFaultToleranceSyncInterval)
-{
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    *aFaultToleranceSyncInterval = mUserData->s.uFaultToleranceInterval;
-    return S_OK;
-}
-
-HRESULT Machine::setFaultToleranceSyncInterval(ULONG aFaultToleranceSyncInterval)
-{
-    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    /** @todo deal with running state change. */
-    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
-    if (FAILED(rc)) return rc;
-
-    i_setModified(IsModified_MachineData);
-    mUserData.backup();
-    mUserData->s.uFaultToleranceInterval = aFaultToleranceSyncInterval;
-    return S_OK;
 }
 
Index: /trunk/src/VBox/Main/xml/Settings.cpp
===================================================================
--- /trunk/src/VBox/Main/xml/Settings.cpp	(revision 80073)
+++ /trunk/src/VBox/Main/xml/Settings.cpp	(revision 80074)
@@ -3566,7 +3566,4 @@
     fTeleporterEnabled(false),
     uTeleporterPort(0),
-    enmFaultToleranceState(FaultToleranceState_Inactive),
-    uFaultTolerancePort(0),
-    uFaultToleranceInterval(0),
     fRTCUseUTC(false),
     enmVMPriority(VMProcPriority_Default)
@@ -3594,9 +3591,4 @@
             && strTeleporterAddress       == c.strTeleporterAddress
             && strTeleporterPassword      == c.strTeleporterPassword
-            && enmFaultToleranceState     == c.enmFaultToleranceState
-            && uFaultTolerancePort        == c.uFaultTolerancePort
-            && uFaultToleranceInterval    == c.uFaultToleranceInterval
-            && strFaultToleranceAddress   == c.strFaultToleranceAddress
-            && strFaultTolerancePassword  == c.strFaultTolerancePassword
             && fRTCUseUTC                 == c.fRTCUseUTC
             && ovIcon                     == c.ovIcon
@@ -5672,22 +5664,4 @@
             else if (pelmMachineChild->nameEquals("Teleporter"))
                 readTeleporter(pelmMachineChild, &machineUserData);
-            else if (pelmMachineChild->nameEquals("FaultTolerance"))
-            {
-                Utf8Str strFaultToleranceSate;
-                if (pelmMachineChild->getAttributeValue("state", strFaultToleranceSate))
-                {
-                    if (strFaultToleranceSate == "master")
-                        machineUserData.enmFaultToleranceState = FaultToleranceState_Master;
-                    else
-                    if (strFaultToleranceSate == "standby")
-                        machineUserData.enmFaultToleranceState = FaultToleranceState_Standby;
-                    else
-                        machineUserData.enmFaultToleranceState = FaultToleranceState_Inactive;
-                }
-                pelmMachineChild->getAttributeValue("port", machineUserData.uFaultTolerancePort);
-                pelmMachineChild->getAttributeValue("address", machineUserData.strFaultToleranceAddress);
-                pelmMachineChild->getAttributeValue("interval", machineUserData.uFaultToleranceInterval);
-                pelmMachineChild->getAttributeValue("password", machineUserData.strFaultTolerancePassword);
-            }
             else if (pelmMachineChild->nameEquals("MediaRegistry"))
                 readMediaRegistry(*pelmMachineChild, mediaRegistry);
@@ -7355,36 +7329,4 @@
     }
 
-    if (    m->sv >= SettingsVersion_v1_11
-        &&  (   machineUserData.enmFaultToleranceState != FaultToleranceState_Inactive
-            ||  machineUserData.uFaultTolerancePort
-            ||  machineUserData.uFaultToleranceInterval
-            ||  !machineUserData.strFaultToleranceAddress.isEmpty()
-            )
-       )
-    {
-        xml::ElementNode *pelmFaultTolerance = elmMachine.createChild("FaultTolerance");
-        switch (machineUserData.enmFaultToleranceState)
-        {
-            case FaultToleranceState_Inactive:
-                pelmFaultTolerance->setAttribute("state", "inactive");
-                break;
-            case FaultToleranceState_Master:
-                pelmFaultTolerance->setAttribute("state", "master");
-                break;
-            case FaultToleranceState_Standby:
-                pelmFaultTolerance->setAttribute("state", "standby");
-                break;
-#ifdef VBOX_WITH_XPCOM_CPP_ENUM_HACK
-            case FaultToleranceState_32BitHack: /* (compiler warnings) */
-                AssertFailedBreak();
-#endif
-        }
-
-        pelmFaultTolerance->setAttribute("port", machineUserData.uFaultTolerancePort);
-        pelmFaultTolerance->setAttribute("address", machineUserData.strFaultToleranceAddress);
-        pelmFaultTolerance->setAttribute("interval", machineUserData.uFaultToleranceInterval);
-        pelmFaultTolerance->setAttribute("password", machineUserData.strFaultTolerancePassword);
-    }
-
     if (    (fl & BuildMachineXML_MediaRegistry)
          && (m->sv >= SettingsVersion_v1_11)
@@ -7814,13 +7756,9 @@
     if (m->sv < SettingsVersion_v1_11)
     {
-        // VirtualBox 4.0 adds HD audio, CPU priorities, fault tolerance,
+        // VirtualBox 4.0 adds HD audio, CPU priorities, ~fault tolerance~,
         // per-machine media registries, VRDE, JRockitVE, bandwidth groups,
         // ICH9 chipset
         if (    hardwareMachine.audioAdapter.controllerType == AudioControllerType_HDA
              || hardwareMachine.ulCpuExecutionCap != 100
-             || machineUserData.enmFaultToleranceState != FaultToleranceState_Inactive
-             || machineUserData.uFaultTolerancePort
-             || machineUserData.uFaultToleranceInterval
-             || !machineUserData.strFaultToleranceAddress.isEmpty()
              || mediaRegistry.llHardDisks.size()
              || mediaRegistry.llDvdImages.size()
Index: /trunk/src/VBox/Main/xml/VirtualBox-settings.xsd
===================================================================
--- /trunk/src/VBox/Main/xml/VirtualBox-settings.xsd	(revision 80073)
+++ /trunk/src/VBox/Main/xml/VirtualBox-settings.xsd	(revision 80074)
@@ -1319,20 +1319,4 @@
 </xsd:complexType>
 
-<xsd:complexType name="TFaultTolerance">
-  <xsd:attribute name="state" use="required">
-    <xsd:simpleType>
-      <xsd:restriction base="xsd:token">
-        <xsd:enumeration value="inactive"/>
-        <xsd:enumeration value="master"/>
-        <xsd:enumeration value="standby"/>
-      </xsd:restriction>
-    </xsd:simpleType>
-  </xsd:attribute>
-  <xsd:attribute name="port" type="xsd:unsignedShort"/>
-  <xsd:attribute name="address" type="xsd:string"/>
-  <xsd:attribute name="interval" type="xsd:unsignedInt"/>
-  <xsd:attribute name="password" type="xsd:string"/>
-</xsd:complexType>
-
 <xsd:complexType name="THardware">
   <xsd:all>
@@ -1430,5 +1414,4 @@
     <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
     <xsd:element name="Teleporter" type="TTeleporter" minOccurs="0"/>
-    <xsd:element name="FaultTolerance" type="TFaultTolerance" minOccurs="0"/>
     <xsd:element name="Hardware" type="THardware"/>
     <xsd:element name="StorageControllers" type="TStorageControllers" minOccurs="0"/>
Index: /trunk/src/VBox/VMM/Makefile.kmk
===================================================================
--- /trunk/src/VBox/VMM/Makefile.kmk	(revision 80073)
+++ /trunk/src/VBox/VMM/Makefile.kmk	(revision 80074)
@@ -114,5 +114,4 @@
 	VMMR3/EMHM.cpp \
 	VMMR3/EMR3Nem.cpp \
-	VMMR3/FTM.cpp \
 	VMMR3/GIM.cpp \
 	VMMR3/GIMHv.cpp \
@@ -196,5 +195,4 @@
 	VMMAll/SELMAll.cpp \
 	VMMAll/EMAll.cpp \
-	VMMAll/FTMAll.cpp \
 	VMMAll/GIMAll.cpp \
 	VMMAll/GIMAllHv.cpp \
@@ -502,5 +500,4 @@
 	VMMAll/DBGFAll.cpp \
 	VMMAll/EMAll.cpp \
-	VMMAll/FTMAll.cpp \
 	VMMAll/GIMAll.cpp \
 	VMMAll/GIMAllHv.cpp \
Index: unk/src/VBox/VMM/VMMAll/FTMAll.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/FTMAll.cpp	(revision 80073)
+++ 	(revision )
@@ -1,65 +1,0 @@
-/* $Id$ */
-/** @file
- * FTM - Fault Tolerance Manager - All contexts
- */
-
-/*
- * Copyright (C) 2010-2019 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-
-/*********************************************************************************************************************************
-*   Header Files                                                                                                                 *
-*********************************************************************************************************************************/
-#define LOG_GROUP LOG_GROUP_FTM
-#include "FTMInternal.h"
-#include <VBox/vmm/vm.h>
-#include <VBox/vmm/vmm.h>
-#include <iprt/errcore.h>
-#include <VBox/param.h>
-#include <VBox/log.h>
-
-#include <iprt/assert.h>
-
-
-/**
- * Sets a checkpoint for syncing the state with the standby node
- *
- * @returns VBox status code.
- *
- * @param   pVM         The cross context VM structure.
- * @param   enmType     Checkpoint type
- */
-VMM_INT_DECL(int) FTMSetCheckpoint(PVM pVM, FTMCHECKPOINTTYPE enmType)
-{
-    if (!pVM->fFaultTolerantMaster)
-        return VINF_SUCCESS;
-
-#ifdef IN_RING3
-    return FTMR3SetCheckpoint(pVM, enmType);
-#else
-    return VMMRZCallRing3(pVM, VMMGetCpu(pVM), VMMCALLRING3_FTM_SET_CHECKPOINT, enmType);
-#endif
-}
-
-
-/**
- * Checks if the delta save/load is enabled
- *
- * @returns true/false
- *
- * @param   pVM         The cross context VM structure.
- */
-VMM_INT_DECL(bool) FTMIsDeltaLoadSaveActive(PVM pVM)
-{
-    return pVM->ftm.s.fDeltaLoadSaveActive;
-}
-
Index: /trunk/src/VBox/VMM/VMMR0/PDMR0Device.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/PDMR0Device.cpp	(revision 80073)
+++ /trunk/src/VBox/VMM/VMMR0/PDMR0Device.cpp	(revision 80074)
@@ -770,12 +770,4 @@
 
 
-/** @interface_method_impl{PDMDRVHLPR0,pfnFTSetCheckpoint} */
-static DECLCALLBACK(int) pdmR0DrvHlp_FTSetCheckpoint(PPDMDRVINS pDrvIns, FTMCHECKPOINTTYPE enmType)
-{
-    PDMDRV_ASSERT_DRVINS(pDrvIns);
-    return FTMSetCheckpoint(pDrvIns->Internal.s.pVMR0, enmType);
-}
-
-
 /**
  * The Ring-0 Context Driver Helper Callbacks.
@@ -790,5 +782,4 @@
     pdmR0DrvHlp_AssertEMT,
     pdmR0DrvHlp_AssertOther,
-    pdmR0DrvHlp_FTSetCheckpoint,
     PDM_DRVHLPRC_VERSION
 };
Index: /trunk/src/VBox/VMM/VMMR3/EM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/EM.cpp	(revision 80073)
+++ /trunk/src/VBox/VMM/VMMR3/EM.cpp	(revision 80074)
@@ -3007,32 +3007,2 @@
 }
 
-/**
- * Notify EM of a state change (used by FTM)
- *
- * @param   pVM             The cross context VM structure.
- */
-VMMR3_INT_DECL(int) EMR3NotifySuspend(PVM pVM)
-{
-    PVMCPU pVCpu = VMMGetCpu(pVM);
-
-    TMR3NotifySuspend(pVM, pVCpu);  /* Stop the virtual time. */
-    pVCpu->em.s.enmPrevState = pVCpu->em.s.enmState;
-    pVCpu->em.s.enmState     = EMSTATE_SUSPENDED;
-    return VINF_SUCCESS;
-}
-
-/**
- * Notify EM of a state change (used by FTM)
- *
- * @param   pVM             The cross context VM structure.
- */
-VMMR3_INT_DECL(int) EMR3NotifyResume(PVM pVM)
-{
-    PVMCPU pVCpu = VMMGetCpu(pVM);
-    EMSTATE enmCurState = pVCpu->em.s.enmState;
-
-    TMR3NotifyResume(pVM, pVCpu);  /* Resume the virtual time. */
-    pVCpu->em.s.enmState     = pVCpu->em.s.enmPrevState;
-    pVCpu->em.s.enmPrevState = enmCurState;
-    return VINF_SUCCESS;
-}
Index: unk/src/VBox/VMM/VMMR3/FTM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/FTM.cpp	(revision 80073)
+++ 	(revision )
@@ -1,1368 +1,0 @@
-/* $Id$ */
-/** @file
- * FTM - Fault Tolerance Manager
- */
-
-/*
- * Copyright (C) 2010-2019 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-
-/*********************************************************************************************************************************
-*   Header Files                                                                                                                 *
-*********************************************************************************************************************************/
-#define LOG_GROUP LOG_GROUP_FTM
-#include <VBox/vmm/ftm.h>
-#include <VBox/vmm/em.h>
-#include <VBox/vmm/pdm.h>
-#include <VBox/vmm/pgm.h>
-#include <VBox/vmm/ssm.h>
-#include <VBox/vmm/vmm.h>
-#include "FTMInternal.h"
-#include <VBox/vmm/vm.h>
-#include <VBox/vmm/uvm.h>
-#include <VBox/err.h>
-#include <VBox/param.h>
-#include <VBox/log.h>
-
-#include <iprt/assert.h>
-#include <iprt/thread.h>
-#include <iprt/string.h>
-#include <iprt/mem.h>
-#include <iprt/tcp.h>
-#include <iprt/socket.h>
-#include <iprt/semaphore.h>
-#include <iprt/asm.h>
-
-
-/*******************************************************************************
- * Structures and Typedefs                                                     *
- *******************************************************************************/
-
-/**
- * TCP stream header.
- *
- * This is an extra layer for fixing the problem with figuring out when the SSM
- * stream ends.
- */
-typedef struct FTMTCPHDR
-{
-    /** Magic value. */
-    uint32_t    u32Magic;
-    /** The size of the data block following this header.
-     * 0 indicates the end of the stream, while UINT32_MAX indicates
-     * cancelation. */
-    uint32_t    cb;
-} FTMTCPHDR;
-/** Magic value for FTMTCPHDR::u32Magic. (Egberto Gismonti Amin) */
-#define FTMTCPHDR_MAGIC       UINT32_C(0x19471205)
-/** The max block size. */
-#define FTMTCPHDR_MAX_SIZE    UINT32_C(0x00fffff8)
-
-/**
- * TCP stream header.
- *
- * This is an extra layer for fixing the problem with figuring out when the SSM
- * stream ends.
- */
-typedef struct FTMTCPHDRMEM
-{
-    /** Magic value. */
-    uint32_t    u32Magic;
-    /** Size (Uncompressed) of the pages following the header. */
-    uint32_t    cbPageRange;
-    /** GC Physical address of the page(s) to sync. */
-    RTGCPHYS    GCPhys;
-    /** The size of the data block following this header.
-     * 0 indicates the end of the stream, while UINT32_MAX indicates
-     * cancelation. */
-    uint32_t    cb;
-} FTMTCPHDRMEM;
-
-
-/*********************************************************************************************************************************
-*   Global Variables                                                                                                             *
-*********************************************************************************************************************************/
-static const char g_szWelcome[] = "VirtualBox-Fault-Tolerance-Sync-1.0\n";
-
-static DECLCALLBACK(int) ftmR3PageTreeDestroyCallback(PAVLGCPHYSNODECORE pBaseNode, void *pvUser);
-
-/**
- * Initializes the FTM.
- *
- * @returns VBox status code.
- * @param   pVM         The cross context VM structure.
- */
-VMMR3_INT_DECL(int) FTMR3Init(PVM pVM)
-{
-    /*
-     * Assert alignment and sizes.
-     */
-    AssertCompile(sizeof(pVM->ftm.s) <= sizeof(pVM->ftm.padding));
-    AssertCompileMemberAlignment(FTM, CritSect, sizeof(uintptr_t));
-
-    /** @todo saved state for master nodes! */
-    pVM->ftm.s.pszAddress               = NULL;
-    pVM->ftm.s.pszPassword              = NULL;
-    pVM->fFaultTolerantMaster           = false;
-    pVM->ftm.s.fIsStandbyNode           = false;
-    pVM->ftm.s.standby.hServer          = NIL_RTTCPSERVER;
-    pVM->ftm.s.hShutdownEvent           = NIL_RTSEMEVENT;
-    pVM->ftm.s.hSocket                  = NIL_RTSOCKET;
-
-    /*
-     * Initialize the PGM critical section.
-     */
-    int rc = PDMR3CritSectInit(pVM, &pVM->ftm.s.CritSect, RT_SRC_POS, "FTM");
-    AssertRCReturn(rc, rc);
-
-    /*
-     * Register statistics.
-     */
-    STAM_REL_REG(pVM, &pVM->ftm.s.StatReceivedMem,               STAMTYPE_COUNTER, "/FT/Received/Mem",                  STAMUNIT_BYTES, "The amount of memory pages that was received.");
-    STAM_REL_REG(pVM, &pVM->ftm.s.StatReceivedState,             STAMTYPE_COUNTER, "/FT/Received/State",                STAMUNIT_BYTES, "The amount of state information that was received.");
-    STAM_REL_REG(pVM, &pVM->ftm.s.StatSentMem,                   STAMTYPE_COUNTER, "/FT/Sent/Mem",                      STAMUNIT_BYTES, "The amount of memory pages that was sent.");
-    STAM_REL_REG(pVM, &pVM->ftm.s.StatSentState,                 STAMTYPE_COUNTER, "/FT/Sent/State",                    STAMUNIT_BYTES, "The amount of state information that was sent.");
-    STAM_REL_REG(pVM, &pVM->ftm.s.StatDeltaVM,                   STAMTYPE_COUNTER, "/FT/Sync/DeltaVM",                  STAMUNIT_OCCURENCES, "Number of delta vm syncs.");
-    STAM_REL_REG(pVM, &pVM->ftm.s.StatFullSync,                  STAMTYPE_COUNTER, "/FT/Sync/Full",                     STAMUNIT_OCCURENCES, "Number of full vm syncs.");
-    STAM_REL_REG(pVM, &pVM->ftm.s.StatDeltaMem,                  STAMTYPE_COUNTER, "/FT/Sync/DeltaMem",                 STAMUNIT_OCCURENCES, "Number of delta mem syncs.");
-    STAM_REL_REG(pVM, &pVM->ftm.s.StatCheckpointStorage,         STAMTYPE_COUNTER, "/FT/Checkpoint/Storage",            STAMUNIT_OCCURENCES, "Number of storage checkpoints.");
-    STAM_REL_REG(pVM, &pVM->ftm.s.StatCheckpointNetwork,         STAMTYPE_COUNTER, "/FT/Checkpoint/Network",            STAMUNIT_OCCURENCES, "Number of network checkpoints.");
-#ifdef VBOX_WITH_STATISTICS
-    STAM_REG(pVM,     &pVM->ftm.s.StatCheckpoint,                STAMTYPE_PROFILE, "/FT/Checkpoint",                    STAMUNIT_TICKS_PER_CALL, "Profiling of FTMR3SetCheckpoint.");
-    STAM_REG(pVM,     &pVM->ftm.s.StatCheckpointPause,           STAMTYPE_PROFILE, "/FT/Checkpoint/Pause",              STAMUNIT_TICKS_PER_CALL, "Profiling of FTMR3SetCheckpoint.");
-    STAM_REG(pVM,     &pVM->ftm.s.StatCheckpointResume,          STAMTYPE_PROFILE, "/FT/Checkpoint/Resume",             STAMUNIT_TICKS_PER_CALL, "Profiling of FTMR3SetCheckpoint.");
-    STAM_REG(pVM,     &pVM->ftm.s.StatSentMemRAM,                STAMTYPE_COUNTER, "/FT/Sent/Mem/RAM",                  STAMUNIT_BYTES, "The amount of memory pages that was sent.");
-    STAM_REG(pVM,     &pVM->ftm.s.StatSentMemMMIO2,              STAMTYPE_COUNTER, "/FT/Sent/Mem/MMIO2",                STAMUNIT_BYTES, "The amount of memory pages that was sent.");
-    STAM_REG(pVM,     &pVM->ftm.s.StatSentMemShwROM,             STAMTYPE_COUNTER, "/FT/Sent/Mem/ShwROM",               STAMUNIT_BYTES, "The amount of memory pages that was sent.");
-    STAM_REG(pVM,     &pVM->ftm.s.StatSentStateWrite,            STAMTYPE_COUNTER, "/FT/Sent/State/Writes",             STAMUNIT_BYTES, "The nr of write calls.");
-#endif
-    return VINF_SUCCESS;
-}
-
-/**
- * Terminates the FTM.
- *
- * Termination means cleaning up and freeing all resources,
- * the VM itself is at this point powered off or suspended.
- *
- * @returns VBox status code.
- * @param   pVM         The cross context VM structure.
- */
-VMMR3_INT_DECL(int) FTMR3Term(PVM pVM)
-{
-    if (pVM->ftm.s.hShutdownEvent != NIL_RTSEMEVENT)
-    {
-        RTSemEventDestroy(pVM->ftm.s.hShutdownEvent);
-        pVM->ftm.s.hShutdownEvent = NIL_RTSEMEVENT;
-    }
-    if (pVM->ftm.s.hSocket != NIL_RTSOCKET)
-    {
-        RTTcpClientClose(pVM->ftm.s.hSocket);
-        pVM->ftm.s.hSocket = NIL_RTSOCKET;
-    }
-    if (pVM->ftm.s.standby.hServer)
-    {
-        RTTcpServerDestroy(pVM->ftm.s.standby.hServer);
-        pVM->ftm.s.standby.hServer = NULL;
-    }
-    if (pVM->ftm.s.pszAddress)
-        RTMemFree(pVM->ftm.s.pszAddress);
-    if (pVM->ftm.s.pszPassword)
-        RTMemFree(pVM->ftm.s.pszPassword);
-
-    /* Remove all pending memory updates. */
-    if (pVM->ftm.s.standby.pPhysPageTree)
-    {
-        RTAvlGCPhysDestroy(&pVM->ftm.s.standby.pPhysPageTree, ftmR3PageTreeDestroyCallback, NULL);
-        pVM->ftm.s.standby.pPhysPageTree = NULL;
-    }
-
-    pVM->ftm.s.pszAddress  = NULL;
-    pVM->ftm.s.pszPassword = NULL;
-
-    PDMR3CritSectDelete(&pVM->ftm.s.CritSect);
-    return VINF_SUCCESS;
-}
-
-
-static int ftmR3TcpWriteACK(PVM pVM)
-{
-    int rc = RTTcpWrite(pVM->ftm.s.hSocket, RT_STR_TUPLE("ACK\n"));
-    if (RT_FAILURE(rc))
-    {
-        LogRel(("FTSync: RTTcpWrite(,ACK,) -> %Rrc\n", rc));
-    }
-    return rc;
-}
-
-
-static int ftmR3TcpWriteNACK(PVM pVM, int32_t rc2, const char *pszMsgText = NULL)
-{
-    char    szMsg[256];
-    size_t  cch;
-    if (pszMsgText && *pszMsgText)
-    {
-        cch = RTStrPrintf(szMsg, sizeof(szMsg), "NACK=%d;%s\n", rc2, pszMsgText);
-        for (size_t off = 6; off + 1 < cch; off++)
-            if (szMsg[off] == '\n')
-                szMsg[off] = '\r';
-    }
-    else
-        cch = RTStrPrintf(szMsg, sizeof(szMsg), "NACK=%d\n", rc2);
-    int rc = RTTcpWrite(pVM->ftm.s.hSocket, szMsg, cch);
-    if (RT_FAILURE(rc))
-        LogRel(("FTSync: RTTcpWrite(,%s,%zu) -> %Rrc\n", szMsg, cch, rc));
-    return rc;
-}
-
-/**
- * Reads a string from the socket.
- *
- * @returns VBox status code.
- *
- * @param   pVM         The cross context VM structure.
- * @param   pszBuf      The output buffer.
- * @param   cchBuf      The size of the output buffer.
- *
- */
-static int ftmR3TcpReadLine(PVM pVM, char *pszBuf, size_t cchBuf)
-{
-    char       *pszStart = pszBuf;
-    RTSOCKET    Sock     = pVM->ftm.s.hSocket;
-
-    AssertReturn(cchBuf > 1, VERR_INTERNAL_ERROR);
-    *pszBuf = '\0';
-
-    /* dead simple approach. */
-    for (;;)
-    {
-        char ch;
-        int rc = RTTcpRead(Sock, &ch, sizeof(ch), NULL);
-        if (RT_FAILURE(rc))
-        {
-            LogRel(("FTSync: RTTcpRead -> %Rrc while reading string ('%s')\n", rc, pszStart));
-            return rc;
-        }
-        if (    ch == '\n'
-            ||  ch == '\0')
-            return VINF_SUCCESS;
-        if (cchBuf <= 1)
-        {
-            LogRel(("FTSync: String buffer overflow: '%s'\n", pszStart));
-            return VERR_BUFFER_OVERFLOW;
-        }
-        *pszBuf++ = ch;
-        *pszBuf = '\0';
-        cchBuf--;
-    }
-}
-
-/**
- * Reads an ACK or NACK.
- *
- * @returns VBox status code.
- * @param   pVM                 The cross context VM structure.
- * @param   pszWhich            Which ACK is this this?
- * @param   pszNAckMsg          Optional NACK message.
- */
-static int ftmR3TcpReadACK(PVM pVM, const char *pszWhich, const char *pszNAckMsg = NULL)
-{
-    char szMsg[256];
-    int rc = ftmR3TcpReadLine(pVM, szMsg, sizeof(szMsg));
-    if (RT_FAILURE(rc))
-        return rc;
-
-    if (!strcmp(szMsg, "ACK"))
-        return VINF_SUCCESS;
-
-    if (!strncmp(szMsg, RT_STR_TUPLE("NACK=")))
-    {
-        char *pszMsgText = strchr(szMsg, ';');
-        if (pszMsgText)
-            *pszMsgText++ = '\0';
-
-        int32_t vrc2;
-        rc = RTStrToInt32Full(&szMsg[sizeof("NACK=") - 1], 10, &vrc2);
-        if (rc == VINF_SUCCESS)
-        {
-            /*
-             * Well formed NACK, transform it into an error.
-             */
-            if (pszNAckMsg)
-            {
-                LogRel(("FTSync: %s: NACK=%Rrc (%d)\n", pszWhich, vrc2, vrc2));
-                return VERR_INTERNAL_ERROR;
-            }
-
-            if (pszMsgText)
-            {
-                pszMsgText = RTStrStrip(pszMsgText);
-                for (size_t off = 0; pszMsgText[off]; off++)
-                    if (pszMsgText[off] == '\r')
-                        pszMsgText[off] = '\n';
-
-                LogRel(("FTSync: %s: NACK=%Rrc (%d) - '%s'\n", pszWhich, vrc2, vrc2, pszMsgText));
-            }
-            return VERR_INTERNAL_ERROR_2;
-        }
-
-        if (pszMsgText)
-            pszMsgText[-1] = ';';
-    }
-    return VERR_INTERNAL_ERROR_3;
-}
-
-/**
- * Submitts a command to the destination and waits for the ACK.
- *
- * @returns VBox status code.
- *
- * @param   pVM                 The cross context VM structure.
- * @param   pszCommand          The command.
- * @param   fWaitForAck         Whether to wait for the ACK.
- */
-static int ftmR3TcpSubmitCommand(PVM pVM, const char *pszCommand, bool fWaitForAck = true)
-{
-    int rc = RTTcpSgWriteL(pVM->ftm.s.hSocket, 2, pszCommand, strlen(pszCommand), RT_STR_TUPLE("\n"));
-    if (RT_FAILURE(rc))
-        return rc;
-    if (!fWaitForAck)
-        return VINF_SUCCESS;
-    return ftmR3TcpReadACK(pVM, pszCommand);
-}
-
-/**
- * @interface_method_impl{SSMSTRMOPS,pfnWrite}
- */
-static DECLCALLBACK(int) ftmR3TcpOpWrite(void *pvUser, uint64_t offStream, const void *pvBuf, size_t cbToWrite)
-{
-    PVM pVM = (PVM)pvUser;
-    NOREF(offStream);
-
-    AssertReturn(cbToWrite > 0, VINF_SUCCESS);
-    AssertReturn(cbToWrite < UINT32_MAX, VERR_OUT_OF_RANGE);
-    AssertReturn(pVM->fFaultTolerantMaster, VERR_INVALID_HANDLE);
-
-    STAM_COUNTER_INC(&pVM->ftm.s.StatSentStateWrite);
-    for (;;)
-    {
-        FTMTCPHDR Hdr;
-        Hdr.u32Magic = FTMTCPHDR_MAGIC;
-        Hdr.cb       = RT_MIN((uint32_t)cbToWrite, FTMTCPHDR_MAX_SIZE);
-        int rc = RTTcpSgWriteL(pVM->ftm.s.hSocket, 2, &Hdr, sizeof(Hdr), pvBuf, (size_t)Hdr.cb);
-        if (RT_FAILURE(rc))
-        {
-            LogRel(("FTSync/TCP: Write error: %Rrc (cb=%#x)\n", rc, Hdr.cb));
-            return rc;
-        }
-        pVM->ftm.s.StatSentState.c      += Hdr.cb + sizeof(Hdr);
-        pVM->ftm.s.syncstate.uOffStream += Hdr.cb;
-        if (Hdr.cb == cbToWrite)
-            return VINF_SUCCESS;
-
-        /* advance */
-        cbToWrite -= Hdr.cb;
-        pvBuf = (uint8_t const *)pvBuf + Hdr.cb;
-    }
-}
-
-
-/**
- * Selects and poll for close condition.
- *
- * We can use a relatively high poll timeout here since it's only used to get
- * us out of error paths.  In the normal cause of events, we'll get a
- * end-of-stream header.
- *
- * @returns VBox status code.
- *
- * @param   pVM         The cross context VM structure.
- */
-static int ftmR3TcpReadSelect(PVM pVM)
-{
-    int rc;
-    do
-    {
-        rc = RTTcpSelectOne(pVM->ftm.s.hSocket, 1000);
-        if (RT_FAILURE(rc) && rc != VERR_TIMEOUT)
-        {
-            pVM->ftm.s.syncstate.fIOError = true;
-            LogRel(("FTSync/TCP: Header select error: %Rrc\n", rc));
-            break;
-        }
-        if (pVM->ftm.s.syncstate.fStopReading)
-        {
-            rc = VERR_EOF;
-            break;
-        }
-    } while (rc == VERR_TIMEOUT);
-    return rc;
-}
-
-
-/**
- * @interface_method_impl{SSMSTRMOPS,pfnRead}
- */
-static DECLCALLBACK(int) ftmR3TcpOpRead(void *pvUser, uint64_t offStream, void *pvBuf, size_t cbToRead, size_t *pcbRead)
-{
-    PVM pVM = (PVM)pvUser;
-    AssertReturn(!pVM->fFaultTolerantMaster, VERR_INVALID_HANDLE);
-    NOREF(offStream);
-
-    for (;;)
-    {
-        int rc;
-
-        /*
-         * Check for various conditions and may have been signalled.
-         */
-        if (pVM->ftm.s.syncstate.fEndOfStream)
-            return VERR_EOF;
-        if (pVM->ftm.s.syncstate.fStopReading)
-            return VERR_EOF;
-        if (pVM->ftm.s.syncstate.fIOError)
-            return VERR_IO_GEN_FAILURE;
-
-        /*
-         * If there is no more data in the current block, read the next
-         * block header.
-         */
-        if (!pVM->ftm.s.syncstate.cbReadBlock)
-        {
-            rc = ftmR3TcpReadSelect(pVM);
-            if (RT_FAILURE(rc))
-                return rc;
-            FTMTCPHDR Hdr;
-            rc = RTTcpRead(pVM->ftm.s.hSocket, &Hdr, sizeof(Hdr), NULL);
-            if (RT_FAILURE(rc))
-            {
-                pVM->ftm.s.syncstate.fIOError = true;
-                LogRel(("FTSync/TCP: Header read error: %Rrc\n", rc));
-                return rc;
-            }
-            pVM->ftm.s.StatReceivedState.c += sizeof(Hdr);
-
-            if (RT_UNLIKELY(   Hdr.u32Magic != FTMTCPHDR_MAGIC
-                            || Hdr.cb > FTMTCPHDR_MAX_SIZE
-                            || Hdr.cb == 0))
-            {
-                if (    Hdr.u32Magic == FTMTCPHDR_MAGIC
-                    &&  (   Hdr.cb == 0
-                         || Hdr.cb == UINT32_MAX)
-                   )
-                {
-                    pVM->ftm.s.syncstate.fEndOfStream = true;
-                    pVM->ftm.s.syncstate.cbReadBlock  = 0;
-                    return Hdr.cb ? VERR_SSM_CANCELLED : VERR_EOF;
-                }
-                pVM->ftm.s.syncstate.fIOError = true;
-                LogRel(("FTSync/TCP: Invalid block: u32Magic=%#x cb=%#x\n", Hdr.u32Magic, Hdr.cb));
-                return VERR_IO_GEN_FAILURE;
-            }
-
-            pVM->ftm.s.syncstate.cbReadBlock = Hdr.cb;
-            if (pVM->ftm.s.syncstate.fStopReading)
-                return VERR_EOF;
-        }
-
-        /*
-         * Read more data.
-         */
-        rc = ftmR3TcpReadSelect(pVM);
-        if (RT_FAILURE(rc))
-            return rc;
-
-        uint32_t cb = (uint32_t)RT_MIN(pVM->ftm.s.syncstate.cbReadBlock, cbToRead);
-        rc = RTTcpRead(pVM->ftm.s.hSocket, pvBuf, cb, pcbRead);
-        if (RT_FAILURE(rc))
-        {
-            pVM->ftm.s.syncstate.fIOError = true;
-            LogRel(("FTSync/TCP: Data read error: %Rrc (cb=%#x)\n", rc, cb));
-            return rc;
-        }
-        if (pcbRead)
-        {
-            cb = (uint32_t)*pcbRead;
-            pVM->ftm.s.StatReceivedState.c   += cb;
-            pVM->ftm.s.syncstate.uOffStream  += cb;
-            pVM->ftm.s.syncstate.cbReadBlock -= cb;
-            return VINF_SUCCESS;
-        }
-        pVM->ftm.s.StatReceivedState.c   += cb;
-        pVM->ftm.s.syncstate.uOffStream  += cb;
-        pVM->ftm.s.syncstate.cbReadBlock -= cb;
-        if (cbToRead == cb)
-            return VINF_SUCCESS;
-
-        /* Advance to the next block. */
-        cbToRead -= cb;
-        pvBuf = (uint8_t *)pvBuf + cb;
-    }
-}
-
-
-/**
- * @interface_method_impl{SSMSTRMOPS,pfnSeek}
- */
-static DECLCALLBACK(int) ftmR3TcpOpSeek(void *pvUser, int64_t offSeek, unsigned uMethod, uint64_t *poffActual)
-{
-    NOREF(pvUser); NOREF(offSeek); NOREF(uMethod); NOREF(poffActual);
-    return VERR_NOT_SUPPORTED;
-}
-
-
-/**
- * @interface_method_impl{SSMSTRMOPS,pfnTell}
- */
-static DECLCALLBACK(uint64_t) ftmR3TcpOpTell(void *pvUser)
-{
-    PVM pVM = (PVM)pvUser;
-    return pVM->ftm.s.syncstate.uOffStream;
-}
-
-
-/**
- * @interface_method_impl{SSMSTRMOPS,pfnSize}
- */
-static DECLCALLBACK(int) ftmR3TcpOpSize(void *pvUser, uint64_t *pcb)
-{
-    NOREF(pvUser); NOREF(pcb);
-    return VERR_NOT_SUPPORTED;
-}
-
-
-/**
- * @interface_method_impl{SSMSTRMOPS,pfnIsOk}
- */
-static DECLCALLBACK(int) ftmR3TcpOpIsOk(void *pvUser)
-{
-    PVM pVM = (PVM)pvUser;
-
-    if (pVM->fFaultTolerantMaster)
-    {
-        /* Poll for incoming NACKs and errors from the other side */
-        int rc = RTTcpSelectOne(pVM->ftm.s.hSocket, 0);
-        if (rc != VERR_TIMEOUT)
-        {
-            if (RT_SUCCESS(rc))
-            {
-                LogRel(("FTSync/TCP: Incoming data detect by IsOk, assuming it is a cancellation NACK.\n"));
-                rc = VERR_SSM_CANCELLED;
-            }
-            else
-                LogRel(("FTSync/TCP: RTTcpSelectOne -> %Rrc (IsOk).\n", rc));
-            return rc;
-        }
-    }
-
-    return VINF_SUCCESS;
-}
-
-
-/**
- * @interface_method_impl{SSMSTRMOPS,pfnClose}
- */
-static DECLCALLBACK(int) ftmR3TcpOpClose(void *pvUser, bool fCancelled)
-{
-    PVM pVM = (PVM)pvUser;
-
-    if (pVM->fFaultTolerantMaster)
-    {
-        FTMTCPHDR EofHdr;
-        EofHdr.u32Magic = FTMTCPHDR_MAGIC;
-        EofHdr.cb       = fCancelled ? UINT32_MAX : 0;
-        int rc = RTTcpWrite(pVM->ftm.s.hSocket, &EofHdr, sizeof(EofHdr));
-        if (RT_FAILURE(rc))
-        {
-            LogRel(("FTSync/TCP: EOF Header write error: %Rrc\n", rc));
-            return rc;
-        }
-    }
-    else
-    {
-        ASMAtomicWriteBool(&pVM->ftm.s.syncstate.fStopReading, true);
-    }
-
-    return VINF_SUCCESS;
-}
-
-
-/**
- * Method table for a TCP based stream.
- */
-static SSMSTRMOPS const g_ftmR3TcpOps =
-{
-    SSMSTRMOPS_VERSION,
-    ftmR3TcpOpWrite,
-    ftmR3TcpOpRead,
-    ftmR3TcpOpSeek,
-    ftmR3TcpOpTell,
-    ftmR3TcpOpSize,
-    ftmR3TcpOpIsOk,
-    ftmR3TcpOpClose,
-    SSMSTRMOPS_VERSION
-};
-
-
-/**
- * VMR3ReqCallWait callback
- *
- * @param   pVM         The cross context VM structure.
- *
- */
-static DECLCALLBACK(void) ftmR3WriteProtectMemory(PVM pVM)
-{
-    int rc = PGMR3PhysWriteProtectRAM(pVM);
-    AssertRC(rc);
-}
-
-
-/**
- * Sync the VM state
- *
- * @returns VBox status code.
- * @param   pVM         The cross context VM structure.
- */
-static int ftmR3PerformFullSync(PVM pVM)
-{
-    bool fSuspended = false;
-
-    int rc = VMR3Suspend(pVM->pUVM, VMSUSPENDREASON_FTM_SYNC);
-    AssertRCReturn(rc, rc);
-
-    STAM_REL_COUNTER_INC(&pVM->ftm.s.StatFullSync);
-
-    RTSocketRetain(pVM->ftm.s.hSocket); /* For concurrent access by I/O thread and EMT. */
-
-    /* Reset the sync state. */
-    pVM->ftm.s.syncstate.uOffStream   = 0;
-    pVM->ftm.s.syncstate.cbReadBlock  = 0;
-    pVM->ftm.s.syncstate.fStopReading = false;
-    pVM->ftm.s.syncstate.fIOError     = false;
-    pVM->ftm.s.syncstate.fEndOfStream = false;
-
-    rc = ftmR3TcpSubmitCommand(pVM, "full-sync");
-    AssertRC(rc);
-
-    pVM->ftm.s.fDeltaLoadSaveActive = false;
-    rc = VMR3SaveFT(pVM->pUVM, &g_ftmR3TcpOps, pVM, &fSuspended, false /* fSkipStateChanges */);
-    AssertRC(rc);
-
-    rc = ftmR3TcpReadACK(pVM, "full-sync-complete");
-    AssertRC(rc);
-
-    RTSocketRelease(pVM->ftm.s.hSocket);
-
-    /* Write protect all memory. */
-    rc = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)ftmR3WriteProtectMemory, 1, pVM);
-    AssertRCReturn(rc, rc);
-
-    rc = VMR3Resume(pVM->pUVM, VMRESUMEREASON_FTM_SYNC);
-    AssertRC(rc);
-
-    return rc;
-}
-
-
-/**
- * PGMR3PhysEnumDirtyFTPages callback for syncing dirty physical pages
- *
- * @param   pVM             The cross context VM structure.
- * @param   GCPhys          GC physical address
- * @param   pRange          HC virtual address of the page(s)
- * @param   cbRange         Size of the dirty range in bytes.
- * @param   pvUser          User argument
- */
-static DECLCALLBACK(int) ftmR3SyncDirtyPage(PVM pVM, RTGCPHYS GCPhys, uint8_t *pRange, unsigned cbRange, void *pvUser)
-{
-    NOREF(pvUser);
-    FTMTCPHDRMEM Hdr;
-    Hdr.u32Magic    = FTMTCPHDR_MAGIC;
-    Hdr.GCPhys      = GCPhys;
-    Hdr.cbPageRange = cbRange;
-    Hdr.cb          = cbRange;
-    /** @todo compress page(s). */
-    int rc = RTTcpSgWriteL(pVM->ftm.s.hSocket, 2, &Hdr, sizeof(Hdr), pRange, (size_t)Hdr.cb);
-    if (RT_FAILURE(rc))
-    {
-        LogRel(("FTSync/TCP: Write error (ftmR3SyncDirtyPage): %Rrc (cb=%#x)\n", rc, Hdr.cb));
-        return rc;
-    }
-    pVM->ftm.s.StatSentMem.c += Hdr.cb + sizeof(Hdr);
-
-#ifdef VBOX_WITH_STATISTICS
-    switch (PGMPhysGetPageType(pVM, GCPhys))
-    {
-    case PGMPAGETYPE_RAM:
-        pVM->ftm.s.StatSentMemRAM.c    += Hdr.cb + sizeof(Hdr);
-        break;
-
-    case PGMPAGETYPE_MMIO2:
-        pVM->ftm.s.StatSentMemMMIO2.c  += Hdr.cb + sizeof(Hdr);
-        break;
-
-    case PGMPAGETYPE_ROM_SHADOW:
-        pVM->ftm.s.StatSentMemShwROM.c += Hdr.cb + sizeof(Hdr);
-        break;
-
-    case PGMPAGETYPE_MMIO2_ALIAS_MMIO:
-    case PGMPAGETYPE_SPECIAL_ALIAS_MMIO:
-        AssertFailed();
-        break;
-
-    default:
-        AssertFailed();
-        break;
-    }
-#endif
-
-    return (pVM->ftm.s.fCheckpointingActive) ? VERR_INTERRUPTED : VINF_SUCCESS;
-}
-
-/**
- * Thread function which starts syncing process for this master VM
- *
- * @param   hThread     The thread handle.
- * @param   pvUser      Pointer to the VM.
- * @return  VINF_SUCCESS (ignored).
- *
- */
-static DECLCALLBACK(int) ftmR3MasterThread(RTTHREAD hThread, void *pvUser)
-{
-    int rc  = VINF_SUCCESS;
-    PVM pVM = (PVM)pvUser;
-    NOREF(hThread);
-
-    for (;;)
-    {
-        /*
-         * Try connect to the standby machine.
-         */
-        Log(("ftmR3MasterThread: client connect to %s %d\n", pVM->ftm.s.pszAddress, pVM->ftm.s.uPort));
-        rc = RTTcpClientConnect(pVM->ftm.s.pszAddress, pVM->ftm.s.uPort, &pVM->ftm.s.hSocket);
-        if (RT_SUCCESS(rc))
-        {
-            Log(("ftmR3MasterThread: CONNECTED\n"));
-
-            /* Disable Nagle. */
-            rc = RTTcpSetSendCoalescing(pVM->ftm.s.hSocket, false /*fEnable*/);
-            AssertRC(rc);
-
-            /* Read and check the welcome message. */
-            char szLine[RT_MAX(128, sizeof(g_szWelcome))];
-            RT_ZERO(szLine);
-            rc = RTTcpRead(pVM->ftm.s.hSocket, szLine, sizeof(g_szWelcome) - 1, NULL);
-            if (    RT_SUCCESS(rc)
-                &&  !strcmp(szLine, g_szWelcome))
-            {
-                /* password */
-                if (pVM->ftm.s.pszPassword)
-                    rc = RTTcpWrite(pVM->ftm.s.hSocket, pVM->ftm.s.pszPassword, strlen(pVM->ftm.s.pszPassword));
-
-                if (RT_SUCCESS(rc))
-                {
-                    /* ACK */
-                    rc = ftmR3TcpReadACK(pVM, "password", "Invalid password");
-                    if (RT_SUCCESS(rc))
-                    {
-                        /** @todo verify VM config. */
-                        break;
-                    }
-                }
-            }
-            /* Failed, so don't bother anymore. */
-            return VINF_SUCCESS;
-        }
-        rc = RTSemEventWait(pVM->ftm.s.hShutdownEvent, 1000 /* 1 second */);
-        if (rc != VERR_TIMEOUT)
-            return VINF_SUCCESS;    /* told to quit */
-    }
-
-    /* Successfully initialized the connection to the standby node.
-     * Start the sync process.
-     */
-
-    /* First sync all memory and write protect everything so
-     * we can send changed pages later on.
-     */
-
-    rc = ftmR3PerformFullSync(pVM);
-
-    for (;;)
-    {
-        rc = RTSemEventWait(pVM->ftm.s.hShutdownEvent, pVM->ftm.s.uInterval);
-        if (rc != VERR_TIMEOUT)
-            break;    /* told to quit */
-
-        if (!pVM->ftm.s.fCheckpointingActive)
-        {
-            rc = PDMCritSectEnter(&pVM->ftm.s.CritSect, VERR_SEM_BUSY);
-            AssertMsg(rc == VINF_SUCCESS, ("%Rrc\n", rc));
-
-            rc = ftmR3TcpSubmitCommand(pVM, "mem-sync");
-            AssertRC(rc);
-
-            /* sync the changed memory with the standby node. */
-            /* Write protect all memory. */
-            if (!pVM->ftm.s.fCheckpointingActive)
-            {
-                rc = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)ftmR3WriteProtectMemory, 1, pVM);
-                AssertRC(rc);
-            }
-
-            /* Enumerate all dirty pages and send them to the standby VM. */
-            if (!pVM->ftm.s.fCheckpointingActive)
-            {
-                rc = PGMR3PhysEnumDirtyFTPages(pVM, ftmR3SyncDirtyPage, NULL /* pvUser */);
-                Assert(rc == VINF_SUCCESS || rc == VERR_INTERRUPTED);
-            }
-
-            /* Send last memory header to signal the end. */
-            FTMTCPHDRMEM Hdr;
-            Hdr.u32Magic    = FTMTCPHDR_MAGIC;
-            Hdr.GCPhys      = 0;
-            Hdr.cbPageRange = 0;
-            Hdr.cb          = 0;
-            rc = RTTcpSgWriteL(pVM->ftm.s.hSocket, 1, &Hdr, sizeof(Hdr));
-            if (RT_FAILURE(rc))
-                LogRel(("FTSync/TCP: Write error (ftmR3MasterThread): %Rrc (cb=%#x)\n", rc, Hdr.cb));
-
-            rc = ftmR3TcpReadACK(pVM, "mem-sync-complete");
-            AssertRC(rc);
-
-            PDMCritSectLeave(&pVM->ftm.s.CritSect);
-        }
-    }
-    return rc;
-}
-
-/**
- * Syncs memory from the master VM
- *
- * @returns VBox status code.
- * @param   pVM             The cross context VM structure.
- */
-static int ftmR3SyncMem(PVM pVM)
-{
-    while (true)
-    {
-        FTMTCPHDRMEM Hdr;
-        RTGCPHYS GCPhys;
-
-        /* Read memory header. */
-        int rc = RTTcpRead(pVM->ftm.s.hSocket, &Hdr, sizeof(Hdr), NULL);
-        if (RT_FAILURE(rc))
-        {
-            Log(("RTTcpRead failed with %Rrc\n", rc));
-            break;
-        }
-        pVM->ftm.s.StatReceivedMem.c += sizeof(Hdr);
-
-        if (Hdr.cb == 0)
-            break;  /* end of sync. */
-
-        Assert(Hdr.cb == Hdr.cbPageRange);  /** @todo uncompress */
-        GCPhys = Hdr.GCPhys;
-
-        /* Must be a multiple of PAGE_SIZE. */
-        Assert((Hdr.cbPageRange & 0xfff) == 0);
-
-        while (Hdr.cbPageRange)
-        {
-            PFTMPHYSPAGETREENODE pNode = (PFTMPHYSPAGETREENODE)RTAvlGCPhysGet(&pVM->ftm.s.standby.pPhysPageTree, GCPhys);
-            if (!pNode)
-            {
-                /* Allocate memory for the node and page. */
-                pNode = (PFTMPHYSPAGETREENODE)RTMemAllocZ(sizeof(*pNode) + PAGE_SIZE);
-                AssertBreak(pNode);
-
-                /* Insert the node into the tree. */
-                pNode->Core.Key = GCPhys;
-                pNode->pPage = (void *)(pNode + 1);
-                bool fRet = RTAvlGCPhysInsert(&pVM->ftm.s.standby.pPhysPageTree, &pNode->Core);
-                Assert(fRet); NOREF(fRet);
-            }
-
-            /* Fetch the page. */
-            rc = RTTcpRead(pVM->ftm.s.hSocket, pNode->pPage, PAGE_SIZE, NULL);
-            if (RT_FAILURE(rc))
-            {
-                Log(("RTTcpRead page data (%d bytes) failed with %Rrc\n", Hdr.cb, rc));
-                break;
-            }
-            pVM->ftm.s.StatReceivedMem.c += PAGE_SIZE;
-            Hdr.cbPageRange              -= PAGE_SIZE;
-            GCPhys                       += PAGE_SIZE;
-        }
-    }
-    return VINF_SUCCESS;
-}
-
-
-/**
- * Callback handler for RTAvlGCPhysDestroy
- *
- * @returns 0 to continue, otherwise stop
- * @param   pBaseNode       Node to destroy
- * @param   pvUser          Pointer to the VM.
- */
-static DECLCALLBACK(int) ftmR3PageTreeDestroyCallback(PAVLGCPHYSNODECORE pBaseNode, void *pvUser)
-{
-    PVM pVM = (PVM)pvUser;
-    PFTMPHYSPAGETREENODE pNode = (PFTMPHYSPAGETREENODE)pBaseNode;
-
-    if (pVM)    /* NULL when the VM is destroyed. */
-    {
-        /* Update the guest memory of the standby VM. */
-        int rc = PGMR3PhysWriteExternal(pVM, pNode->Core.Key, pNode->pPage, PAGE_SIZE, PGMACCESSORIGIN_FTM);
-        AssertRC(rc);
-    }
-    RTMemFree(pNode);
-    return 0;
-}
-
-/**
- * Thread function which monitors the health of the master VM
- *
- * @param   hThread     The thread handle.
- * @param   pvUser      Pointer to the VM.
- * @return  VINF_SUCCESS (ignored).
- *
- */
-static DECLCALLBACK(int) ftmR3StandbyThread(RTTHREAD hThread, void *pvUser)
-{
-    PVM pVM = (PVM)pvUser;
-    NOREF(hThread);
-
-    for (;;)
-    {
-        uint64_t u64TimeNow;
-
-        int rc = RTSemEventWait(pVM->ftm.s.hShutdownEvent, pVM->ftm.s.uInterval);
-        if (rc != VERR_TIMEOUT)
-            break;    /* told to quit */
-
-        if (pVM->ftm.s.standby.u64LastHeartbeat)
-        {
-            u64TimeNow = RTTimeMilliTS();
-
-            if (u64TimeNow > pVM->ftm.s.standby.u64LastHeartbeat + pVM->ftm.s.uInterval * 4)
-            {
-                /* Timeout; prepare to fallover. */
-                LogRel(("FTSync: TIMEOUT (%RX64 vs %RX64 ms): activate standby VM!\n", u64TimeNow, pVM->ftm.s.standby.u64LastHeartbeat + pVM->ftm.s.uInterval * 2));
-
-                pVM->ftm.s.fActivateStandby = true;
-                /** @todo prevent split-brain. */
-                break;
-            }
-        }
-    }
-
-    return VINF_SUCCESS;
-}
-
-
-/**
- * Listen for incoming traffic destined for the standby VM.
- *
- * @copydoc FNRTTCPSERVE
- *
- * @returns VINF_SUCCESS or VERR_TCP_SERVER_STOP.
- */
-static DECLCALLBACK(int) ftmR3StandbyServeConnection(RTSOCKET hSocket, void *pvUser)
-{
-    PVM pVM = (PVM)pvUser;
-
-    pVM->ftm.s.hSocket = hSocket;
-
-    /*
-     * Disable Nagle.
-     */
-    int rc = RTTcpSetSendCoalescing(hSocket, false /*fEnable*/);
-    AssertRC(rc);
-
-    /* Send the welcome message to the master node. */
-    rc = RTTcpWrite(hSocket, g_szWelcome, sizeof(g_szWelcome) - 1);
-    if (RT_FAILURE(rc))
-    {
-        LogRel(("Teleporter: Failed to write welcome message: %Rrc\n", rc));
-        return VINF_SUCCESS;
-    }
-
-    /*
-     * Password.
-     */
-    const char *pszPassword = pVM->ftm.s.pszPassword;
-    if (pszPassword)
-    {
-        unsigned    off = 0;
-        while (pszPassword[off])
-        {
-            char ch;
-            rc = RTTcpRead(hSocket, &ch, sizeof(ch), NULL);
-            if (    RT_FAILURE(rc)
-                ||  pszPassword[off] != ch)
-            {
-                if (RT_FAILURE(rc))
-                    LogRel(("FTSync: Password read failure (off=%u): %Rrc\n", off, rc));
-                else
-                    LogRel(("FTSync: Invalid password (off=%u)\n", off));
-                ftmR3TcpWriteNACK(pVM, VERR_AUTHENTICATION_FAILURE);
-                return VINF_SUCCESS;
-            }
-            off++;
-        }
-    }
-    rc = ftmR3TcpWriteACK(pVM);
-    if (RT_FAILURE(rc))
-        return VINF_SUCCESS;
-
-    /** @todo verify VM config. */
-
-    /*
-     * Stop the server.
-     *
-     * Note! After this point we must return VERR_TCP_SERVER_STOP, while prior
-     *       to it we must not return that value!
-     */
-    RTTcpServerShutdown(pVM->ftm.s.standby.hServer);
-
-    /*
-     * Command processing loop.
-     */
-    //bool fDone = false;
-    for (;;)
-    {
-        bool fFullSync = false;
-        char szCmd[128];
-
-        rc = ftmR3TcpReadLine(pVM, szCmd, sizeof(szCmd));
-        if (RT_FAILURE(rc))
-            break;
-
-        pVM->ftm.s.standby.u64LastHeartbeat = RTTimeMilliTS();
-        if (!strcmp(szCmd, "mem-sync"))
-        {
-            rc = ftmR3TcpWriteACK(pVM);
-            AssertRC(rc);
-            if (RT_FAILURE(rc))
-                continue;
-
-            rc = ftmR3SyncMem(pVM);
-            AssertRC(rc);
-
-            rc = ftmR3TcpWriteACK(pVM);
-            AssertRC(rc);
-        }
-        else
-        if (    !strcmp(szCmd, "checkpoint")
-            ||  !strcmp(szCmd, "full-sync")
-            ||  (fFullSync = true))  /* intended assignment */
-        {
-            rc = ftmR3TcpWriteACK(pVM);
-            AssertRC(rc);
-            if (RT_FAILURE(rc))
-                continue;
-
-            /* Flush all pending memory updates. */
-            if (pVM->ftm.s.standby.pPhysPageTree)
-            {
-                RTAvlGCPhysDestroy(&pVM->ftm.s.standby.pPhysPageTree, ftmR3PageTreeDestroyCallback, pVM);
-                pVM->ftm.s.standby.pPhysPageTree = NULL;
-            }
-
-            RTSocketRetain(pVM->ftm.s.hSocket); /* For concurrent access by I/O thread and EMT. */
-
-            /* Reset the sync state. */
-            pVM->ftm.s.syncstate.uOffStream   = 0;
-            pVM->ftm.s.syncstate.cbReadBlock  = 0;
-            pVM->ftm.s.syncstate.fStopReading = false;
-            pVM->ftm.s.syncstate.fIOError     = false;
-            pVM->ftm.s.syncstate.fEndOfStream = false;
-
-            pVM->ftm.s.fDeltaLoadSaveActive = (fFullSync == false);
-            rc = VMR3LoadFromStreamFT(pVM->pUVM, &g_ftmR3TcpOps, pVM);
-            pVM->ftm.s.fDeltaLoadSaveActive = false;
-            RTSocketRelease(pVM->ftm.s.hSocket);
-            AssertRC(rc);
-            if (RT_FAILURE(rc))
-            {
-                LogRel(("FTSync: VMR3LoadFromStream -> %Rrc\n", rc));
-                ftmR3TcpWriteNACK(pVM, rc);
-                continue;
-            }
-
-            /* The EOS might not have been read, make sure it is. */
-            pVM->ftm.s.syncstate.fStopReading = false;
-            size_t cbRead;
-            rc = ftmR3TcpOpRead(pVM, pVM->ftm.s.syncstate.uOffStream, szCmd, 1, &cbRead);
-            if (rc != VERR_EOF)
-            {
-                LogRel(("FTSync: Draining teleporterTcpOpRead -> %Rrc\n", rc));
-                ftmR3TcpWriteNACK(pVM, rc);
-                continue;
-            }
-
-            rc = ftmR3TcpWriteACK(pVM);
-            AssertRC(rc);
-        }
-    }
-    LogFlowFunc(("returns mRc=%Rrc\n", rc));
-    return VERR_TCP_SERVER_STOP;
-}
-
-/**
- * Powers on the fault tolerant virtual machine.
- *
- * @returns VBox status code.
- *
- * @param   pUVM        The user mode VM handle.
- * @param   fMaster     FT master or standby
- * @param   uInterval   FT sync interval
- * @param   pszAddress  Standby VM address
- * @param   uPort       Standby VM port
- * @param   pszPassword FT password (NULL for none)
- *
- * @thread      Any thread.
- * @vmstate     Created
- * @vmstateto   PoweringOn+Running (master), PoweringOn+Running_FT (standby)
- */
-VMMR3DECL(int) FTMR3PowerOn(PUVM pUVM, bool fMaster, unsigned uInterval,
-                            const char *pszAddress, unsigned uPort, const char *pszPassword)
-{
-    UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE);
-    PVM pVM = pUVM->pVM;
-    VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE);
-
-    VMSTATE enmVMState = VMR3GetState(pVM);
-    AssertMsgReturn(enmVMState == VMSTATE_CREATED,
-                    ("%s\n", VMR3GetStateName(enmVMState)),
-                    VERR_INTERNAL_ERROR_4);
-    AssertReturn(pszAddress, VERR_INVALID_PARAMETER);
-
-    if (pVM->ftm.s.uInterval)
-        pVM->ftm.s.uInterval    = uInterval;
-    else
-        pVM->ftm.s.uInterval    = 50;   /* standard sync interval of 50ms */
-
-    pVM->ftm.s.uPort            = uPort;
-    pVM->ftm.s.pszAddress       = RTStrDup(pszAddress);
-    if (pszPassword)
-        pVM->ftm.s.pszPassword  = RTStrDup(pszPassword);
-
-    int rc = RTSemEventCreate(&pVM->ftm.s.hShutdownEvent);
-    if (RT_FAILURE(rc))
-        return rc;
-
-    if (fMaster)
-    {
-        rc = RTThreadCreate(NULL, ftmR3MasterThread, pVM,
-                            0, RTTHREADTYPE_IO /* higher than normal priority */, 0, "ftmMaster");
-        if (RT_FAILURE(rc))
-            return rc;
-
-        pVM->fFaultTolerantMaster = true;
-        if (PGMIsUsingLargePages(pVM))
-        {
-            /* Must disable large page usage as 2 MB pages are too big to write monitor. */
-            LogRel(("FTSync: disabling large page usage.\n"));
-            PGMSetLargePageUsage(pVM, false);
-        }
-        /** @todo might need to disable page fusion as well */
-
-        return VMR3PowerOn(pVM->pUVM);
-    }
-
-
-    /* standby */
-    rc = RTThreadCreate(NULL, ftmR3StandbyThread, pVM,
-                        0, RTTHREADTYPE_DEFAULT, 0, "ftmStandby");
-    if (RT_FAILURE(rc))
-        return rc;
-
-    rc = RTTcpServerCreateEx(pszAddress, uPort, &pVM->ftm.s.standby.hServer);
-    if (RT_FAILURE(rc))
-        return rc;
-    pVM->ftm.s.fIsStandbyNode = true;
-
-    rc = RTTcpServerListen(pVM->ftm.s.standby.hServer, ftmR3StandbyServeConnection, pVM);
-    /** @todo deal with the exit code to check if we should activate this standby VM. */
-    if (pVM->ftm.s.fActivateStandby)
-    {
-        /** @todo fallover. */
-    }
-
-    if (pVM->ftm.s.standby.hServer)
-    {
-        RTTcpServerDestroy(pVM->ftm.s.standby.hServer);
-        pVM->ftm.s.standby.hServer = NULL;
-    }
-    if (rc == VERR_TCP_SERVER_SHUTDOWN)
-        rc = VINF_SUCCESS;  /* ignore this error; the standby process was cancelled. */
-    return rc;
-}
-
-/**
- * Powers off the fault tolerant virtual machine (standby).
- *
- * @returns VBox status code.
- *
- * @param   pUVM        The user mode VM handle.
- */
-VMMR3DECL(int) FTMR3CancelStandby(PUVM pUVM)
-{
-    UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE);
-    PVM pVM = pUVM->pVM;
-    VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE);
-    AssertReturn(!pVM->fFaultTolerantMaster, VERR_NOT_SUPPORTED);
-    Assert(pVM->ftm.s.standby.hServer);
-
-    return RTTcpServerShutdown(pVM->ftm.s.standby.hServer);
-}
-
-/**
- * Rendezvous callback used by FTMR3SetCheckpoint
- * Sync state + changed memory with the standby node.
- *
- * This is only called on one of the EMTs while the other ones are waiting for
- * it to complete this function.
- *
- * @returns VINF_SUCCESS (VBox strict status code).
- * @param   pVM         The cross context VM structure.
- * @param   pVCpu       The cross context virtual CPU structure of the calling EMT. Unused.
- * @param   pvUser      Not used.
- */
-static DECLCALLBACK(VBOXSTRICTRC) ftmR3SetCheckpointRendezvous(PVM pVM, PVMCPU pVCpu, void *pvUser)
-{
-    int     rc         = VINF_SUCCESS;
-    bool    fSuspended = false;
-    NOREF(pVCpu);
-    NOREF(pvUser);
-
-    /* We don't call VMR3Suspend here to avoid the overhead of state changes and notifications. This
-     * is only a short suspend.
-     */
-    STAM_PROFILE_START(&pVM->ftm.s.StatCheckpointPause, a);
-    PDMR3Suspend(pVM);
-
-    /* Hack alert: as EM is responsible for dealing with the suspend state. We must do this here ourselves, but only for this EMT.*/
-    EMR3NotifySuspend(pVM);
-    STAM_PROFILE_STOP(&pVM->ftm.s.StatCheckpointPause, a);
-
-    STAM_REL_COUNTER_INC(&pVM->ftm.s.StatDeltaVM);
-
-    RTSocketRetain(pVM->ftm.s.hSocket); /* For concurrent access by I/O thread and EMT. */
-
-    /* Reset the sync state. */
-    pVM->ftm.s.syncstate.uOffStream   = 0;
-    pVM->ftm.s.syncstate.cbReadBlock  = 0;
-    pVM->ftm.s.syncstate.fStopReading = false;
-    pVM->ftm.s.syncstate.fIOError     = false;
-    pVM->ftm.s.syncstate.fEndOfStream = false;
-
-    rc = ftmR3TcpSubmitCommand(pVM, "checkpoint");
-    AssertRC(rc);
-
-    pVM->ftm.s.fDeltaLoadSaveActive = true;
-    rc = VMR3SaveFT(pVM->pUVM, &g_ftmR3TcpOps, pVM, &fSuspended, true /* fSkipStateChanges */);
-    pVM->ftm.s.fDeltaLoadSaveActive = false;
-    AssertRC(rc);
-
-    rc = ftmR3TcpReadACK(pVM, "checkpoint-complete");
-    AssertRC(rc);
-
-    RTSocketRelease(pVM->ftm.s.hSocket);
-
-    /* Write protect all memory. */
-    rc = PGMR3PhysWriteProtectRAM(pVM);
-    AssertRC(rc);
-
-    /* We don't call VMR3Resume here to avoid the overhead of state changes and notifications. This
-     * is only a short suspend.
-     */
-    STAM_PROFILE_START(&pVM->ftm.s.StatCheckpointResume, b);
-    PGMR3ResetNoMorePhysWritesFlag(pVM);
-    PDMR3Resume(pVM);
-
-    /* Hack alert as EM is responsible for dealing with the suspend state. We must do this here ourselves, but only for this EMT.*/
-    EMR3NotifyResume(pVM);
-    STAM_PROFILE_STOP(&pVM->ftm.s.StatCheckpointResume, b);
-
-    return rc;
-}
-
-/**
- * Performs a full sync to the standby node
- *
- * @returns VBox status code.
- *
- * @param   pVM             The cross context VM structure.
- * @param   enmCheckpoint   Checkpoint type
- */
-VMMR3_INT_DECL(int) FTMR3SetCheckpoint(PVM pVM, FTMCHECKPOINTTYPE enmCheckpoint)
-{
-    int rc;
-
-    if (!pVM->fFaultTolerantMaster)
-        return VINF_SUCCESS;
-
-    switch (enmCheckpoint)
-    {
-        case FTMCHECKPOINTTYPE_NETWORK:
-            STAM_REL_COUNTER_INC(&pVM->ftm.s.StatCheckpointNetwork);
-            break;
-
-        case FTMCHECKPOINTTYPE_STORAGE:
-            STAM_REL_COUNTER_INC(&pVM->ftm.s.StatCheckpointStorage);
-            break;
-
-        default:
-            AssertMsgFailedReturn(("%d\n", enmCheckpoint), VERR_INVALID_PARAMETER);
-    }
-
-    pVM->ftm.s.fCheckpointingActive = true;
-    if (VM_IS_EMT(pVM))
-    {
-        PVMCPU pVCpu = VMMGetCpu(pVM);
-
-        /* We must take special care here as the memory sync is competing with us and requires a responsive EMT. */
-        while ((rc = PDMCritSectTryEnter(&pVM->ftm.s.CritSect)) == VERR_SEM_BUSY)
-        {
-            if (VM_FF_IS_SET(pVM, VM_FF_EMT_RENDEZVOUS))
-            {
-                rc = VMMR3EmtRendezvousFF(pVM, pVCpu);
-                AssertRC(rc);
-            }
-
-            if (VM_FF_IS_SET(pVM, VM_FF_REQUEST))
-            {
-                rc = VMR3ReqProcessU(pVM->pUVM, VMCPUID_ANY, true /*fPriorityOnly*/);
-                AssertRC(rc);
-            }
-        }
-    }
-    else
-        rc = PDMCritSectEnter(&pVM->ftm.s.CritSect, VERR_SEM_BUSY);
-
-    AssertMsg(rc == VINF_SUCCESS, ("%Rrc\n", rc));
-
-    STAM_PROFILE_START(&pVM->ftm.s.StatCheckpoint, a);
-
-    rc = VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ONCE, ftmR3SetCheckpointRendezvous, NULL);
-
-    STAM_PROFILE_STOP(&pVM->ftm.s.StatCheckpoint, a);
-
-    PDMCritSectLeave(&pVM->ftm.s.CritSect);
-    pVM->ftm.s.fCheckpointingActive = false;
-
-    return rc;
-}
Index: /trunk/src/VBox/VMM/VMMR3/PDMDriver.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/PDMDriver.cpp	(revision 80073)
+++ /trunk/src/VBox/VMM/VMMR3/PDMDriver.cpp	(revision 80074)
@@ -1758,12 +1758,4 @@
 
 
-/** @interface_method_impl{PDMDRVHLPR3,pfnFTSetCheckpoint} */
-static DECLCALLBACK(int) pdmR3DrvHlp_FTSetCheckpoint(PPDMDRVINS pDrvIns, FTMCHECKPOINTTYPE enmType)
-{
-    PDMDRV_ASSERT_DRVINS(pDrvIns);
-    return FTMSetCheckpoint(pDrvIns->Internal.s.pVMR3, enmType);
-}
-
-
 /** @interface_method_impl{PDMDRVHLPR3,pfnBlkCacheRetain} */
 static DECLCALLBACK(int) pdmR3DrvHlp_BlkCacheRetain(PPDMDRVINS pDrvIns, PPPDMBLKCACHE ppBlkCache,
@@ -1851,5 +1843,4 @@
     pdmR3DrvHlp_CritSectInit,
     pdmR3DrvHlp_CallR0,
-    pdmR3DrvHlp_FTSetCheckpoint,
     pdmR3DrvHlp_BlkCacheRetain,
     pdmR3DrvHlp_VMGetSuspendReason,
Index: /trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp	(revision 80073)
+++ /trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp	(revision 80074)
@@ -1456,9 +1456,5 @@
                          * monitoring if the page is known to be very busy. */
                         if (PGM_PAGE_IS_WRITTEN_TO(pPage))
-                        {
                             PGM_PAGE_CLEAR_WRITTEN_TO(pVM, pPage);
-                            /* Remember this dirty page for the next (memory) sync. */
-                            PGM_PAGE_SET_FT_DIRTY(pPage);
-                        }
 
                         pgmPhysPageWriteMonitor(pVM, pPage, pRam->GCPhys + ((RTGCPHYS)iPage << PAGE_SHIFT));
@@ -1497,85 +1493,4 @@
     int rc = VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ONCE, pgmR3PhysWriteProtectRAMRendezvous, NULL);
     AssertRC(rc);
-    return rc;
-}
-
-/**
- * Enumerate all dirty FT pages.
- *
- * @returns VBox status code.
- * @param   pVM         The cross context VM structure.
- * @param   pfnEnum     Enumerate callback handler.
- * @param   pvUser      Enumerate callback handler parameter.
- */
-VMMR3DECL(int) PGMR3PhysEnumDirtyFTPages(PVM pVM, PFNPGMENUMDIRTYFTPAGES pfnEnum, void *pvUser)
-{
-    int rc = VINF_SUCCESS;
-
-    pgmLock(pVM);
-    for (PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRangesX);
-         pRam;
-         pRam = pRam->CTX_SUFF(pNext))
-    {
-        uint32_t cPages = pRam->cb >> PAGE_SHIFT;
-        for (uint32_t iPage = 0; iPage < cPages; iPage++)
-        {
-            PPGMPAGE    pPage       = &pRam->aPages[iPage];
-            PGMPAGETYPE enmPageType = (PGMPAGETYPE)PGM_PAGE_GET_TYPE(pPage);
-
-            if (    RT_LIKELY(enmPageType == PGMPAGETYPE_RAM)
-                ||  enmPageType == PGMPAGETYPE_MMIO2)
-            {
-                /*
-                 * A RAM page.
-                 */
-                switch (PGM_PAGE_GET_STATE(pPage))
-                {
-                    case PGM_PAGE_STATE_ALLOCATED:
-                    case PGM_PAGE_STATE_WRITE_MONITORED:
-                        if (   !PGM_PAGE_IS_WRITTEN_TO(pPage)  /* not very recently updated? */
-                            && PGM_PAGE_IS_FT_DIRTY(pPage))
-                        {
-                            uint32_t       cbPageRange = PAGE_SIZE;
-                            uint32_t       iPageClean  = iPage + 1;
-                            RTGCPHYS       GCPhysPage  = pRam->GCPhys + iPage * PAGE_SIZE;
-                            uint8_t       *pu8Page     = NULL;
-                            PGMPAGEMAPLOCK Lock;
-
-                            /* Find the next clean page, so we can merge adjacent dirty pages. */
-                            for (; iPageClean < cPages; iPageClean++)
-                            {
-                                PPGMPAGE pPageNext = &pRam->aPages[iPageClean];
-                                if (    RT_UNLIKELY(PGM_PAGE_GET_TYPE(pPageNext) != PGMPAGETYPE_RAM)
-                                    ||  PGM_PAGE_GET_STATE(pPageNext) != PGM_PAGE_STATE_ALLOCATED
-                                    ||  PGM_PAGE_IS_WRITTEN_TO(pPageNext)
-                                    ||  !PGM_PAGE_IS_FT_DIRTY(pPageNext)
-                                    /* Crossing a chunk boundary? */
-                                    ||  (GCPhysPage & GMM_PAGEID_IDX_MASK) != ((GCPhysPage + cbPageRange) & GMM_PAGEID_IDX_MASK)
-                                    )
-                                    break;
-
-                                cbPageRange += PAGE_SIZE;
-                            }
-
-                            rc = PGMPhysGCPhys2CCPtrReadOnly(pVM, GCPhysPage, (const void **)&pu8Page, &Lock);
-                            if (RT_SUCCESS(rc))
-                            {
-                                /** @todo this is risky; the range might be changed, but little choice as the sync
-                                 *  costs a lot of time. */
-                                pgmUnlock(pVM);
-                                pfnEnum(pVM, GCPhysPage, pu8Page, cbPageRange, pvUser);
-                                pgmLock(pVM);
-                                PGMPhysReleasePageMappingLock(pVM, &Lock);
-                            }
-
-                            for (uint32_t iTmp = iPage; iTmp < iPageClean; iTmp++)
-                                PGM_PAGE_CLEAR_FT_DIRTY(&pRam->aPages[iTmp]);
-                        }
-                        break;
-                }
-            }
-        }
-    }
-    pgmUnlock(pVM);
     return rc;
 }
Index: /trunk/src/VBox/VMM/VMMR3/PGMSavedState.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/PGMSavedState.cpp	(revision 80073)
+++ /trunk/src/VBox/VMM/VMMR3/PGMSavedState.cpp	(revision 80074)
@@ -32,5 +32,4 @@
 #include <VBox/param.h>
 #include <VBox/err.h>
-#include <VBox/vmm/ftm.h>
 
 #include <iprt/asm.h>
@@ -438,7 +437,4 @@
 static int pgmR3SaveRomVirginPages(PVM pVM, PSSMHANDLE pSSM, bool fLiveSave)
 {
-    if (FTMIsDeltaLoadSaveActive(pVM))
-        return VINF_SUCCESS;    /* nothing to do as nothing has changed here */
-
     pgmLock(pVM);
     for (PPGMROMRANGE pRom = pVM->pgm.s.pRomRangesR3; pRom; pRom = pRom->pNextR3)
@@ -516,7 +512,4 @@
 static int pgmR3SaveShadowedRomPages(PVM pVM, PSSMHANDLE pSSM, bool fLiveSave, bool fFinalPass)
 {
-    if (FTMIsDeltaLoadSaveActive(pVM))
-        return VINF_SUCCESS;    /* nothing to do as we deal with those pages separately */
-
     /*
      * The Shadowed ROMs.
@@ -1572,5 +1565,4 @@
     RTGCPHYS GCPhysCur = 0;
     PPGMRAMRANGE pCur;
-    bool fFTMDeltaSaveActive = FTMIsDeltaLoadSaveActive(pVM);
 
     pgmLock(pVM);
@@ -1675,35 +1667,12 @@
                         if (!ASMMemIsZeroPage(pvPage))
                         {
-                            if (fFTMDeltaSaveActive)
-                            {
-                                if (    PGM_PAGE_IS_WRITTEN_TO(pCurPage)
-                                    ||  PGM_PAGE_IS_FT_DIRTY(pCurPage))
-                                {
-                                    if (GCPhys == GCPhysLast + PAGE_SIZE)
-                                        SSMR3PutU8(pSSM, PGM_STATE_REC_RAM_RAW);
-                                    else
-                                    {
-                                        SSMR3PutU8(pSSM, PGM_STATE_REC_RAM_RAW | PGM_STATE_REC_FLAG_ADDR);
-                                        SSMR3PutGCPhys(pSSM, GCPhys);
-                                    }
-                                    rc = SSMR3PutMem(pSSM, abPage, PAGE_SIZE);
-                                    PGM_PAGE_CLEAR_WRITTEN_TO(pVM, pCurPage);
-                                    PGM_PAGE_CLEAR_FT_DIRTY(pCurPage);
-                                }
-                                /* else nothing changed, so skip it. */
-                                else
-                                    fSkipped = true;
-                            }
+                            if (GCPhys == GCPhysLast + PAGE_SIZE)
+                                SSMR3PutU8(pSSM, PGM_STATE_REC_RAM_RAW);
                             else
                             {
-                                if (GCPhys == GCPhysLast + PAGE_SIZE)
-                                    SSMR3PutU8(pSSM, PGM_STATE_REC_RAM_RAW);
-                                else
-                                {
-                                    SSMR3PutU8(pSSM, PGM_STATE_REC_RAM_RAW | PGM_STATE_REC_FLAG_ADDR);
-                                    SSMR3PutGCPhys(pSSM, GCPhys);
-                                }
-                                rc = SSMR3PutMem(pSSM, abPage, PAGE_SIZE);
+                                SSMR3PutU8(pSSM, PGM_STATE_REC_RAM_RAW | PGM_STATE_REC_FLAG_ADDR);
+                                SSMR3PutGCPhys(pSSM, GCPhys);
                             }
+                            rc = SSMR3PutMem(pSSM, abPage, PAGE_SIZE);
                         }
                         else
Index: /trunk/src/VBox/VMM/VMMR3/VM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/VM.cpp	(revision 80073)
+++ /trunk/src/VBox/VMM/VMMR3/VM.cpp	(revision 80074)
@@ -67,5 +67,4 @@
 #include <VBox/vmm/iom.h>
 #include <VBox/vmm/ssm.h>
-#include <VBox/vmm/ftm.h>
 #include <VBox/vmm/hm.h>
 #include <VBox/vmm/gim.h>
@@ -885,96 +884,90 @@
                         if (RT_SUCCESS(rc))
                         {
-                            rc = FTMR3Init(pVM);
+                            rc = VMMR3Init(pVM);
                             if (RT_SUCCESS(rc))
                             {
-                                rc = VMMR3Init(pVM);
+                                rc = SELMR3Init(pVM);
                                 if (RT_SUCCESS(rc))
                                 {
-                                    rc = SELMR3Init(pVM);
+                                    rc = TRPMR3Init(pVM);
                                     if (RT_SUCCESS(rc))
                                     {
-                                        rc = TRPMR3Init(pVM);
+                                        rc = SSMR3RegisterStub(pVM, "CSAM", 0);
                                         if (RT_SUCCESS(rc))
                                         {
-                                            rc = SSMR3RegisterStub(pVM, "CSAM", 0);
+                                            rc = SSMR3RegisterStub(pVM, "PATM", 0);
                                             if (RT_SUCCESS(rc))
                                             {
-                                                rc = SSMR3RegisterStub(pVM, "PATM", 0);
+                                                rc = IOMR3Init(pVM);
                                                 if (RT_SUCCESS(rc))
                                                 {
-                                                    rc = IOMR3Init(pVM);
+                                                    rc = EMR3Init(pVM);
                                                     if (RT_SUCCESS(rc))
                                                     {
-                                                        rc = EMR3Init(pVM);
+                                                        rc = IEMR3Init(pVM);
                                                         if (RT_SUCCESS(rc))
                                                         {
-                                                            rc = IEMR3Init(pVM);
+                                                            rc = DBGFR3Init(pVM);
                                                             if (RT_SUCCESS(rc))
                                                             {
-                                                                rc = DBGFR3Init(pVM);
+                                                                /* GIM must be init'd before PDM, gimdevR3Construct()
+                                                                   requires GIM provider to be setup. */
+                                                                rc = GIMR3Init(pVM);
                                                                 if (RT_SUCCESS(rc))
                                                                 {
-                                                                    /* GIM must be init'd before PDM, gimdevR3Construct()
-                                                                       requires GIM provider to be setup. */
-                                                                    rc = GIMR3Init(pVM);
+                                                                    rc = PDMR3Init(pVM);
                                                                     if (RT_SUCCESS(rc))
                                                                     {
-                                                                        rc = PDMR3Init(pVM);
+                                                                        rc = PGMR3InitDynMap(pVM);
+                                                                        if (RT_SUCCESS(rc))
+                                                                            rc = MMR3HyperInitFinalize(pVM);
+                                                                        if (RT_SUCCESS(rc))
+                                                                            rc = PGMR3InitFinalize(pVM);
+                                                                        if (RT_SUCCESS(rc))
+                                                                            rc = TMR3InitFinalize(pVM);
+#ifdef VBOX_WITH_REM
+                                                                        if (RT_SUCCESS(rc))
+                                                                            rc = REMR3InitFinalize(pVM);
+#endif
                                                                         if (RT_SUCCESS(rc))
                                                                         {
-                                                                            rc = PGMR3InitDynMap(pVM);
-                                                                            if (RT_SUCCESS(rc))
-                                                                                rc = MMR3HyperInitFinalize(pVM);
-                                                                            if (RT_SUCCESS(rc))
-                                                                                rc = PGMR3InitFinalize(pVM);
-                                                                            if (RT_SUCCESS(rc))
-                                                                                rc = TMR3InitFinalize(pVM);
-#ifdef VBOX_WITH_REM
-                                                                            if (RT_SUCCESS(rc))
-                                                                                rc = REMR3InitFinalize(pVM);
-#endif
-                                                                            if (RT_SUCCESS(rc))
-                                                                            {
-                                                                                PGMR3MemSetup(pVM, false /*fAtReset*/);
-                                                                                PDMR3MemSetup(pVM, false /*fAtReset*/);
-                                                                            }
-                                                                            if (RT_SUCCESS(rc))
-                                                                                rc = vmR3InitDoCompleted(pVM, VMINITCOMPLETED_RING3);
-                                                                            if (RT_SUCCESS(rc))
-                                                                            {
-                                                                                LogFlow(("vmR3InitRing3: returns %Rrc\n", VINF_SUCCESS));
-                                                                                return VINF_SUCCESS;
-                                                                            }
-
-                                                                            int rc2 = PDMR3Term(pVM);
-                                                                            AssertRC(rc2);
+                                                                            PGMR3MemSetup(pVM, false /*fAtReset*/);
+                                                                            PDMR3MemSetup(pVM, false /*fAtReset*/);
                                                                         }
-                                                                        int rc2 = GIMR3Term(pVM);
+                                                                        if (RT_SUCCESS(rc))
+                                                                            rc = vmR3InitDoCompleted(pVM, VMINITCOMPLETED_RING3);
+                                                                        if (RT_SUCCESS(rc))
+                                                                        {
+                                                                            LogFlow(("vmR3InitRing3: returns %Rrc\n", VINF_SUCCESS));
+                                                                            return VINF_SUCCESS;
+                                                                        }
+
+                                                                        int rc2 = PDMR3Term(pVM);
                                                                         AssertRC(rc2);
                                                                     }
-                                                                    int rc2 = DBGFR3Term(pVM);
+                                                                    int rc2 = GIMR3Term(pVM);
                                                                     AssertRC(rc2);
                                                                 }
-                                                                int rc2 = IEMR3Term(pVM);
+                                                                int rc2 = DBGFR3Term(pVM);
                                                                 AssertRC(rc2);
                                                             }
-                                                            int rc2 = EMR3Term(pVM);
+                                                            int rc2 = IEMR3Term(pVM);
                                                             AssertRC(rc2);
                                                         }
-                                                        int rc2 = IOMR3Term(pVM);
+                                                        int rc2 = EMR3Term(pVM);
                                                         AssertRC(rc2);
                                                     }
+                                                    int rc2 = IOMR3Term(pVM);
+                                                    AssertRC(rc2);
                                                 }
                                             }
-                                            int rc2 = TRPMR3Term(pVM);
-                                            AssertRC(rc2);
                                         }
-                                        int rc2 = SELMR3Term(pVM);
+                                        int rc2 = TRPMR3Term(pVM);
                                         AssertRC(rc2);
                                     }
-                                    int rc2 = VMMR3Term(pVM);
+                                    int rc2 = SELMR3Term(pVM);
                                     AssertRC(rc2);
                                 }
-                                int rc2 = FTMR3Term(pVM);
+                                int rc2 = VMMR3Term(pVM);
                                 AssertRC(rc2);
                             }
@@ -1609,11 +1602,9 @@
  * @param   ppSSM               Where to return the saved state handle in case of a
  *                              live snapshot scenario.
- * @param   fSkipStateChanges   Set if we're supposed to skip state changes (FTM delta case)
  *
  * @thread  EMT
  */
 static DECLCALLBACK(int) vmR3Save(PVM pVM, uint32_t cMsMaxDowntime, const char *pszFilename, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser,
-                                  SSMAFTER enmAfter, PFNVMPROGRESS pfnProgress, void *pvProgressUser, PSSMHANDLE *ppSSM,
-                                  bool fSkipStateChanges)
+                                  SSMAFTER enmAfter, PFNVMPROGRESS pfnProgress, void *pvProgressUser, PSSMHANDLE *ppSSM)
 {
     int rc = VINF_SUCCESS;
@@ -1637,25 +1628,14 @@
      * Change the state and perform/start the saving.
      */
-    if (!fSkipStateChanges)
-    {
-        rc = vmR3TrySetState(pVM, "VMR3Save", 2,
-                             VMSTATE_SAVING,     VMSTATE_SUSPENDED,
-                             VMSTATE_RUNNING_LS, VMSTATE_RUNNING);
-    }
-    else
-    {
-        Assert(enmAfter != SSMAFTER_TELEPORT);
-        rc = 1;
-    }
-
+    rc = vmR3TrySetState(pVM, "VMR3Save", 2,
+                         VMSTATE_SAVING,     VMSTATE_SUSPENDED,
+                         VMSTATE_RUNNING_LS, VMSTATE_RUNNING);
     if (rc == 1 && enmAfter != SSMAFTER_TELEPORT)
     {
         rc = SSMR3Save(pVM, pszFilename, pStreamOps, pvStreamOpsUser, enmAfter, pfnProgress, pvProgressUser);
-        if (!fSkipStateChanges)
-            vmR3SetState(pVM, VMSTATE_SUSPENDED, VMSTATE_SAVING);
+        vmR3SetState(pVM, VMSTATE_SUSPENDED, VMSTATE_SAVING);
     }
     else if (rc == 2 || enmAfter == SSMAFTER_TELEPORT)
     {
-        Assert(!fSkipStateChanges);
         if (enmAfter == SSMAFTER_TELEPORT)
             pVM->vm.s.fTeleportedAndNotFullyResumedYet = true;
@@ -1684,5 +1664,4 @@
  * @param   pvProgressUser      User argument for the progress callback.
  * @param   pfSuspended         Set if we suspended the VM.
- * @param   fSkipStateChanges   Set if we're supposed to skip state changes (FTM delta case)
  *
  * @thread  Non-EMT
@@ -1690,6 +1669,5 @@
 static int vmR3SaveTeleport(PVM pVM, uint32_t cMsMaxDowntime,
                             const char *pszFilename, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser,
-                            SSMAFTER enmAfter, PFNVMPROGRESS pfnProgress, void *pvProgressUser, bool *pfSuspended,
-                            bool fSkipStateChanges)
+                            SSMAFTER enmAfter, PFNVMPROGRESS pfnProgress, void *pvProgressUser, bool *pfSuspended)
 {
     /*
@@ -1698,11 +1676,9 @@
     PSSMHANDLE pSSM;
     int rc = VMR3ReqCallWait(pVM, 0 /*idDstCpu*/,
-                             (PFNRT)vmR3Save, 10, pVM, cMsMaxDowntime, pszFilename, pStreamOps, pvStreamOpsUser,
-                             enmAfter, pfnProgress, pvProgressUser, &pSSM, fSkipStateChanges);
-    if (    RT_SUCCESS(rc)
-        &&  pSSM)
-    {
-        Assert(!fSkipStateChanges);
-
+                             (PFNRT)vmR3Save, 9, pVM, cMsMaxDowntime, pszFilename, pStreamOps, pvStreamOpsUser,
+                             enmAfter, pfnProgress, pvProgressUser, &pSSM);
+    if (   RT_SUCCESS(rc)
+        && pSSM)
+    {
         /*
          * Live snapshot.
@@ -1800,50 +1776,6 @@
     int rc = vmR3SaveTeleport(pVM, 250 /*cMsMaxDowntime*/,
                               pszFilename, NULL /* pStreamOps */, NULL /* pvStreamOpsUser */,
-                              enmAfter, pfnProgress, pvUser, pfSuspended,
-                              false /* fSkipStateChanges */);
+                              enmAfter, pfnProgress, pvUser, pfSuspended);
     LogFlow(("VMR3Save: returns %Rrc (*pfSuspended=%RTbool)\n", rc, *pfSuspended));
-    return rc;
-}
-
-/**
- * Save current VM state (used by FTM)
- *
- *
- * @returns VBox status code.
- *
- * @param   pUVM                The user mode VM handle.
- * @param   pStreamOps          The stream methods.
- * @param   pvStreamOpsUser     The user argument to the stream methods.
- * @param   pfSuspended         Set if we suspended the VM.
- * @param   fSkipStateChanges   Set if we're supposed to skip state changes (FTM delta case)
- *
- * @thread      Any
- * @vmstate     Suspended or Running
- * @vmstateto   Saving+Suspended or
- *              RunningLS+SuspendingLS+SuspendedLS+Saving+Suspended.
- */
-VMMR3_INT_DECL(int) VMR3SaveFT(PUVM pUVM, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser, bool *pfSuspended, bool fSkipStateChanges)
-{
-    LogFlow(("VMR3SaveFT: pUVM=%p pStreamOps=%p pvSteamOpsUser=%p pfSuspended=%p\n",
-             pUVM, pStreamOps, pvStreamOpsUser, pfSuspended));
-
-    /*
-     * Validate input.
-     */
-    AssertPtr(pfSuspended);
-    *pfSuspended = false;
-    UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE);
-    PVM pVM = pUVM->pVM;
-    VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE);
-    AssertReturn(pStreamOps, VERR_INVALID_PARAMETER);
-
-    /*
-     * Join paths with VMR3Teleport.
-     */
-    int rc = vmR3SaveTeleport(pVM, 250 /*cMsMaxDowntime*/,
-                              NULL, pStreamOps, pvStreamOpsUser,
-                              SSMAFTER_CONTINUE, NULL, NULL, pfSuspended,
-                              fSkipStateChanges);
-    LogFlow(("VMR3SaveFT: returns %Rrc (*pfSuspended=%RTbool)\n", rc, *pfSuspended));
     return rc;
 }
@@ -1889,8 +1821,6 @@
      * Join paths with VMR3Save.
      */
-    int rc = vmR3SaveTeleport(pVM, cMsMaxDowntime,
-                              NULL /*pszFilename*/, pStreamOps, pvStreamOpsUser,
-                              SSMAFTER_TELEPORT, pfnProgress, pvProgressUser, pfSuspended,
-                              false /* fSkipStateChanges */);
+    int rc = vmR3SaveTeleport(pVM, cMsMaxDowntime, NULL /*pszFilename*/, pStreamOps, pvStreamOpsUser,
+                              SSMAFTER_TELEPORT, pfnProgress, pvProgressUser, pfSuspended);
     LogFlow(("VMR3Teleport: returns %Rrc (*pfSuspended=%RTbool)\n", rc, *pfSuspended));
     return rc;
@@ -1911,14 +1841,10 @@
  * @param   pvProgressUser      User argument for the progress callback.
  * @param   fTeleporting        Indicates whether we're teleporting or not.
- * @param   fSkipStateChanges   Set if we're supposed to skip state changes (FTM delta case)
  *
  * @thread  EMT.
  */
 static DECLCALLBACK(int) vmR3Load(PUVM pUVM, const char *pszFilename, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser,
-                                  PFNVMPROGRESS pfnProgress, void *pvProgressUser, bool fTeleporting,
-                                  bool fSkipStateChanges)
-{
-    int rc = VINF_SUCCESS;
-
+                                  PFNVMPROGRESS pfnProgress, void *pvProgressUser, bool fTeleporting)
+{
     LogFlow(("vmR3Load: pUVM=%p pszFilename=%p:{%s} pStreamOps=%p pvStreamOpsUser=%p pfnProgress=%p pvProgressUser=%p fTeleporting=%RTbool\n",
              pUVM, pszFilename, pszFilename, pStreamOps, pvStreamOpsUser, pfnProgress, pvProgressUser, fTeleporting));
@@ -1934,18 +1860,16 @@
     AssertPtrNull(pfnProgress);
 
-    if (!fSkipStateChanges)
-    {
-        /*
-         * Change the state and perform the load.
-         *
-         * Always perform a relocation round afterwards to make sure hypervisor
-         * selectors and such are correct.
-         */
-        rc = vmR3TrySetState(pVM, "VMR3Load", 2,
+    /*
+     * Change the state and perform the load.
+     *
+     * Always perform a relocation round afterwards to make sure hypervisor
+     * selectors and such are correct.
+     */
+    int rc = vmR3TrySetState(pVM, "VMR3Load", 2,
                              VMSTATE_LOADING, VMSTATE_CREATED,
                              VMSTATE_LOADING, VMSTATE_SUSPENDED);
-        if (RT_FAILURE(rc))
-            return rc;
-    }
+    if (RT_FAILURE(rc))
+        return rc;
+
     pVM->vm.s.fTeleportedAndNotFullyResumedYet = fTeleporting;
 
@@ -1955,12 +1879,10 @@
     {
         VMR3Relocate(pVM, 0 /*offDelta*/);
-        if (!fSkipStateChanges)
-            vmR3SetState(pVM, VMSTATE_SUSPENDED, VMSTATE_LOADING);
+        vmR3SetState(pVM, VMSTATE_SUSPENDED, VMSTATE_LOADING);
     }
     else
     {
         pVM->vm.s.fTeleportedAndNotFullyResumedYet = false;
-        if (!fSkipStateChanges)
-            vmR3SetState(pVM, VMSTATE_LOAD_FAILURE, VMSTATE_LOADING);
+        vmR3SetState(pVM, VMSTATE_LOAD_FAILURE, VMSTATE_LOADING);
 
         if (cErrorsPriorToSave == VMR3GetErrorCount(pUVM))
@@ -2008,7 +1930,7 @@
      * since there is no execution taking place when this call is allowed.
      */
-    int rc = VMR3ReqCallWaitU(pUVM, 0 /*idDstCpu*/, (PFNRT)vmR3Load, 8,
-                              pUVM, pszFilename, (uintptr_t)NULL /*pStreamOps*/, (uintptr_t)NULL /*pvStreamOpsUser*/, pfnProgress, pvUser,
-                              false /*fTeleporting*/, false /* fSkipStateChanges */);
+    int rc = VMR3ReqCallWaitU(pUVM, 0 /*idDstCpu*/, (PFNRT)vmR3Load, 7,
+                              pUVM, pszFilename, (uintptr_t)NULL /*pStreamOps*/, (uintptr_t)NULL /*pvStreamOpsUser*/,
+                              pfnProgress, pvUser, false /*fTeleporting*/);
     LogFlow(("VMR3LoadFromFile: returns %Rrc\n", rc));
     return rc;
@@ -2047,45 +1969,11 @@
      * since there is no execution taking place when this call is allowed.
      */
-    int rc = VMR3ReqCallWaitU(pUVM, 0 /*idDstCpu*/, (PFNRT)vmR3Load, 8,
-                              pUVM, (uintptr_t)NULL /*pszFilename*/, pStreamOps, pvStreamOpsUser, pfnProgress, pvProgressUser,
-                              true /*fTeleporting*/, false /* fSkipStateChanges */);
+    int rc = VMR3ReqCallWaitU(pUVM, 0 /*idDstCpu*/, (PFNRT)vmR3Load, 7,
+                              pUVM, (uintptr_t)NULL /*pszFilename*/, pStreamOps, pvStreamOpsUser, pfnProgress,
+                              pvProgressUser, true /*fTeleporting*/);
     LogFlow(("VMR3LoadFromStream: returns %Rrc\n", rc));
     return rc;
 }
 
-
-/**
- * Special version for the FT component, it skips state changes.
- *
- * @returns VBox status code.
- *
- * @param   pUVM            The VM handle.
- * @param   pStreamOps      The stream methods.
- * @param   pvStreamOpsUser The user argument to the stream methods.
- *
- * @thread      Any thread.
- * @vmstate     Created, Suspended
- * @vmstateto   Loading+Suspended
- */
-VMMR3_INT_DECL(int) VMR3LoadFromStreamFT(PUVM pUVM, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser)
-{
-    LogFlow(("VMR3LoadFromStreamFT: pUVM=%p pStreamOps=%p pvStreamOpsUser=%p\n", pUVM, pStreamOps, pvStreamOpsUser));
-
-    /*
-     * Validate input.
-     */
-    UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE);
-    AssertPtrReturn(pStreamOps, VERR_INVALID_POINTER);
-
-    /*
-     * Forward the request to EMT(0).  No need to setup a rendezvous here
-     * since there is no execution taking place when this call is allowed.
-     */
-    int rc = VMR3ReqCallWaitU(pUVM, 0 /*idDstCpu*/, (PFNRT)vmR3Load, 8,
-                              pUVM, (uintptr_t)NULL /*pszFilename*/, pStreamOps, pvStreamOpsUser, NULL, NULL,
-                              true /*fTeleporting*/, true /* fSkipStateChanges */);
-    LogFlow(("VMR3LoadFromStream: returns %Rrc\n", rc));
-    return rc;
-}
 
 /**
@@ -2329,6 +2217,4 @@
         pUVM->vm.s.pvDBGC = NULL;
 #endif
-        AssertRC(rc);
-        rc = FTMR3Term(pVM);
         AssertRC(rc);
         rc = PDMR3Term(pVM);
@@ -3081,5 +2967,4 @@
         case VMSTATE_RUNNING:           return "RUNNING";
         case VMSTATE_RUNNING_LS:        return "RUNNING_LS";
-        case VMSTATE_RUNNING_FT:        return "RUNNING_FT";
         case VMSTATE_RESETTING:         return "RESETTING";
         case VMSTATE_RESETTING_LS:      return "RESETTING_LS";
@@ -3167,5 +3052,4 @@
                             || enmStateNew == VMSTATE_SOFT_RESETTING
                             || enmStateNew == VMSTATE_RUNNING_LS
-                            || enmStateNew == VMSTATE_RUNNING_FT
                             || enmStateNew == VMSTATE_DEBUGGING
                             || enmStateNew == VMSTATE_FATAL_ERROR
@@ -3184,11 +3068,4 @@
                             || enmStateNew == VMSTATE_FATAL_ERROR_LS
                             || enmStateNew == VMSTATE_GURU_MEDITATION_LS
-                            , ("%s -> %s\n", VMR3GetStateName(enmStateOld), VMR3GetStateName(enmStateNew)), false);
-            break;
-
-        case VMSTATE_RUNNING_FT:
-            AssertMsgReturn(   enmStateNew == VMSTATE_POWERING_OFF
-                            || enmStateNew == VMSTATE_FATAL_ERROR
-                            || enmStateNew == VMSTATE_GURU_MEDITATION
                             , ("%s -> %s\n", VMR3GetStateName(enmStateOld), VMR3GetStateName(enmStateNew)), false);
             break;
Index: /trunk/src/VBox/VMM/VMMR3/VMM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/VMM.cpp	(revision 80073)
+++ /trunk/src/VBox/VMM/VMMR3/VMM.cpp	(revision 80074)
@@ -125,5 +125,4 @@
 #endif
 #include <VBox/vmm/ssm.h>
-#include <VBox/vmm/ftm.h>
 #include <VBox/vmm/tm.h>
 #include "VMMInternal.h"
@@ -2508,8 +2507,4 @@
             break;
 
-        case VMMCALLRING3_FTM_SET_CHECKPOINT:
-            pVCpu->vmm.s.rcCallRing3 = FTMR3SetCheckpoint(pVM, (FTMCHECKPOINTTYPE)pVCpu->vmm.s.u64CallRing3Arg);
-            break;
-
         default:
             AssertMsgFailed(("enmCallRing3Operation=%d\n", pVCpu->vmm.s.enmCallRing3Operation));
Index: unk/src/VBox/VMM/include/FTMInternal.h
===================================================================
--- /trunk/src/VBox/VMM/include/FTMInternal.h	(revision 80073)
+++ 	(revision )
@@ -1,128 +1,0 @@
-/* $Id$ */
-/** @file
- * FTM - Internal header file.
- */
-
-/*
- * Copyright (C) 2010-2019 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-#ifndef VMM_INCLUDED_SRC_include_FTMInternal_h
-#define VMM_INCLUDED_SRC_include_FTMInternal_h
-#ifndef RT_WITHOUT_PRAGMA_ONCE
-# pragma once
-#endif
-
-#include <VBox/cdefs.h>
-#include <VBox/types.h>
-#include <VBox/vmm/ftm.h>
-#include <VBox/vmm/stam.h>
-#include <VBox/vmm/pdmcritsect.h>
-#include <iprt/avl.h>
-
-/** @defgroup grp_ftm_int Internals.
- * @ingroup grp_ftm
- * @{
- */
-
-/** Physical page tree node. */
-typedef struct FTMPHYSPAGETREENODE
-{
-    AVLGCPHYSNODECORE   Core;
-    void               *pPage;
-} FTMPHYSPAGETREENODE;
-/** Pointer to FTMPHYSPAGETREENODE */
-typedef FTMPHYSPAGETREENODE *PFTMPHYSPAGETREENODE;
-
-/**
- * FTM VM Instance data.
- * Changes to this must checked against the padding of the ftm union in VM!
- */
-typedef struct FTM
-{
-    /** Address of the standby VM. */
-    R3PTRTYPE(char *)   pszAddress;
-    /** Password to access the syncing server of the standby VM. */
-    R3PTRTYPE(char *)   pszPassword;
-    /** Port of the standby VM. */
-    unsigned            uPort;
-    /** Syncing interval in ms. */
-    unsigned            uInterval;
-
-    /** Set when this VM is the standby FT node. */
-    bool                fIsStandbyNode;
-    /** Set when this master VM is busy with checkpointing. */
-    bool                fCheckpointingActive;
-    /** Set when VM save/restore should only include changed pages. */
-    bool                fDeltaLoadSaveActive;
-    /** Fallover to the standby VM. */
-    bool                fActivateStandby;
-    bool                fAlignment[4];
-
-    /** Current active socket. */
-    RTSOCKET            hSocket;
-
-    /* Shutdown event semaphore. */
-    RTSEMEVENT          hShutdownEvent;
-
-    /** State sync. */
-    struct
-    {
-        unsigned            uOffStream;
-        unsigned            cbReadBlock;
-        bool                fStopReading;
-        bool                fIOError;
-        bool                fEndOfStream;
-        bool                fAlignment[5];
-    } syncstate;
-
-    struct
-    {
-        R3PTRTYPE(PRTTCPSERVER)    hServer;
-        R3PTRTYPE(AVLGCPHYSTREE)   pPhysPageTree;
-        uint64_t                   u64LastHeartbeat;
-    } standby;
-
-    /*
-    struct
-    {
-    } master;
-    */
-
-    /** FTM critical section.
-     * This makes sure only the checkpoint or sync is active
-     */
-    PDMCRITSECT         CritSect;
-
-    STAMCOUNTER         StatReceivedMem;
-    STAMCOUNTER         StatReceivedState;
-    STAMCOUNTER         StatSentMem;
-    STAMCOUNTER         StatSentState;
-    STAMCOUNTER         StatDeltaMem;
-    STAMCOUNTER         StatDeltaVM;
-    STAMCOUNTER         StatFullSync;
-    STAMCOUNTER         StatCheckpointNetwork;
-    STAMCOUNTER         StatCheckpointStorage;
-#ifdef VBOX_WITH_STATISTICS
-    STAMPROFILE         StatCheckpoint;
-    STAMPROFILE         StatCheckpointResume;
-    STAMPROFILE         StatCheckpointPause;
-    STAMCOUNTER         StatSentMemRAM;
-    STAMCOUNTER         StatSentMemMMIO2;
-    STAMCOUNTER         StatSentMemShwROM;
-    STAMCOUNTER         StatSentStateWrite;
-#endif
-} FTM;
-AssertCompileMemberAlignment(FTM, CritSect, 8);
-
-/** @} */
-
-#endif /* !VMM_INCLUDED_SRC_include_FTMInternal_h */
Index: /trunk/src/VBox/VMM/include/PGMInternal.h
===================================================================
--- /trunk/src/VBox/VMM/include/PGMInternal.h	(revision 80073)
+++ /trunk/src/VBox/VMM/include/PGMInternal.h	(revision 80074)
@@ -827,6 +827,6 @@
          * (PGM_PAGE_PDE_TYPE_*). */
         uint64_t    u2PDETypeY          : 2;
-        /** 4     - Indicator of dirty page for fault tolerance tracking. */
-        uint64_t    fFTDirtyY           : 1;
+        /** 4     - Unused (was used by FTE for dirty tracking). */
+        uint64_t    fUnused1            : 1;
         /** 5     - Flag indicating that a write monitored page was written to
          *  when set. */
@@ -1168,23 +1168,4 @@
  */
 #define PGM_PAGE_IS_WRITTEN_TO(a_pPage)         ( (a_pPage)->s.fWrittenToY )
-
-/**
- * Marks the page as dirty for FTM
- * @param   a_pPage     Pointer to the physical guest page tracking structure.
- */
-#define PGM_PAGE_SET_FT_DIRTY(a_pPage)          do { (a_pPage)->s.fFTDirtyY = 1; } while (0)
-
-/**
- * Clears the FTM dirty indicator
- * @param   a_pPage     Pointer to the physical guest page tracking structure.
- */
-#define PGM_PAGE_CLEAR_FT_DIRTY(a_pPage)        do { (a_pPage)->s.fFTDirtyY = 0; } while (0)
-
-/**
- * Checks if the page was marked as dirty for FTM
- * @returns true/false.
- * @param   a_pPage     Pointer to the physical guest page tracking structure.
- */
-#define PGM_PAGE_IS_FT_DIRTY(a_pPage)           ( (a_pPage)->s.fFTDirtyY )
 
 
Index: /trunk/src/VBox/ValidationKit/testdriver/vboxwrappers.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testdriver/vboxwrappers.py	(revision 80073)
+++ /trunk/src/VBox/ValidationKit/testdriver/vboxwrappers.py	(revision 80074)
@@ -93,5 +93,4 @@
     if eState == vboxcon.MachineState_TeleportingPausedVM: return 'TeleportingPausedVM';
     if eState == vboxcon.MachineState_TeleportingIn: return 'TeleportingIn';
-    if eState == vboxcon.MachineState_FaultTolerantSyncing: return 'FaultTolerantSyncing';
     if eState == vboxcon.MachineState_DeletingSnapshotOnline: return 'DeletingSnapshotOnline';
     if eState == vboxcon.MachineState_DeletingSnapshotPaused: return 'DeletingSnapshotPaused';
@@ -99,4 +98,6 @@
     if eState == vboxcon.MachineState_DeletingSnapshot: return 'DeletingSnapshot';
     if eState == vboxcon.MachineState_SettingUp: return 'SettingUp';
+    if hasattr(vboxcon, 'MachineState_FaultTolerantSyncing'):
+        if eState == vboxcon.MachineState_FaultTolerantSyncing: return 'FaultTolerantSyncing';
     return 'Unknown-%s' % (eState,);
 
@@ -783,6 +784,7 @@
         if eState == vboxcon.MachineState_TeleportingIn:
             return True;
-        if eState == vboxcon.MachineState_FaultTolerantSyncing:
-            return True;
+        if hasattr(vboxcon, 'MachineState_FaultTolerantSyncing'):
+            if eState == vboxcon.MachineState_FaultTolerantSyncing:
+                return True;
         return False;
 
