Ovf? Ova? VMDK? –file Formats and Tools for virtualization

Source: Internet
Author: User
Tags vmware fusion

I recently worked on a project to create a "virtual appliance" for one of our customers. They has an server application this they would like to distribute to their customers along with some new devices, and a V Irtual Appliance is a good a-to-do, in a reliable fashion.

Virtual appliances may or may not be full-blown operating systems supporting the applications, but the key thing are that They is able to run directly on a hypervisor (VMWare ESX, XenServer, Hyper-V, etc.). Heard that GitHub had a product called "GitHub Enterprise" that allows a business to deploy their own copy of The GitHub platform within their network; GitHub Enterprise is distributed as virtual appliance.

One of the problems we needed to solve for our customer is how to package and distribute the appliance. We quickly determined that a OVF or "Open virtualization Format"-based approach had the potential to give us the greatest Portability, and I set to work figuring off how to implement it. Our build process made use of Veewee, Vagrant, and Chef. We knew we could export some kind appliance.box of the package compatible with VirtualBox from Vagrant, what if this related to OVF WA SN ' t clear.

I ' d like to share a few of the things I learned. This isn't by any means a comprehensive guide or list to the vast world of virtualization technology, but hopefully it ca n Save someone else some time in making sense of this portion of the virtualization ecosystem.

File Formats for Virtual machinesopen virtualization Format (OVF)

The OVF specification provides a means of describing the properties of the virtual system. It is XML based and have generous allowances for extensibility (with corresponding tradeoffs in actual portability). Most of commonly, an OVF file was used to describe a single virtual machine or virtual appliance. It can contain information about the format of a virtual disk image file as well as a description of the virtual hardware That should is emulated to run the OS or application contained on such a disk image.

Open Virtual Appliance (OVA)

An OVA is a OVF file packaged together with all of its supporting files (disk images, etc). You can read about the requirements-a valid OVA package in the OVF specification. Oftentimes people would say "an OVF" and really mean "an OVA."

Vagrant. Box (for Vagrant >=1.1.0)

For recent versions of Vagrant, a Vagrant "box" was a tarball containing a, metadata.json specifies a provider and any other FIL Es that the specific provider requires.

Vagrant VirtualBox. Box
For example, Vagrant boxes for the default VirtualBox provider would contain ( metadata.json in addition to), the contents of an exp ORT from VirtualBox and a vagrantfile with some default settings for the box. For example:

1234567
    .    ├──vagrantfile    ├──box-disk1.vmdk    ├──box.ovf    └──metadata.json    0 directories, 4 files

(Note that all of these files is in the top level of the archive. There is no containing directory.) This makes Vagrant *.box packages for the VirtualBox provider quite similar to a OVA, though certain things like File-ord Er inside the tarball is not a strictly adhered to.

Vagrant VMWare Fusion. Box
Vagrant boxes for the new VMWare Fusion provider is quite similar to those for the VirtualBox provider, except that Inste Ad of containing the output of a VirtualBox export, they include the contents of a VMWare Fusion Virtual machine Directory .

