Restore a virtual machine using System Center Virtual Machine Manager

Last Update: 4/28/2017

Team Services | TFS 2017 | TFS 2015 | Previous versions

This example shows how you can integrate System Center Virtual Machine Manager (SCVMM) with Release Management in Visual Studio Team Services or Team Foundation Server. You can restore virtual machines managed by SCVMM to a clean snapshot and then deploy your apps to them.


You will need a minimum of two machines - a target server or virtual machine to deploy to, and an agent machine that drives the deployment. You may have multiple target servers depending on how many nodes you want to deploy to. However, you only need one agent machine to drive the deployment.

  1. Install the System Center Virtual Machine Manager (SCVMM) extension from Visual Studio Marketplace into your server or account.

    • If you are using Visual Studio Team Services, install the extension from this location in Visual Studio Marketplace.
    • If you are using Team Foundation Server, download the extension from this location in Visual Studio Marketplace, upload it to your Team Foundation Server, and install it.

  2. Install an agent on the agent machine:

  3. Install the Virtual Machine Manager (VMM) console by following these instructions. Supported version: System Center 2012 R2 Virtual Machine Manager.

  4. Create an SCVMM service endpoint in your team project:

    • Open your Team Services or TFS team project in your web browser. Choose the Settings icon in the menu bar and select Services.

    • In the Services tab, choose New Service Endpoint, and select SCVMM.

    • In the Add new SCVMM Connection dialog, enter the values required to connect to the SCVMM Server:

      • Connection Name: Enter a user-friendly name for the service endpoint such as MySCVMMServer.
      • SCVMM Server Name: Enter the fully qualified domain name and port number of the SCVMM server, in the form
      • Username and Password: Enter the credentials required to connect to the vCenter Server. Username formats such as username, domain\username, machine-name\username, and .\username are supported. UPN formats such as and built-in system accounts such as NT Authority\System are not supported.

  5. Choose OK to save the settings and create the connection.


  1. Open the Releases tab of the Build & Release hub and choose the "+" icon to create a new release definition.

  2. In the Create release definition dialog, select the Empty template and choose Next.

  3. In the next page, select Choose Later and then choose Create. This creates a new release definition with one default environment and no linked artifacts.

  4. Choose + Add tasks and add an SCVMM task from the Deploy section of the Task catalog dialog to the environment.

  5. To configure the SCVMM task to restore a virtual machine that is already managed in SCVMM to a snapshot, use the following settings:

    Task step Parameters
    Connect to a SCVMM server and perform actions on Virtual Machine(s).
    SCVMM Service Connection: Select the SCVMM connection you created earlier.
    Action: Restore Checkpoint
    Virtual Machine Names: Enter the names of one or more target virtual machines. Separate multiple names with a comma; for example, fabrikamdev,fabrikamqa,prod05
    Checkpoint Name: Enter the name of the checkpoint that will be applied to the virtual machines. This checkpoint must exist.
    Select VMs from: Optional. You can specify a filter to scope the source for virtual machines to either CLOUD or HOST. Leave it set to None
  6. You can now add other tasks to the environment, such as PowerShell on Target Machines and then deploy to the newly provisioned machines.

    In the future we plan for the SCVMM task to provide an output variable that you set in the task and then use as input to subsequent tasks. Until then, if you want to run additional tasks, you'll need to specify the fully-qualified domain names of the virtual machines that are provisioned in SCVMM.

  7. Type a name for the new release definition and save it.

  8. Create a new release from the release definition and deploy it to the environment.


I use Team Foundation Server on-premises and I don't see some of these features. Why not?

Some of these features are available only on Visual Studio Team Services and not yet available on-premises. Some features are available on-premises if you have upgraded to the latest version of TFS.

Help and support