Creating BASE VMs with PowerCLI - absentee-neptune/SYS-480 GitHub Wiki

Create New Folders

  • In vSphere, create a new VM Folder called BASE-VMS
  • Then create a new VM Folder called SYS-480
    • Move all the system VMs into that folder

Creating Base-VM Clones

  • Go back into xubuntu-wan into the terminal PowerShell Command Line
  • Do the following to get the information needed into variables to create a linked clone for each VM that has a Base snapshot:
$basevm = Get-VM -Name "nameVM"
$snapshot = Get-Snapshot -VM $basevm -Name "Base"
$vmhost = Get-VMHost -Name super8.cyber.local
$dstore = Get-Datastore -Name "datastore2-super8"
$folder = Get-Folder -Name "BASE-VMS"
  • Then use the following command to initiate the process to create a linked clone:
$newvm = New-VM -Name "nameVM.linked" -VM $basevm -LinkedClone -ReferenceSnapshot $snapshot -VMHost $vmhost -DataStore $dstore -Location $folder
  • With each of the linked VMs, create a clone of each and put them in the BASE-VMS folder
  • With each of those clones:
    • Create a Base snapshot
    • Then delete the .linked VMs