Please create a snapshot of the source VM that the linked clone will be deployed from. Make note of the snapshot name, it will be needed.
Connect to vCenter through Powershell
- Connect-VIServer “vCenter FQDN or IP”
- Login with an account that has the appropriate role to create VMs
- $mySourceVM = Get-VM -Name MySourceVM1
- Provide the name of the source VM that will be used for the linked-clone VM
- $myReferenceSnapshot = Get-Snapshot -VM $mySourceVM -Name "SNAPSHOTNAME”
- enter the name of the snapshot that was created for the source VM
- $vmhost = Get-VMHost -Name ESXiHOSTNAME
- Name of the ESXi host you want the linked-clone to be registered to
- $myDatastore = Get-Datastore -Name DatastoreName
- Name of the location you want the linked-clone to be stored at.
- New-VM -Name MyLinkedCloneVM1 -VM $mySourceVM -LinkedClone -ReferenceSnapshot $myReferenceSnapshot -ResourcePool $vmhost -Datastore $myDatastore
- The command will deploy the linked-clone VM using the information provided in Steps 2-5