New-SCVMCheckpoint

New-SCVMCheckpoint

Creates a checkpoint for a virtual machine deployed on a host managed by VMM.

Syntax

Parameter Set: VM
New-SCVMCheckpoint [-VM] <VM> [-Description <String> ] [-JobVariable <String> ] [-Name <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The New-SCVMCheckpoint cmdlet creates a checkpoint for a virtual machine deployed on a host managed by Virtual Machine Manager (VMM). You can use a checkpoint to restore a virtual machine to a previous state.

A typical use is to create a checkpoint before you install an update to the operating system or to an application on the virtual machine so that, if the update fails or adversely affects the virtual machine, you can use the Restore-VMCheckpoint cmdlet to revert the virtual machine to its previous state.

For virtual machines deployed on a Hyper-V host, VMware ESX host, or Citrix XenServer host, VMM creates the checkpoint without stopping the virtual machine, so no interruption in service occurs.

It is important to back up data files on a virtual machine before you restore the virtual machine to a checkpoint. When you restore the virtual machine, user data files on its virtual hard disks are returned to their previous state.

Although checkpoints let you restore a virtual machine to a previous state after a change such as a system or application update, checkpoints do not provide a permanent backup of the operating system, applications, or files. Checkpoints are stored with the virtual machine on the host. Therefore, if the host fails, checkpoints for virtual machines deployed on that host are lost.

To provide data protection for your virtual machines, you can use the Volume Shadow Copy Service (VSS). You can use a backup application such as System Center 2012 – Data Protection Manager (DPM) to back up virtual machines on any type of host to external storage.

You can grant self-service users permission to create and manage checkpoints for their virtual machines. For more information, type Get-Help Set-VMMUserRole -detailed.

Parameters

-Description<String>

States a description for the specified object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OnBehalfOfUser<System.String>

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OnBehalfOfUserRole<Microsoft.SystemCenter.VirtualMachineManager.UserRole>

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid]>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VM<VM>

Specifies a virtual machine object.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • VMCheckpoint

Examples

Example 1: Create a virtual machine checkpoint for virtual machines that have the same name but reside on different hosts

The first command gets the virtual machine objects named VM01, creates a checkpoint for each virtual machine object, and then stores the checkpoint objects in the $Checkpoints object array. This example assumes that more than one host contains a virtual machine named VM01.

The second command displays information about each checkpoint object stored in $Checkpoints.

PS C:\> $Checkpoints = Get-SCVirtualMachine -Name "VM01" | New-SCVMCheckpoint
PS C:\> $Checkpoints

Example 2: Create a virtual machine checkpoint for a virtual machine asynchronously

This example creates checkpoints in the same manner as Example 1, except that this command uses the RunAsynchronously parameter to return control to the command shell immediately, and uses the JobVariable parameter to track job progress and store a record of the progress in the $NewCheckpointJob variable. When you use the JobVariable parameter, you do not use the dollar sign ($) to create the variable.

The second command displays the contents of $NewCheckpointJob.

PS C:\> Get-SCVirtualMachine -Name "VM02" | New-SCVMCheckpoint -RunAsynchronously -JobVariable "NewCheckpiontJob"
PS C:\> Write-Host $NewCheckpointJob

Get-SCVMCheckpoint

Remove-SCVMCheckpoint

Restore-SCVMCheckpoint

Set-SCVMCheckpoint

Get-SCVirtualMachine