SCVMM template preparation
Prepare a Linux or Windows VM template, and the surrounding SCVMM fabric, so that Cloud Management Platform (CMP) can provision from it
14 minute read
CMP discovers templates, networks, and existing VMs on your Hyper-V hosts and clusters, deploys new Windows and Linux VMs, manages disks and checkpoints, and controls VMs through their full lifecycle. It reaches the SCVMM management server over WinRM (PowerShell remoting) and installs no agent, so WinRM only has to be reachable and correctly authenticated.
Confirm the following before you add an SCVMM resource handler.
CMP supports three WinRM authentication transports. Choose one and complete its setup before you connect.
| Transport | Protocols | Setup required | Notes |
|---|---|---|---|
| NTLM | HTTP or HTTPS | None | The default. Works with domain or local accounts, and is the quickest route to a working connection. |
| CredSSP | HTTPS only | Enable CredSSP on the SCVMM server | Single-hop only. Credentials are not delegated onward to Hyper-V hosts. |
| Kerberos | HTTP or HTTPS | Kerberos configuration on the CMP appliance | The most secure option. IP address must be the SCVMM server’s fully qualified domain name, not a bare IP address. |
NTLM needs no additional setup. Select NTLM as the transport.
CredSSP requires HTTPS. CMP rejects CredSSP over HTTP when you save the connection.
On the SCVMM management server, enable the CredSSP server role:
Enable-WSManCredSSP -Role Server
In CMP, set WinRM Protocol to HTTPS and WinRM Transport to CredSSP.
Kerberos requires configuration on the CMP appliance.
Add a [realms] entry to the Kerberos client configuration file, krb5.conf, giving the realm name, kdc, and admin_server. Replace every instance of domain.com, DOMAIN.COM, and dc01 with your own values:
[libdefaults]
default_realm = DOMAIN.COM
dns_lookup_realm = false
dns_lookup_kdc = true
rdns = false
forwardable = true
[realms]
DOMAIN.COM = {
kdc = dc01.domain.com
admin_server = dc01.domain.com
}
[domain_realm]
.domain.com = DOMAIN.COM
domain.com = DOMAIN.COM
Obtain a ticket with kinit and confirm it with klist:
kinit username@DOMAIN.COM
klist
In CMP, enter the SCVMM server’s fully qualified domain name in the IP address field. Kerberos validates against the server’s SPN, so a bare IP address is rejected. You may also need to enter the account with the domain in capitals, for example username@DOMAIN.COM, to match the realm in krb5.conf.
CMP writes a per-VM cloud-init seed ISO to the SCVMM library share when it provisions a Linux VM, then deletes it afterward. Create the folder once and grant the service account rights on it.
Create CloudBolt\seeds under the SCVMM library share. CMP does not create the folder. The library share’s path is a UNC path, so set the NTFS permissions on the underlying local folder on the library server.
On the VMM server, get the share’s UNC path and the server hosting it:
Get-SCLibraryShare | Select-Object Name, Path, @{n='LibraryServer';e={$_.LibraryServer.Name}}
On that library server, resolve the UNC share to its local disk path:
Get-SmbShare -Name 'MSSCVMMLibrary' | Select-Object Name, Path
Create the subfolder if it does not already exist:
New-Item -ItemType Directory -Path '<Path From Get-SmbShare>\CloudBolt\seeds'
Grant the SCVMM run-as account rights on that subfolder only, not on the rest of the library. Grant Modify on the CloudBolt\seeds folder, with inheritance to child items.
$folder = '<Path From Get-SmbShare>\CloudBolt\seeds'
$account = 'LAB\svc-cloudbolt'
$acl = Get-Acl $folder
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule(
$account, 'Modify',
'ContainerInherit,ObjectInherit', 'None', 'Allow')
$acl.AddAccessRule($rule)
Set-Acl $folder $acl
If the path resolves to a UNC path rather than a local path on the VMM or library server, also grant share-level Change:
Grant-SmbShareAccess -Name 'MSSCVMMLibrary' -AccountName $account -AccessRight Change -Force
The Windows domain service account the resource handler connects with needs:
CloudBolt\seeds folder in the library share.After the handler is created, the Import clusters field becomes read-only. Manage clusters from the handler’s Clusters tab instead.
| Field | Description |
|---|---|
| IP address | IP address or fully qualified domain name of the SCVMM management server. Kerberos requires the domain name. |
| Account username | Windows domain account, in username@domain.com form. For Kerberos, you may need to match the case of your realm, for example username@DOMAIN.COM. |
| Password | The account’s password. If the password vault feature is enabled, this field offers Locally Stored or Vault Managed. Select Vault Managed to read the secret from a configured vault provider. See Use password vaults. |
| WinRM Protocol | HTTPS (port 5986, recommended) or HTTP (port 5985). The port follows the protocol and is not separately editable. |
| WinRM Transport | NTLM, CredSSP, or Kerberos. See Choosing a WinRM transport. |
| SSL Verification | When enabled, CMP validates the SCVMM server’s TLS certificate. Applies to HTTPS only. |
HTTP or HTTPS: the WinRM Protocol setting controls both the encryption and the port.
CMP discovers SCVMM VM templates from the library and lists them as deployment sources. Each template reports its name and OS family (Windows or Linux), and CMP customizes the deployed VM accordingly.
CMP confirms a new VM’s hostname and IP address via Hyper-V KVP, part of Integration Services, and applies them via guest customization: cloud-init on Linux, and Sysprep with unattend.xml on Windows. Both mechanisms have to be prepared on the template.
Full build requirements for Windows and Linux templates are in SCVMM template preparation.
CMP automatically discovers SCVMM networks: VM networks on SCVMM 2022 and newer (SDN-aware) and virtual networks on earlier versions. At deploy time, it binds the VM’s network adapter to the selected VM network.
The CMP network you select overrides the template, and its addressing scheme decides how the adapter is configured:
When a VM is deployed with a static address, CMP chooses the address, not SCVMM. The value is resolved from the CMP network in this order:
CMP then writes that address into SCVMM: onto the network adapter for Windows, and into the cloud-init seed network configuration for Linux.
For Windows static addresses, CMP also resolves the SCVMM network objects so the adapter binds to the correct subnet and SCVMM records the allocation against the right network. It walks one of two supported topologies:
This walk does not select the IP address. It confirms that the subnet and pool exist and gives the adapter its binding context. On Windows, the SCVMM static IP address pool is also where the gateway, netmask, and DNS in the generated unattend.xml come from; the address itself comes from CMP. CMP takes the first match at each step rather than selecting a pool by name, so make the intended subnet and pool the first ones associated with the network.
Link-local APIPA addresses in 169.254.0.0/16 are ignored and treated as no address assigned.
Customization is applied per OS family after the VM is created.
| Setting | Linux | Windows (static IP) | Windows (DHCP) |
|---|---|---|---|
| Hostname | cloud-init seed | Set on the VM at creation | set on the VM at creation |
| Static IP | seed ISO network configuration | Applied to the live adapter | Not applicable |
| Netmask, gateway, DNS | seed network configuration, from the CMP network | The SCVMM static IP pool definition | Not applicable |
| Sysprep and unattend.xml | Not applicable | Generated by SCVMM from the pool and the IP address | SCVMM default |
| Custom user data | scvmm_user_data, through the cloud-init seed |
Not supported | Not applicable |
CMP writes tags to SCVMM as VM custom properties during provisioning. Any CMP taggable attribute mapped to the SCVMM resource handler is written to the VM, and CMP creates the custom property in SCVMM if it does not already exist. Attributes with more than one value are written as a comma-separated string.
Every SCVMM VM lands on cluster-connected shared storage, either a Cluster Shared Volume mount point or an SMB3 file share. Two environment parameters choose that storage:
| Parameter | Method |
|---|---|
scvmm_vm_mount_point |
Explicit. You choose a specific Cluster Shared Volume or SMB3 share. |
scvmm_storage_classification |
Automatic. You choose an SCVMM storage classification, such as Gold, Silver, or Bronze, and CMP places the VM on the volume within that classification that has the most free space. |
Both parameters are marked required, but set only one of them per environment. If both are set, the explicit mount point wins, and the classification is ignored.
Use Import parameters from resource handler on the environment to populate the list of valid mount points and classifications discovered from SCVMM.
scvmm_volume_min_freespace sets a minimum free-space floor that gates volume selection. Give it a percentage, such as 10%, or a fixed size, such as 50 GB, 250mb, or 1 TB. It applies to an explicit mount point and to a classification-selected volume alike, and a volume that fails the floor is a hard error. Free space is measured at provision time and does not account for the size of the VM being placed. Leave it unset to disable the check.
The SCVMM resource handler reads a set of CMP parameters prefixed with scvmm_ that control where and how VMs are provisioned. CMP creates these parameters when you add the handler, so you only set their values, usually as environment parameters (Admin > Environments > your SCVMM environment > Parameters) or on a blueprint or order form.
| Parameter | Required | Applies to | Function |
|---|---|---|---|
scvmm_host_cluster |
Yes | Linux and Windows | The SCVMM host cluster the VM deploys to. Set it per environment. |
scvmm_vm_mount_point |
Yes* | Linux and Windows | Explicit Cluster Shared Volume mount point or SMB3 share for VM placement. Takes precedence over scvmm_storage_classification. |
scvmm_storage_classification |
Yes* | Linux and Windows | SCVMM storage classification for automatic placement. CMP chooses the volume in that classification with the most free space. Ignored when scvmm_vm_mount_point is set. |
scvmm_volume_min_freespace |
No | Linux and Windows | Minimum free space required on the selected volume. Can be set on a server, on an environment, or as a global default. |
scvmm_library_share |
No | Linux only | Name of the SCVMM library share used to stage the cloud-init seed ISO. Defaults to MSSCVMMLibrary. Set it per environment when you run more than one SCVMM library. |
scvmm_user_data |
No | Linux only | cloud-init user data added to new Linux VMs through the NoCloud seed ISO. Ignored on Windows, with a warning in the job log. |
* Set only one of scvmm_vm_mount_point and scvmm_storage_classification per environment. See Storage placement.
scvmm_host_cluster: the target cluster for the environment. Required for every deployment.scvmm_vm_mount_point: explicit placement. Choose the Cluster Shared Volume mount point or SMB3 share where new VMs land. Use Import parameters from resource handler to populate the choices.scvmm_storage_classification: automatic placement. Choose a storage classification, and CMP places the VM on the volume with the most free space in that classification.scvmm_volume_min_freespace: optional guardrail. See Free-space guardrail.scvmm_library_share: optional, Linux only. Override it only when your seed ISOs must come from a library share other than MSSCVMMLibrary, which is typical in multi-library or multi-cluster setups. The service account needs write and delete rights on the CloudBolt\seeds folder in that share.scvmm_user_data: optional, Linux only. Enter cloud-init YAML to run on first boot. The value is rendered through CMP’s template engine with the server object in context, so you can reference fields such as {{ server.hostname }}. Wrap literal cloud-init or Jinja syntax that CMP should not render in {% verbatim %}…{% endverbatim %} tags. Setting it on a Windows server has no effect.These parameters exist in every install and are not specific to SCVMM, but the handler reads them:
sc_nic_0: the VM network for the primary NIC.sc_nic_0_ip: the static address for the primary NIC. The literal value dhcp forces DHCP. It may be filled by an IPAM integration, a CMP static IP pool, or the requestor.sc_nic_0_netmask and sc_nic_0_gateway: read from the NIC or its network for Linux customization. For a Windows static address, netmask, gateway, and DNS come from the SCVMM pool’s subnet definition instead.hostname: the guest hostname. On Windows, it must be 15 characters or fewer.vm_customization_timeout: how many seconds to wait for the guest OS to report ready after boot.dns_domain and domain_name_server: the DNS suffix and servers, for Linux customization.CMP manages virtual disks as dynamic VHDX files on the SCSI bus.
The disk storage path is set automatically and cannot be configured by the user. A data disk added as a day-2 action is placed alongside the VM, in the VM’s own folder, so it follows the storage location chosen at provision time by scvmm_vm_mount_point or scvmm_storage_classification. CMP names the file <hostname>-disk<N>.vhdx.
CMP can create, restore, and delete SCVMM checkpoints.
scvmm_vm_mount_point or scvmm_storage_classification per environment. If both are set, the explicit mount point wins.Prepare a Linux or Windows VM template, and the surrounding SCVMM fabric, so that Cloud Management Platform (CMP) can provision from it