Giter Site home page Giter Site logo

open-vmdk's Introduction

Open VMDK

Open VMDK is an assistant tool for creating Open Virtual Appliance (OVA). An OVA is a tar archive file with Open Virtualization Format (OVF) files inside, which is composed of an OVF descriptor with extension .ovf, a virtual machine disk image file with extension .vmdk, and a manifest file with extension .mf.

OVA requires stream optimized disk image file (.vmdk) so that it can be easily streamed over a network link. This tool can convert flat disk image or sparse disk image to stream optimized disk image, and then create OVA with the converted stream optimized disk image by using an OVF descriptor template.

Getting Started

Installation

Firstly, you need to download and extract open-vmdk-master.zip and extract it:

$ wget https://github.com/vmware/open-vmdk/archive/master.zip
$ unzip master.zip

Then, run below commands to build and install it:

$ cd open-vmdk-master
$ make
$ make install

Note: After installation, /usr/bin/vmdk-converter and /usr/bin/mkova.sh will be installed. If you hope to change default installation place, such as $HOME/bin/vmdk-converter, specify "PREFIX" while running make install:

$ PREFIX=$HOME make install

Thus, you will see the binary vmdk-converter and script mkova.sh under $HOME/bin/. In such case, make sure you have added $HOME/bin in your PATH environment variable.

Usage

Below example shows how to create an Open Virtual Appliance (OVA) from vSphere virtual machine. Presume the virtual machine's name is testvm, and virtual machine files include:

testvm-312d29db.hlog
testvm-flat.vmdk
testvm.nvram
testvm.vmdk
testvm.vmsd
testvm.vmx
vmware.log
  1. Copy testvm folder to TESTSVM_PATH on the machine where you have open-vmdk installed.
  2. Convert vmfs raw data extent file of the VM to OVF streaming format.
$ cd $TESTSVM_PATH
$ vmdk-converter testvm-flat.vmdk

After converting, a new vmdk file dst.vmdk will be created under $TESTSVM_PATH folder. Or, you can specify the new vmdk file name by running

$ vmdk-converter testvm-flat.vmdk disk1.vmdk

After converting, a new vmdk file disk1.vmdk will be created under $TESTSVM_PATH folder.

  1. Run mkova.sh to create OVA with specific hardware version.
$ mkova.sh ova_name path_to_ovf_template disk1.vmdk 

Where,

  • ova_name is your OVA name without .ova suffix.
  • dst.vmdk is the new vmdk file converted in step 2.
  • path_to_ovf_template is the path to .ovf template file. There are 8 .ovf templates files can be used.
    • ova/template.ovf is the template for BIOS VM with hardware version 7.
    • ova/template-hw10.ovf is the template for BIOS VM with hardware version 10.
    • ova/template-hw11-bios.ovf is the template for BIOS VM with hardware version 11.
    • ova/template-hw11-uefi.ovf is the template for UEFI VM with hardware version 11.
    • ova/template-hw13-bios.ovf is the template for BIOS VM with hardware version 13.
    • ova/template-hw13-uefi.ovf is the template for UEFI VM with hardware version 13.
    • ova/template-hw14-bios.ovf is the template for BIOS VM with hardware version 14.
    • ova/template-hw14-uefi.ovf is the template for UEFI VM with hardware version 14.

If you want to add more than 1 disk into the OVA, firstly convert all flat vmdk files, and add new converted vmdk files by following path_to_ovf_template. For example, below command creates an OVA with 3 disks

$ mkova.sh ova_name path_to_ovf_template disk1.vmdk disk2.vmdk disk3.vmdk

Here mutiple disks are only supported to be attached to one SCSI controller, and at most 15 disks can be added in one OVA.

By default, the OVA will be created with 2 cpus and 1024 MB memory. You can also use environment variable NUM_CPUS and MEM_SIZE to change the default number of cpu and memory size.

  1. After mkova.sh completes, you would be able to see the final OVA under $TESTSVM_PATH folder.

open-vmdk's People

Contributors

dananourie avatar keirazhang avatar oliverkurth avatar petr-vmware-com avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.