Archive

Archive for April, 2016

Packaging VMware VDDK 6.0.x RPM for CloudForms

April 27th, 2016 No comments

Overview

Here’s a SPEC file I came up with to package the VMware VDDK as an RPM for CloudForms/ManageIQ appliances. VDDK 5.x came with an install script, but 6.x does not. It’s probably better packaged as an RPM anyway. This is based off of the instructions available at https://access.redhat.com/articles/2078103 (for paying Red Hat customers).

The latest versions will be available at https://github.com/hyclak/vmware-vix-disklib-rpm

Build

This is packaged as a nosrc.rpm since VMware-vix-disklib can’t be distributed. To build, run the following:

yum install rpmdevtools
rpmdev-setuptree

Download the VMware-vix-disklib-6.0.2-3566099.x86_64.tar.gz to ~/rpmbuild/SOURCES
Download the vmware-vix-disklib.spec to ~/rpmbuild/SPECS

rpmbuild -ba ~/rpmbuild/SPECS/vmware-vix-disklib.spec

SPEC file

Name:           vmware-vix-disklib
Version:        6.0.2
Release:        1%{?dist}
Summary:        The Virtual Disk Development Kit (VDDK) is a collection of C libraries, code samples, utilities, and documentation to help you create or access VMware virtual disk storage.
 
License:        Proprietary
URL:            https://developercenter.vmware.com/web/sdk/60/vddk
Source0:        VMware-vix-disklib-6.0.2-3566099.x86_64.tar.gz
NoSource:	0
 
BuildRequires:  coreutils
#Requires:
 
Provides: 	libvixDiskLib.so.6()(64bit) libvixDiskLibVim.so.6()(64bit) libvixMntapi.so.1()(64bit)
 
%description
The Virtual Disk Development Kit (VDDK) is a collection of C libraries, code samples, utilities, and documentation to help you create or access VMware virtual disk storage. The kit includes:
 
* The Virtual Disk and Disk Mount libraries, sets of C function calls to manipulate virtual disk files. C++ code samples that you can build with either Visual Studio or the GNU C compiler
* Documentation about the VDDK libraries and the command-line utilities
* The Disk Mount utility to access files and file systems in offline virtual disks on Windows or Linux guest virtual machines
* The Virtual Disk Manager utility to manipulate offline virtual disk on Windows or Linux (clone, create, relocate, rename, grow, shrink, or defragment)
 
%prep
%setup -n %{name}-distrib
 
%build
 
%install
rm -rf $RPM_BUILD_ROOT
%__mkdir_p %{buildroot}/usr/lib/vmware-vix-disklib
%__cp -r bin64 include lib64 %{buildroot}/usr/lib/%{name}
%__ln_s /usr/lib/vmware-vix-disklib/lib64/libvixDiskLib.so %{buildroot}/usr/lib/libvixDiskLib.so
%__ln_s /usr/lib/vmware-vix-disklib/lib64/libvixDiskLib.so.6 %{buildroot}/usr/lib/libvixDiskLib.so.6
 
%files
/usr/lib/%{name}/
/usr/lib/libvixDiskLib.so*
%doc doc/*
 
%post
/sbin/ldconfig
 
%postun
/sbin/ldconfig
 
%changelog
* Wed Apr 27 2016 Matt Hyclak <matt.hyclak@cbts.net> 6.0.2-1
Initial Build