Building Microsoft System Center Cloud – SCVMM 2012 R2 – Templates – New VM from the VM Template

In the previous article we created template that is assembled from the VHDX and profiles and now we will use it to create new virtual machine.

Create VM from the existing template

  • Create Virtual Machine
  • Choose VM Template and you will not have to apply any profiles because the template already contains the configuration that may be correct for you.
  • Or choose VHDX of the template and will you have to apply the profiles.
  • We will use an existing VM Template that we created in the previous article.
  • Name the new VM and leave the generation without change.
      • conttestvm0
      • Generation 2
  • Choose existing Hardware Profile or use existing configuration that is defined in the template.
  • In the Configure Hardware step you are able to choose to assign a static IP address from the existing IP Pool.
    • It is not possible to assign IP from the IP Pool when you create VM for example from the virtual disk. You have to deploy VM from the VM Template.
    • Example of the VM from the VM Template with assigned static IP address from the IP Pool.
    • It is not possible to assign a IP address later for already existing VMs even when these VMs was deployed from the VM Template.
    • Example of the VM from the VM Template. Static IP address was not chosen.
  • Select host or in our case the cluster node.

Create virtual machine from the VM Template using PowerShell

You can very easily create VM from the template using PowerShell.

$template = Get-SCVMTemplate -Name 'ws2012r2u1'
$virtualMachineConfiguration = New-SCVMConfiguration -VMTemplate $template
$cloud = Get-SCCloud -Name 'Contoso'
New-SCVirtualMachine -Name 'conttestvm6' -VMConfiguration $virtualMachineConfiguration -Cloud $cloud -ReturnImmediately

Leave a Reply

Your email address will not be published. Required fields are marked *

Active Directory Advanced function AlwaysOn Availability Groups AlwaysOn Failover Cluster Instances Building Cloud Cloud Cluster Cmdlet Database Deployment Design DFS Domain Controller DSC Fabric Failover Clustering File Server Group Policy Hardware Profile Host Hyper-V Installation Library Library Asset Library Server Network Operations Manager Orchestrator PowerShell PowerShell User Group PowerShell Workflow Security Service Manager SQL Server Storage System Center Template Time Time Synchronization Tips Virtual Machine Virtual Machine Manager VM Network VM Template Windows Server 2012 R2