Use this when provisioning VMware VMs automatically.
VM Provisioning · VMware Automation
VMware VM provisioning deploys VMs from templates with New-VM -Template, OS customization specs, CPU, memory, disk and network settings, via PowerCLI, Terraform or Ansible.
1. VM provisioning from templates with customisation specs or cloud-init.
2. Placement by cluster/resource pool/datastore cluster.
3. Tags.
4. Register in systems.
5. Idempotent IaC preferred.
template → clone → customise → power on → register
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Get-VM -Name <vm> | Select-Object Name,PowerState,VMHost,DatastorePrimary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Command read-back and what it shows Verify boundary
Get-VM -Name <vm> | Select-Object Name,PowerState,VMHost,Datastore is the bounded verification surface selected for VMware Automation → VM Provisioning. A known-good result is the expected VM object is uniquely tied to the request, task completes on the intended placement with expected hardware/network, guest customization reaches its success signal and the original access/health check passes. Treat missing/duplicate VM, failed/pending vCenter task, wrong placement/spec, customization failure or powered-on VM without expected network/guest/service readiness as broken/suspicious. Get-VM -Name <vm> shows vCenter inventory properties for matching VM objects, but it does not show guest customization, OS health, application readiness or uniqueness unless identity is checked.
Step 2 Observation-driven branch and next-check logic Narrow the fault
For a failing VMware Automation → VM Provisioning case, freeze scope first: target/object, desired revision or request, and failure time. Inspect Get-VM -Name <vm> | Select-Object Name,PowerState,VMHost,Datastore. Branch on evidence rather than labels: if no task/VM is created, inspect request identity/permissions/placement prerequisites; if task fails, inspect vCenter task error and target resource; if VM exists but customization/network/readiness fails, move to guest tools, IP/DNS and OS provisioning.
Step 3 Common mistakes Narrow the fault
- Customisation specs not applied.
- New-VM -Template deploys from templates.
- Customization specs set name and network.
- Choose host and datastore.
New-VM -Name <n> -Template <tpl> -VMHost <h> -Datastore <ds> -OSCustomizationSpec <spec>— PowerCLIgovc vm.clone -vm <tpl> -on=false <n>— govcterraform plan (vsphere_virtual_machine)— IaC
ReferenceWhy it matters1 section · depth on demand
Method
VMware VM provisioning automation follows a repeatable method from request to ready VM.
1. Validate the request: size, OS template, network, datastore cluster, owner.
2. Allocate IP and DNS name from IPAM.
3. Clone from the latest content library template with an OS customisation spec.
4. Apply tags (owner, backup policy, environment) and folder placement.
5. Power on, wait for VMware Tools and guest IP.
6. Hand over to configuration management and register in monitoring/backup.
7. Verify reachability and record the result.
resource "vsphere_virtual_machine" "web" {
name = "web03"
resource_pool_id = data.vsphere_compute_cluster.prod.resource_pool_id
datastore_id = data.vsphere_datastore.ssd.id
clone { template_uuid = data.vsphere_virtual_machine.tpl.id }
}
ReferenceHow it works1 section · depth on demand
How it works
In VMware Automation → VM Provisioning, effective state is split across vCenter inventory identity, target cluster/resource pool/datastore/network, VM template/spec and task state used to create the requested virtual machine. VMware provisioning submits a vCenter task that clones/deploys a VM from a template or specification and then applies compute, storage, network and guest customization settings before the VM is ready for consumers. VCenter permissions, datastore capacity, DRS/host compatibility, port groups, customization credentials and guest tools are separate things to check. This matters because a completed clone task does not show guest customization or application readiness, and a VM name existing can refer to an older/wrong object.
ReferenceImportant terms & boundaries1 section · depth on demand
Mechanics
VMware Automation → VM Provisioning is owned at runtime by vCenter/ESXi control plane invoked through vSphere APIs or PowerCLI.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in VMware Automation > VM Provisioning. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://developer.broadcom.com/powercli · confidence 94%