You can deploy a virtual machine from a content library template.

Note

VMware PowerCLI 6.5.3 cannot distinguish between OVF content library items of type virtual machine template and vApp template. As a result, New-VM creates a vApp if you specify a vApp template from the content library by using the ContentLibraryItem parameter of the cmdlet. If this happens, New-VM returns an error, notifying that the cmdlet produced an inventory item of the wrong type. You should avoid creating vApps by using the New-VM cmdlet, as this behavior will be deprecated in future releases.

Verify that you are connected to a vCenter Server system version 6.0 or later.

Verify that you have a content library with virtual machine templates available.

1

Get the virtual machine host.

$myVMHost = Get-VMHost myVMHost
2

Create the MyVM virtual machine from the MyVMContentLibrayItemName content library item.

Get-ContentLibraryItemName MyVMContentLibrayItemName | New-VMName MyVM –VMHost $myVMHost