1 | /* $Id: FTMAll.cpp 31792 2010-08-19 14:09:31Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * FTM - Fault Tolerance Manager - All contexts
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2010 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.alldomusa.eu.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 |
|
---|
19 | /*******************************************************************************
|
---|
20 | * Header Files *
|
---|
21 | *******************************************************************************/
|
---|
22 | #define LOG_GROUP LOG_GROUP_FTM
|
---|
23 | #include "FTMInternal.h"
|
---|
24 | #include <VBox/vm.h>
|
---|
25 | #include <VBox/vmm.h>
|
---|
26 | #include <VBox/err.h>
|
---|
27 | #include <VBox/param.h>
|
---|
28 | #include <VBox/log.h>
|
---|
29 |
|
---|
30 | #include <iprt/assert.h>
|
---|
31 |
|
---|
32 |
|
---|
33 | /**
|
---|
34 | * Sets a checkpoint for syncing the state with the standby node
|
---|
35 | *
|
---|
36 | * @returns VBox status code.
|
---|
37 | *
|
---|
38 | * @param pVM The VM to operate on.
|
---|
39 | */
|
---|
40 | VMMDECL(int) FTMSetCheckpoint(PVM pVM)
|
---|
41 | {
|
---|
42 | if (!pVM->fFaultTolerantMaster)
|
---|
43 | return VINF_SUCCESS;
|
---|
44 |
|
---|
45 | #ifdef IN_RING3
|
---|
46 | return FTMR3SyncState(pVM);
|
---|
47 | #else
|
---|
48 | return VERR_NOT_IMPLEMENTED;
|
---|
49 | #endif
|
---|
50 | }
|
---|