Rapid Provisioning in SC VMM 2008 R2
This feature is again in response to customers and field requests. In VMM 2008, the only way to deploy a new VM is to copy the VHD from the library to the host over the network using BITS. Depending on the size of VHD and the available bandwidth, this could take several minutes or even hours. We heard from a lot of customers that they have sophisticated SAN technologies that enables them to clone a LUN which contains the VHD and present it to the host. But they still want to use VMM’s template so the OS customization and IC installation can be done. So they basically wanted new-VM without the network copy which is exactly what we did in R2. You can now create a template which includes the OS answer file and which references a dummy VHD which is not used. Then, using Powershell (we didn’t have enough time to add UI support, so this feature is cmdline only. The power users that would use this feature would most likely use scripting to mass deploy VMS anyway) you can do a new-VM and specify the path to the VHD using a new switch –UseLocalVirtualHardDisk. Here’s a sample script:
Get-VMMServer -ComputerName "VMMServer1.Contoso.com"
$JobGroupID = [Guid]::NewGuid().ToString()
$Template = Get-Template | where {$_.Name -eq MyTemplate"}
$VMHost = Get-VMHost | where {$_.Name -eq "VMHost.Contoso.com"}
Move-VirtualHardDisk -IDE -BUS 0 -LUN 0 -Path "L:\OS.VHD" -JobGroup $JobGroupID
New-VM -Name "VM06" -Path "L:\" -Template $Template -VMHost $VMHost -JobGroup -$JobGroupID -UseLocalVirtualHardDisks
END OF POST