Skip to content

qba73/vbox2vm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ovf2vm

ovf2vm is a tool for updating parameters in the ovf (xml) file generated by Packer (VirtualBox builder) and making the ovf fileimportable by to vSphere (VMware).

Build and install ovf python package

Clone the repository:

$ git clone [email protected]:qba73/vbox2vm.git

Create and activate virtualenv:

$ virtualenv -p python3 --system-site-packages venv
$ source venv/bin/activate

Install pytest:

$ pip install pytest

Run tests:

$ make test

Install ovf package for development:

$ make devinstall

Create python ovf package:

$ make sdist

The ovf distribution package is created in the dist directory.

Install ovf python package:

$ pip install dist/<package name>

Example

$ make sdist

$ ls -lt dist/
total 12
-rw-rw-r-- 1 jakub jakub 5090 Nov 23 10:52 ovf-0.1.1-py3-none-any.whl
-rw-rw-r-- 1 jakub jakub 3496 Nov 23 10:52 ovf-0.1.1.tar.gz

$ pip install dist/ovf-0.1.1-py3-none-any.whl

Usage

Get help

$ ovf --help
Usage: ovf [OPTIONS] OVFIN OVFOUT

Options:
  --oss_id INTEGER            VMware code for RedHat family. Default: 107
  --oss_description TEXT
  --oss_type TEXT             VMware code for RedHat 64bit family. Default:
                              'rhel7_64Guest'
  --virtual_system_type TEXT  VMware virtual system type. Default: vmx-10
  --help                      Show this message and exit.

Update params - virtsystype and os

$ ovf centos.ovf centos-vmware.ovf --virtual_system_type=vmx-10 --oss_id=107
Reading ovf file
Saved updated ovf file.

Update params - use default values

$ ovf centos7-packer-template.ovf centos7-out.ovf
Reading ovf file
Generating OVF vSphere file with params:
oss_id: 107, oss_description: CentOS 4/5/6/7 (64-bit), oss_type: rhel7_64Guest, virtual_system_type: vmx-10
Saved updated ovf file: centos7-out.ovf

About

Utility for manipulating ovf files (VirtualBox, VMware).

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published