vRA provisioning with SCCM

Integrating SCCM with vRA to provide a service to build a Windows VM is a very popular request for vRA.  Even if your organization is leveraging clones, you may benefit from integrating SCCM or Linux Kickstart with vRA.   The primary benefit a consistent and visible service to create guest OS templates that can be used for cloning.  This post will cover the integration of an SCCM task sequence that installs Windows 2012 R2 with vRA providing the cloud infrastructure and self service to enable your users to quick produce quality content.

Create a new blueprint that Leverages SCCM

First create a new blueprint. Since we are using SCCM the blueprint could be physical or virtual. For this demonstration we will be using virtual.

Go to the infrastructure tab, blueprints and select Virtual, vSphere to create a new vSphere blueprint that will leverage SCCM.


After you name the blueprint, go to the build information tab to specify the type of VM being created along with compute, memory and storage.


1. We are creating a server blueprint that will create a new VM. Since we are using SCCM we will create a new VM and not be cloning a VM. Finally select the VirtualSCCMProvisioningWorkflow as the workflow to create your VM using SCCM.
2. Specify the desired compute, memory and storage values. Note that minimum storage will be based on the volumes that you add using the “New Volume” button. You must have at least one volume specified as the C: volume. Provide a maximum value for storage if you’d like to allow your users to specify more storage at request time.

Next you’ll define the properties for the VM by navigating to the “Properties” tab.


Build Profiles and Custom Properties

Note that I am leveraging both build profiles and custom properties.

1. A build profile is a group of properties that may be used across blueprints. vRA contains several build profiles out of the box. For example, there is a build profile that provides default properties to be used with SCCM.

2. The custom properties have scope only to the blueprint. I’ve several custom properties set. Some of the properties are required and others are optional based on your needs.

Required properties:
VMware.VirtualCenter.OperatingSystem: Sets VM hardware settings based on the type of OS being used. In this case I am creating a Server 2012 machine and the property is set to windows8Server64Guest

VMware.SCSI.Type: Required only for Server 2012 R2 machines and must be set to lsilogicsas when creating a Server 2012 R2 machine. By default vRA creates a VM with lsilogicparallel. Server 2012 R2 only provides drivers for lsilogicsas.

Optional Properties:
VirtualMachine.Admin.ThinProvision: Set to true to leverage thing provisioning and save on storage. If not specified, the VM is created as thick.

ExternalWFStubs.BuildingMachine: Sets the vRO workflow to be run when building the VM. In this case I am calling a vRO workflow that allocates an IP address from an IPAM system.

ExternalWFStubs.DisposingMachine: Sets the vRO workflow to be run when destroying the VM. In this case I am calling a vRO workflow that gives back the IP address requested from IPAM when building the VM.

To view the properties included with a build profile, select the “Build Profiles” button on the left hand side of the screen. The build profiles screen allows you to view existing build profiles and create new build profiles.


To create a new build profile, select “New Build Profile”. Provide a name for your build profile. You may either create a build profile on your own or leverage existing build profiles using the “Copy from existing build profile” option. When copying from an existing profile, you notice that vRA includes many useful build profiles right out of the box. vRA does provide a SCCM build profile and we will leverage the out of the box properties.


After selecting the existing SCCM build profile we simply set the values based on our environment. Note that if you want to allow users to alter settings at order time, simply set the property to “prompt user”.


Modify the SCCM Task Sequence to install the vRA guest agent

Prior to publishing your blueprint for consumption, you must add the vRA guest agent to the SCCM task sequence. The vRA guest agent gets installed by SCCM and then reports back to vRA that the task sequence is complete.

Download the vRA guest agent from the vRA server. The guest agent can be found on your vRA server at the following URL:


Unzip the vRA guest agent to a location on the SCCM server. Note the SCCMPackageDefinitionFile.sms file will serve as the definition file when we create the installation package.


Create an SCCM package for the vRA guest agent. Ensure that you are creating the package using the “Create Package from Definition” option. Use the browse button to select the SCCMPackageDefinitionFile.sms file.


Add the vRA guest agent package to the end of the task sequence using “install package”.


We’ve now created the SCCM blueprint and configured the SCCM task sequence to install the vRA guest agent. The blueprint can now be published and consumed by our users.

