Connect with us

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

  1. 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.

  1. On the Select an OVF template page, choose the Local file option, then, click the UPLOAD FILES button.
On the Select an OVF template page, choose the Local file option, then, click the Browse button. On the Select an OVF template page, choose the Local file option, then, click the Browse button.
  1. 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.

  1. Back on the Select an OVF template page, the 5 files should selected. Click Next to continue.
Back on the Select an OVF template page, the 5 files should selected. Click Next to continue. Back on the Select an OVF template page, the 5 files should selected. Click Next to continue.
  1. 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.
  1. 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…

  1. Finally, review the settings and create the VM.
Finally, review the settings and create the VM. 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.

  1. 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)
  1. 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