Home VM Migration How to Easily Convert VMDK to OVA for VMware Migration?

How to Easily Convert VMDK to OVA for VMware Migration?

2023-04-07 | Nick Zhao

Table of contents
  • Why convert VMDK to OVA?
  • How to convert VMDK to OVA via OVF Tool?
  • How to create VMware OVA template via PowerCLI?
  • How to easily backup and migrate VMware VM with Vinchin Backup & Recovery?
  • Conclusion

Are you looking for a robust backup and migration solution for VMware? Try Vinchin Backup & Recovery!

Virtual environment management is different from physical environment management. Flexibility is one of the advantages of virtual environment so the guest machine is often moved between different server for better performance.

VM conversion is often needed when you import VM to another platform. The common formats of VM templates are OVF and OVA. See how you can get the OVA or OVF file from VMware virtual machine in this post.

Why convert VMDK to OVA?

There are many virtualization solutions around the world, like VMware vSphere, Hyper-V, XenServer, Red Hat Virtualization, etc. They are using different hypervisors in their solutions and therefore, the structures are different from each other.

When you move VM to a homogeneous virtual environment, sometimes you can just directly use the VM virtual disk on another platform, but in most cases, VM can’t work on another platform without conversion.

Usually, the target platform can’t directly recognize the meta information and virtual disk from the source platform. Users need to convert VM information into readable files to let the target platform convert or directly accept them.

Data migration in physical environment can be achieved by cloning hard disk. Is it possible to do this in virtual environment?

Virtual machine has virtual hard disk, which works in the same way of physical hard disk. VMware virtual disk is a file in datastore and its format is VMDK. You can easily copy VMDK to another datastore and use it on another VM, as long as in VMware environment.

Sometimes VMDK file can be directly recognized by the target platform, like XenServer. You can use XenCenter to import VMDK file and create VM. Sometimes the target platform requires other formats of source files like OVA.

This requires you to export the entire VM from VMware including the meta information and virtual disks. VMware allows you to export VMware vSphere VM into two kinds of templates, OVF and OVA. OVF is a folder containing all the files and OVA looks like a zipped file.

Before vSphere 6.5, it is allowed to export OVF and OVA templates but now it is OVF template that is the only choice. If you need OVF template, you can get it from vCenter.

If you need OVA template now, how can you get it? The following sections will show you 2 approaches of exporting OVA template without vSphere vCenter.

How to convert VMDK to OVA via OVF Tool?

To be honest, it is hard to directly convert vmdk virtual disk to OVA package. It is suggested to directly generate an OVA template from the orginal VM or create a VM with the VMDK and then export the OVA package. You won't lose data in the virtual disk during the process.

OVF Tool is a command-line utility to import and export VMware VM. You can download it from the page of VMware. VM needs to be powered off before export starts.

1. Install OVF Tool and get the directory of it

2. Get the directory of the VM you would like to export

3. Open Command Prompt

4. Use CD command to open OVF Tool

5. Type the command below to export OVA package

ovftool -o

--powerOffSource

  --acceptAllEulas

  --machineOutput

  --X:logLevel=verbose

  --X:logFile=log.log  

  --noSSLVerify  

"vi://username:password@vcenter/datecenter /vm/vmName" /root/vmName.ova

How to create VMware OVA template via PowerCLI?

VMware PowerCLI is a command-line and scripting tool built on Windows PowerShell. You can also use it to export vApp. Also, you need to turn down the guest before exporting it.

1. Download and install VMware PowerCLI from VMware

2. Open PowerCLI and type the command below to export OVA

$myVApp = Get-VApp -Name "MyVApp1"

Export-VApp -vApp $myVApp -Destination "C:vappsmyVapp" -Format Ova

How to easily backup and migrate VMware VM with Vinchin Backup & Recovery?

After you get the OVA file, you can use it on another platform like Xen Orchestra. What if you want to have more destinations to choose for your own or clients' VMs? You can try Vinchin Backup & Recovery.

Vinchin Backup & Recovery

Vinchin Backup & Recovery is a professional and reliable backup and disaster and recovery solution which supports 11 mainstream virtualization solutions including VMware vSphere 8/7/6/5/4, Hyper-V, Citrix XenServer, Red Hat Virtualization, Oracle Linux KVM, etc. A user-friendly web console will help you easily backup and migrate VM. (Hyper-V migration is not supported for now)

To backup VM, just add the hosts to the backup system to add VMs agentlessly > select the wanted VM > select backup destination > select backup strategies like schedule, incremetal backup, data compression, etc. > comfirm the job

To migrate VM, just select the VM backup > select the restore destination (another host) > select the strategies > confirm the job

Vinchin Backup & Recovery will also help reduce RTO, Recovery Time Objective, with Instant Recovery technology, which will let you recover a failed VM of any size in 15 seconds.

Vinchin Backup & Recovery has been selected by thousands of companies and you can deploy this powerful system in your virtual environment with a 60-day full-featured free trial to see how convenient it is to perform cross-platform migration.

Conclusion

Sometimes only vmdk file is not enough to migrate VMware VM from one platform to another, so you need to convert VMDK and meta information into an OVA file. vSphere supports only OVF export now but you can still use OVF Tool and PowerCLI to export OVA.

Vinchin Backup & Recovery will help you migrate VM to more virtualization platforms. It just takes a few minutes to deploy it in your virtual environment. Don’t miss the free trial.

Share on:

Categories: VM Migration