12 responses to “vRA provisioning with SCCM

  1. How do I set OSDComputername? The value you have above of ${Hostname} does not work for me.

    • There are at least 2 ways to set SCCM.CustomVariable.OSDComputerName.

      1. Use the Hostname custom property and set the property to prompt user for the hostname and order time. This means that the requestor picks the hostname not vRA. Using ${} allows you to reference any property defined in vRA blueprint. For example, ${Hostname}

      2. Set SCCM.CustomVariable.OSDComputerName using a vRO workflow. This means that vRA or an IPAM device is picking the hostname. In my lab I am using vRO extensibility to get the hostname from an IPAM device and then setting the SCCM.CustomVariable.OSDComputerName directly with vRO.

  2. I followed your instructions for creating the task sequence and I watch the package run but it will hangs and never completes. the smsts.log reports “waiting for job status notification”. Have you ever seen this before?

    • I have not seen that message. The SCCM package is actually executing the vRA guest agent. The vRA guest agent simply phones home to vRA which signals vRA that the SCCM task sequence is complete. It’s important to note that the .sms package does not actually install the guest agent.

      If you want the guest agent installed and running a service, then take the vRA guest agent zip file and use it in your SCCM task sequence. Have SCCM install the guest agent similar to the instructions for installing the vRA guest agent.


      • Thanks for the reply. How does the vRA Agent “phone home” to vRA as I don’t see connection credentials anywhere for it to do that. what i mean is, by using the sccm SMS method how does it know the address of the vRA iaas server?

        By using the method of installing the guest agent described you provide the iaas FQDN and it works. I am sure there is something missing for the SCCM SMS part to work. do I need to edit anything to provide the iaas FQDN in the SMS file?

        here are my findings to date



      • Look at the contents of the guest agent package, you’ll find the scripts that are used to configure the guest agent. The important scripts are GuestAgent.vbs, which SCCM calls, and the scripts beginning with doagent. For the SMS package there is a script called doagentsscm-template. The ‘template’ scripts have string tokens that get replaced by values during the install process. If you look at GuestAgent.vbs you see that it is taking the template script replacing it’s string tokens and then executing the resulting script. You’ll also notice there is a doagentsvc-template, this is a template script that the guest agent service uses when running winservice to install the guest agent service. Compare the svc-template to the sccm-template and you’ll see they are quite similar. The difference is that svc-template will loop until it gets work items from vRA. The scc-template will just talk back to the vRA server, letting vRA know that it is alive. You’ll also find the tokens used in the by the template scripts. #DcacHostname# is the token for the vRA server.

        Look in GuestAgent.vbs and you will see code that gets the vRA hostname using the Vrm.ProxyAgent.Uri property. Your SCCM instance should be aware of ‘Vrm.ProxyAgent.Uri’. It’s been a while, I believe vRA tells SCCM of the property. The code from GuestAgent.vbs is below.

        ‘ Get vcac URI from sccm and format for gugent:
        ‘ Vrm.ProxyAgent.Uri is in sccm environment
        ‘ strip off leading “https://”
        ‘ strip off trailing /vmps2
        ‘ add port number if it’s not already there
        Set env = CreateObject(“Microsoft.SMS.TSEnvironment”)
        strURI = env(“Vrm.ProxyAgent.Uri”)

  3. That is why it did not work for us then. We are not getting the hostname from IPAM but from vRA itself. What I am doing now is using the fact that the build profile precreates the computer object in SCCM with the correct hostname. So in my Task Sequence all I have to do it set the OSDComputerName to %_SMSTSMachineName%

  4. In the scenario where you’re calling out to an IPAM solution to get an IP (via vRO), does the VirtualSCCMProvisioningWorkflow run after the BuildingMachine workflow? I have experience with vCAC/vRA, and currently have vRO calling out to IPAM, but don’t have much (make that any) SCCM knowledge at this point. Trying to understand how the networking portion would work with SCCM in the mix. I would think that network connectivity would have to be there for the VM at the point where the SCCM configuration (or task sequence) is kicking off.

    • Yes, SCCM requires the VM to be on the network. SCCM doesn’t use VM Tools like vRO can, so SCCM can not attach to a VM disconnected from the network. The building machine workflow runs first, creating the virtual machine hardware and resulting NICs. Grabbing an IP from IPAM simply registers the IP to a NIC in vRA. vRA then boots the VM and passes the IP and corresponding NIC into SCCM as the SCCM provisioning workflow executes.

  5. Okay, I see. So the VirtualMachine.Network properties from vRA automatically get passed to SCCM (along with any other custom properties defined)? Do you have to configure a Task Sequence in SCCM so that it knows what to do with these values?

  6. Networking gets passed along with the SCCM properties.
    For any other custom properties that you wish to pass, pre-pend them with SCCM.CustomVariable. In the screenshots in the blog you can see I’m passing OSDcomputername to SCCM as a custom variable. I’ve included a link to the vRA docs for SCCM properties.


  7. Hello!

    Have one more question for you, since we’re testing vRA SCCMprovisioning now and almost have it working. We get to the end after all the other SCCM task sequence steps were successful, and the vRealize Agent script/installation gets stuck (we used the “Create a Software Package for SCCM Provisioning” VMware doc steps to set it up). Have you seen this happen before, or any idea what could cause this?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s