3 Best Practices When Exporting Virtual Machines to OVF Format
One of the questions that we are constantly asked is "How do I migrate my existing machines to the cloud?" Several vendors have answered this question by developing software solutions to aid in this process, but they can be very costly and complicated to implement. Fortunately, there is a simple and free method that has been adopted by practically all virtualization platforms: OVF.
OVF stands for Open Virtualization Format. It is an open standard for packaging virtual machines regardless of platform or processor architecture. It also compresses the virtual machine disks file to make transport easier. Once a machine has been packaged as OVF, it can easily be transferred and imported to most virtual platforms, making migrating to the cloud much simpler.
A virtual machine that has been exported to OVF will contain at least the following two items:
- A descriptor file (.ovf), which contains virtual machine metadata such as hardware, network information, and references to media files.
- A disk image file for each virtual hard disk on the machine. This is usually in .vmdk (VMware) or .vhd (Hyper-V) format.
As a busy sysadmin, finding the time to package up and transfer a virtual machine can be difficult enough, so the last thing you want is for the import to fail. Below are some best practices to avoid the most common issues we see when exporting OVF files.
1) Check the Virtual Hardware Version
The virtual hardware version defines what underlying hardware features are available to the virtual machine. It is important to make sure that the hardware version of your machine is supported in the destination environment.
Virtual hardware can be upgraded in place, but it can't be reverted back. If you are in a situation where you need to roll back to an earlier hardware version, we recommend using VMware's vCenter Standalone Converter, a free and downloadable tool, to re-export the machine while specifying another hardware version.
2) Remove Snapshots
Snapshots are not included with an exported virtual machine, and can actually cause issues during the export process. For the best results, remove all snapshot data from the machine first. If you need to preserve a snapshot state, you should revert to that point before doing the export, or perform multiple exports at different snapshot points.
3) Disconnect All Removable Media
It's a good idea to disconnect and remove all references to media that's mounted on the virtual CD-ROM, floppy, and USB controllers. Most platforms will allow you to perform the export with the devices mounted, but the media will not be included with the OVF package. This can cause errors upon import since the missing media file is still referenced in the descriptor file.
Aside from the caveats listed above, it's important to accurately estimate how long the transfer and import process will take. Both the size of the exported virtual machine and the upload speed of your Internet connection will be the largest factors. It's also a good idea to add in some time for the initial export and decompression once it has been transferred.
Keep these best practices in mind and soon your existing machines will be happily living in the cloud!