Skip to content

morbidsteve/OVATool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OVATool

Build Status License: MIT Rust

A fast, multithreaded Rust tool for exporting VMware Workstation VMs to OVA format. OVATool is designed as a high-performance replacement for VMware's OVFTool, delivering significantly faster export times through parallel compression and efficient I/O handling.

Overview

VMware's OVFTool is notoriously slow when exporting large VMs, often leaving CPU, disk I/O, and RAM severely underutilized. OVATool solves this problem by:

  • Parallel compression - Uses a rayon thread pool to compress multiple chunks simultaneously, fully utilizing all available CPU cores
  • Memory-mapped I/O - Efficiently reads large VMDK files without excessive memory allocation
  • Pipelined architecture - Overlaps reading, compression, and writing operations for maximum throughput
  • StreamOptimized VMDK output - Produces VMware-compatible compressed disk images

For a typical 8-core machine, OVATool achieves 4-5x faster exports compared to OVFTool.

Features

  • Parallel Compression - Rayon thread pool distributes compression work across all CPU cores
  • Memory-Mapped I/O - Efficiently handles VMs up to 500GB+ without excessive memory usage
  • StreamOptimized VMDK Output - VMware-compatible compressed disk format
  • Progress Tracking - Real-time progress bar with ETA and throughput statistics
  • Three Compression Levels - Choose between fast, balanced, or maximum compression
  • SHA256 Manifest - Generates integrity checksums for all exported files
  • Clean Error Handling - Clear error messages with actionable suggestions

Installation

From Source

Requires Rust 1.70 or later.

# Clone the repository
git clone https://github.com/username/ovatool.git
cd ovatool

# Build in release mode (optimized)
cargo build --release

# The binary will be at:
# target/release/ovatool

Add to PATH (Optional)

# Linux/macOS
cp target/release/ovatool ~/.local/bin/

# Or add to system path
sudo cp target/release/ovatool /usr/local/bin/

Usage

Basic Export

# Export a VM to OVA (output filename derived from VM name)
ovatool export MyVM.vmx

# Specify output path explicitly
ovatool export MyVM.vmx -o /path/to/MyVM.ova

With Options

# Fast compression (faster export, larger file)
ovatool export MyVM.vmx -o MyVM.ova --compression fast

# Maximum compression (slower export, smaller file)
ovatool export MyVM.vmx -o MyVM.ova --compression max

# Use specific number of threads
ovatool export MyVM.vmx -o MyVM.ova --threads 4

# Quiet mode (suppress progress output)
ovatool export MyVM.vmx -o MyVM.ova --quiet

View VM Information

# Display VM details without exporting
ovatool info MyVM.vmx

Output:

VM Information
==============

Name:      My Virtual Machine
Guest OS:  ubuntu-64
CPUs:      4
Memory:    8192 MB

Disks:
  1. disk.vmdk - 107.37 GB (monolithicFlat)

Total disk size: 107.37 GB

CLI Reference

Commands

Command Description
export <vmx-file> Export a VMware VM to OVA format
info <vmx-file> Display information about a VM

Export Options

Flag Description Default
-o, --output <path> Output OVA file path <vm-name>.ova
-c, --compression <level> Compression level: fast, balanced, max balanced
-t, --threads <count> Number of worker threads (0 = auto-detect) 0 (num_cpus)
--chunk-size <mb> Processing chunk size in megabytes 64
-q, --quiet Suppress progress output false

Compression Levels

Level zlib Level Description
fast 1 Fastest export, larger output file
balanced 6 Good balance of speed and compression (recommended)
max 9 Smallest output file, slower export

Performance

OVATool achieves significant speedups over VMware OVFTool through parallel compression:

CPU Cores Expected Speedup
4 cores ~3x faster
8 cores ~4-5x faster
16 cores ~6-7x faster

Benchmark Example

Exporting a 100GB VM on an 8-core system:

  • OVFTool: ~45 minutes
  • OVATool: ~10 minutes

Actual performance varies based on disk speed, compression level, and VM content.

Compatibility

Input Formats

  • VMware Workstation Pro VMs (.vmx files)
  • Monolithic VMDK disks (flat or preallocated)

Output Format

  • OVA archives compatible with:
    • VMware Workstation Pro/Player
    • VMware ESXi
    • VMware vSphere/vCenter
    • Other OVF-compatible hypervisors

Limitations

  • Split VMDKs are not currently supported
  • Linked clones require the full chain to be present
  • Running VMs may produce inconsistent exports

Requirements

Build Requirements

  • Rust 1.70 or later
  • Cargo (included with Rust)

Supported Platforms

Platform Status
Linux (x86_64) Supported
macOS (x86_64) Supported
macOS (ARM64) Supported
Windows (x86_64) Supported

Project Structure

ovatool/
├── Cargo.toml              # Workspace configuration
├── crates/
│   ├── ovatool-core/       # Core library
│   │   └── src/
│   │       ├── lib.rs      # Public API
│   │       ├── vmx.rs      # VMX parser
│   │       ├── vmdk/       # VMDK handling
│   │       ├── ovf.rs      # OVF XML generation
│   │       ├── ova.rs      # TAR archive writer
│   │       ├── pipeline.rs # Parallel processing
│   │       └── export.rs   # Export orchestration
│   │
│   └── ovatool-cli/        # Command-line interface
│       └── src/
│           └── main.rs
│
└── docs/
    └── plans/              # Design documents

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository and create a feature branch
  2. Write tests for new functionality
  3. Run the test suite before submitting: cargo test
  4. Format your code: cargo fmt
  5. Check for issues: cargo clippy
  6. Submit a pull request with a clear description of changes

Development Setup

# Clone your fork
git clone https://github.com/your-username/ovatool.git
cd ovatool

# Build and test
cargo build
cargo test

# Run with debug output
RUST_LOG=debug cargo run -- export test.vmx -o test.ova

Acknowledgments

  • VMware for the VMDK and OVF specifications
  • The Rust community for excellent crates:

About

Fast, multithreaded Rust tool for exporting VMware VMs to OVA format - 4-5x faster than OVFTool

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages