Gadgets
How to Create a VM with an OVF Template in vCenter
[ad_1]
Read this guide to learn how to deploy an OVF template as a VM via the vCenter web client or with PowerShell.
Option 1: Deploy OVF Templates via vCenter Web Client
- Sign in to the vCenter web client. Then, right-click the location you want to create the VM and select Deploy OVF template.
In my example, I’ll create the VM in the host, ipmpvmw2.corp.itechguides.com.

- On the Select an OVF template page, choose the Local file option, then, click the UPLOAD FILES button.


- Navigate to the folder you saved the exported OVF files, select all the files (there should be 5 of them), and click Open.
You can select all the files by pressing Ctrl + A keys.


- Back on the Select an OVF template page, the 5 files should selected. Click Next to continue.


- On the Select a name and folder page, give the new VM a name – the default is the original VM’s name – select the vCenter location to save the VM and proceed to the next step.


- Select a location (Cluster or ESXi hots) to create the new VM.


In the remaining parts of the wizard, you will select a network for the VM, the datastore to save it, and…
- Finally, review the settings and create the VM.


Option 2: Deploy OVF Templates with PowerShell
Before you run the commands below, you must Install the VMWare PowerCLI Module PowerShell Module.
- Connect to the vCenter server by running this command. Change the name of the vCenter server and the login id to yours.
Connect-VIServer -Server ipmvcsa.corp.itechguides.com -Credential (Get-Credential corpadministrator)
- Once you succesfully connect to vCenter, run the following commands – I have included a comment explaining what each command does.
I included the Name parameter in the last command to allow me specify a different name for the VM. This is useful if the name of the VM you’re creating exists in vCenter.
#Get the ESXi host to create the VM
$vmHost = Get-VMHost -Name "ipmpvmw2.corp.itechguides.com"#Get the Datastore to create the VM
$Datastore = $vmHost | Get-Datastore -Name iSCSIDatastore#Create the VM from the OVF file
Import-vApp -Source "D:OVF Templatesy2k22template-1y2k22template-1.ovf" -VMHost $vmHost -Name y2k22template-2 -Datastore $Datastore
Conclusion
Exporting and importing OVF templates offers admins the opportunty to migrate VMs to non-connected sites. In this article, I explained how to import a VM to vCenter using OVF template files.
Let me know whether you used the vCenter web client or the PowerShell and why you prefer the method.
[ad_2]
Victor Ashiedu
Source link