Vagrant AWS. Box
Vagrant boxes for the AWS provider contain no disk images (the base disk images for the AWS provider is AMIs hosted in Am Azon ' s cloud). Optionally, the AWS provider allows for additional provider-specific settings in the Metadata.json file (e.g. what AMIS to Use).

Older Vagrant Boxes
Vagrant boxes for older versions of Vagrant only support one provider, VirtualBox. They also lack the metadata.json file included in new versions.

Formats for Disk Images

Another piece of the packaging puzzle is disk image formats. There is many. Each have its own benefits and detriments, but I'm not going to get into those here. Again, this was nowhere near a comprehensive list-just something to help with getting your bearings. I ' d like to comment in a couple of the formats that I ' ve recently encountered.

    • VDI  –virtualbox ' s internal default disk image format is VDI. Nevertheless, this is  not  what was used by Vagrant boxes.
    • VMDK  –one of the most common formats. The VMWare ' s products use various versions and variations of the VMDK disk images. Several versions and variations exist, so it's very important to understand which one "re working with and where it can be used.
    • VHD  –commonly used by Microsoft (e.g. for Microsoft Virtual PC).
    • Raw (. img,. Raw, etc.)  –without compression or thin provisioning, disk images can is very large, but sometimes converting to raw disk imag ES might make sense as a intermediate step or in certain scenarios for better performance at the cost of space.

The important thing to find off is which disk image formats your target hypervisor supports. We ' ve found a version of the VMDK to being fairly well supported. A copy of the VMDK specification can requested from VMWare.

Conversion Tools
    • qemu-img – part of the QEMU project, Qemu-img is the Holy Grail, Swiss Army Knife of disk image conversion. If you need to convert a disk image, check here first.
    • Ovftool –distributed with some VMware products (in VMware Fusion, it's buried inside the. App bundle), Ovftool C An convert between some VMWare VM formats and OVF.
    • vboxmanage –virtualbox ' s command line interface, vboxmanagehas some options for exporting and converting VMs and Virtual hard disks The also be useful.
Other considerationshost/guest support for Virtual Hardware

One important consideration that's not often discussed are the issue of virtual hardware support. It ' s obviously important that both the hypervisor and the guest OS is able to provide and make use of virtual hardware de Vices like disk controllers and network cards. Because we had control over the guest OS and the OVF VMS description, we tried to use a very small set of generic devices. Other projects might has more constraints. Libosinfo.org is a project working to build a machine-readable database of some of this information.

Kernel Hypervisor Support

Not every compiled Linux kernel would work with every hypervisor. This is a issue particularly if you ' re trying to set up something like AMIs for use with Amazon Web Services. I Haven ' t made use of the it yet myself, but there was a project working to build a kernel with broad hypervisor support. If This is something you need, check out the VMI Linux.

Guest Additions

Guest Additions is typically kernel extensions that provide extra services like convenient GKFX folders between host an D Guest. We opted not to install any on our appliance by default. If we had decided to include guest additions, I would has considered using the open Sourceopen Virtual machine Tools Prov IDed by VMWare.

VM Building Toolsvmware Studio

VMware ' s solution for building Virtual appliances are VMware Studio. It wasn ' t a good fit for my project, but it's worth considering, particularly if you're targetting the VMWare platform a nd looking for an all-in-one solution.

Veewee

We used the open source Veewee Ruby gem from Patrick Debois to automate the initial installation of our appliance ' s Operat ing system and create a base VM.

Vagrant

Vagrant does not currently has any, the initial creation of VMs (e.g. from an installer ISO and configuration file) like Veewee does, but wouldn ' t is surprised if something like Veewee ends up being incorporated as a feature of VAGR Ant itself in the future. Vagrant does, however, make it very easy-to-spin up and destroy VMs created from a base. This made it a good tool for the intermediate stages of our build process.

Oz

Oz is a python-based utility for creating virtual machine images from ISOs by automating the installation process. I found on Oz too late to consider it for this project, but it seems to has similar goals to something like Veewee , though with closer ties to the Enterprise Linux ecosystem than the Ruby ecosystem. One interesting aspect of Oz is the TDL templating language it uses to build images. It fills a similar role to Veewee definitions, but had a detailed spec of its own.

Online VM Builders

Imagefactory/the Aeolus Project
The imagefactory is an online image builder for a variety of virtualzation and cloud platforms (including Amazon AMIs, WHI Ch I did not even touch in here). Imagefactory uses Oz to build the images.

The aeoluous Project very recently announced that they would is disbanding to contribute their efforts to other projects, But their imagefactory would continue to operate.

Project Raindrops
Project Raindrops is very new project from Karanbir Singh and Jaime Melis, looking to provide a service similar to Imagefa Ctory. It currently have good support for building CentOS images. Eventually the build tools for this would also be open-sourced.

Conclusion

Hopefully this information provides a helpful jumping off point. The landscape building Virtual machines/virtual Appliances/cloud Images) is very rapidly changing, and N EW options is popping up every day. I ' d be very interested in hearing about more open source projects in this space.

Ovf? Ova? VMDK? –file Formats and Tools for virtualization

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.