You are on page 1of 44

OVF Tool Users Guide

VMware OVF Tool 2.1

This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition. To check for more recent editions of this document, see http://www.vmware.com/support/pubs.

EN-000644-00

OVF Tool Users Guide

You can find the most up-to-date technical documentation on the VMware Web site at: http://www.vmware.com/support/ The VMware Web site also provides the latest product updates. If you have comments about this documentation, submit your feedback to: docfeedback@vmware.com

Copyright 2009-2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.

VMware, Inc. 3401 Hillview Ave. Palo Alto, CA 94304 www.vmware.com

VMware, Inc.

Contents

AboutThisBook

UsingVMwareOVFTool 7
AboutVMwareOVFTool 7 WhatIsNewinOVFTool2.1 7 FeatureHighlights 8 OVFStandard 8 BenefitsofOVF 8 VMwarePlatformsUsingOVF 9 ExamplesofImportingandExportingOVFPackagesUsingvSphereClient 9 SpaceRequirementsofOVFPackages 9 VMwareOVFToolDeltaDiskFacilities 10 SupportedOperatingSystems 11 InstallingVMwareOVFTool 11 InstallationDetails 12 RunningOVFToolAfterInstallation 12 UsingVMwareOVFTool 13 CommandLineOptions 13 SpecifyingaLocator 17 FileLocators 18 HTTP,HTTPS,andFTPLocators 18 vCloudDirectorLocators 19 vSphereLocators 19 SpecifyingtheInventoryPathtoaVirtualMachineorvApp 20 SpecifyingtheInventoryPathforaCluster,Host,orResourcePool 20 PartialLocators 21 ConfigurationFiles 22 ExamplesofUsingVMwareOVFTool 23 ConvertaVMXtoanOVF 23 ConvertaVMXtoanOVA 23 ConvertanOVFtoaVMX 23 ConvertVMXtoavSphere 23 DeployanOVFPackageDirectlyonanESXHost 23 DeployanOVFPackageandPowerItOn 24 ExportaRunningVirtualMachineorvAppfromvSphere 24 DeployanOVFPackageintovCloudDirector 24 DeployanOVFPackageintoavApprunWorkspace 24 ExportavApprunEntitytoanOVFPackage 24 RenametheOVFPackage 25 OmitDisksintheVMwareOVFToolOutput 25 CompressanOVFPackage 25 ChunkorSplitOVFPackageFiles 25 ValidateanOVF1.0orOVF1.1Descriptor 25 DownloadanOVFPackagefromaProtectedWebSite 26 UseaProxy 26 OverwriteaRunningVirtualMachineorvAppfromvSphere 26 SetOVFPropertiesWhenDeployingtovSphereortovCloudDirector 26 SetOVFNetworkMappingsWhenDeployingtovSphere 27

VMware, Inc.

OVF Tool Users Guide

CancelVMwareOVFToolWhileitIsRunning 27 ProbeMode 27 UseMachineMode 28 RunningmachineOutputinProbeMode 29 RunningmachineOutputinValidateHostMode 29 RunningmachineOutputinImporttovSphereMode 29 RunningtheMachineModeExportfromvSphereOperation 30 HandlingAuthentication 30 LaunchOVFToolasaHelperProcess 31

Appendix1:OVFPackageSigning

33

CreatinganRSAPublic/PrivateKeyPairandCertificate 33 SigninganOVFPackage 34 ValidatinganOVFPackage 35

Appendix2:OutputfromRunningOVFToolinMachineMode
OutputfromRunningmachineOutputinProbeMode 37 OutputfromRunningmachineOutputinValidateHostMode OutputfromRunningmachineOutputinImportMode 41 OutputfromRunningmachineOutputinExportMode 41 40

37

Index 43

VMware, Inc.

About This Book

ThisOVFToolUsersGuideprovidesinformationabouthowtouseVMwareOVFTooltopackagevirtual machinesandvAppsintoOpenVirtualizationFormat(OVF)standardpackages.

Revision History
Arevisionofthisbookoccurswitheachreleaseoftheproduct,orasneeded.Arevisedversioncancontain minorormajorchanges.Table 1liststherevisionhistoryofthisbook.
08

Table 1. Revision History


Revision 08/2011 06/2010 05/2009 Description OVFTool2.1UsersGuide OVFTool2.0.1Guide OVFTool1.0Guide

Intended Audience
ThisbookisintendedforanyonewhoneedstoconvertanOVFpackagetoavirtualmachine,oravirtual machinetoanOVFpackage.Userstypicallyincludepeoplewhodosoftwaredevelopmentandtestingorwork withmultipleoperatingsystemsorcomputingenvironments:systemadministrators,softwaredevelopers, QAengineers,andanyonewhowantstopackageorunpackagevirtualmachinesusingopenindustry standards.

VMware Technical Publications Glossary


VMwareTechnicalPublicationsprovidesaglossaryoftermsthatmightbeunfamiliartoyou.Fordefinitions oftermsastheyareusedinVMwaretechnicaldocumentation,gotohttp://www.vmware.com/support/pubs.

Document Feedback
VMwarewelcomesyoursuggestionsforimprovingourdocumentation.Ifyouhavecomments,sendyour feedbacktodocfeedback@vmware.com.

Technical Support and Education Resources


Thefollowingsectionsdescribethetechnicalsupportresourcesavailabletoyou.Toaccessthecurrentversion ofthisbookandotherbooks,gotohttp://www.vmware.com/support/pubs.

OVF Tool Users Forum


ToobtainmoreinformationandtopostquestionsaboutOVFTool,gototheOVFToolForumat http://www.vmware.com/go/ovftool.

VMware, Inc.

OVF Tool Users Guide

Online and Telephone Support


Touseonlinesupporttosubmittechnicalsupportrequests,viewyourproductandcontractinformation,and registeryourproducts,gotohttp://www.vmware.com/support. Customerswithappropriatesupportcontractsshouldusetelephonesupportforthefastestresponseon priority1issues.Gotohttp://www.vmware.com/support/phone_support.

Support Offerings
TofindouthowVMwaresupportofferingscanhelpmeetyourbusinessneeds,goto http://www.vmware.com/support/services.

VMware Professional Services


VMwareEducationServicescoursesofferextensivehandsonlabs,casestudyexamples,andcoursematerials designedtobeusedasonthejobreferencetools.Coursesareavailableonsite,intheclassroom,andlive online.Foronsitepilotprograms andimplementationbestpractices,VMwareConsultingServicesprovides offeringsto helpyouassess,plan,build,andmanageyourvirtualenvironment.Toaccessinformationabout educationclasses,certificationprograms,andconsultingservices,gotohttp://www.vmware.com/services.

VMware, Inc.

Using VMware OVF Tool

OpenVirtualizationFormat(OVF)isanindustrystandardthatdescribesmetadataaboutvirtualmachine imagesinXMLformat.VMwareOVFToolisacommandlineutilitythatenablesausertoimportandexport OVFpackagestoandfromawidevarietyofVMwareproducts.Thisguidecontainsthefollowingtopics: AboutVMwareOVFToolonpage 7 InstallingVMwareOVFToolonpage 11 UsingVMwareOVFToolonpage 13 ExamplesofUsingVMwareOVFToolonpage 23

About VMware OVF Tool


YoucanuseOVFTooltodistributeandimportvirtualmachinesandvApps.Forexample,youcancreatea virtualmachinewithinVMwarevSphere,anduseOVFTooltoexportitintoanOVFpackagefor installation,eitherwithinyourorganizationorfordistributiontootherorganizations.OVFfacilitatestheuse ofvApps,whichconsistofpreconfiguredvirtualmachinesthatpackageapplicationswiththeoperating systemthattheyrequire. OVFTool2.1supportsthefollowingsoftware: OVFversion1.1,andisbackwardcompatiblewithOVF1.0andOVF0.9,thatwassupportedby VirtualCenter2.5,andVMwareESX3.5. vSphere4.0andlater vCloudDirector1.5 vCloudDirector1.0(sourcefromOVForOVAtypesonly) VirtualCenter2.5andlater ESX3.5andlater VMwareServer2.0andlater VMwareWorkstation6.0andlater VMwareFusion3.0andlater vApprun1.0.

What Is New in OVF Tool 2.1


ThefollowingchangeshavebeenmadetoOVFToolsinceOVFTool2.0: SupportforvSphere5.0. SupportforvCloudDirector1.5andpartialsupportforvCloudDirector1.0

VMware, Inc.

OVF Tool Users Guide

Machinemode Newoptions

Feature Highlights
OVFTool2.1providesthefollowingkeyfeatures: FullsupportforvSphere5.0 FullsupportforvCloudDirector1.5 IncludesfullOVF1.0andOVF1.1supportandbackwardcompatiblemodeforimportingexistingOVF 0.9packages SupportsbothimportandgenerationofOVApackages(OVAispartoftheOVFstandard,andcontains allthefilesofavirtualmachineorvAppinasinglefile.) DirectlyconvertsbetweenanyvSphere,vCloudDirector,VMX,orOVFsourceformattoanyvSphere, vCloudDirector,VMX,orOVFtargetformat AccessesOVFsourcesusingHTTP,HTTPS,orFTP,orfromalocalfile DeploysandexportsvAppconfigurationsonvSphere4.0targetsandlaterandonvCloudDirector1.5 targetsandlater ProvidesoptionstopoweronaVMorvAppafterdeployment,andtopoweroffavirtualmachineor vAppbeforeexporting(cautionadvised) Showinformationaboutthecontentofanysourceinprobemode ProvidescontextsensitiveerrormessagesforvSphereandvCloudDirectorsourcesandtargets,showing possiblecompletionsforcommonerrors,suchasanincompletevCenterinventorypathormissing datastoreandnetworkmappings ProvidesanoptionaloutputformattosupportscriptingwhenanotherprogramcallsOVFTool UsesnewoptimizeduploadanddownloadAPI(optimizedforvSphere4.0andlater) SignsOVFpackagesandvalidatesOVFpackagesignatures ValidatesXMLSchemaofOVF1.0andOVF1.1descriptors ImportandexportofOVFpackagesintoavApprun1.0workspace. FormoreinformationaboutvApprun,seehttp://labs.vmware.com/flings/vapprun.

OVF Standard
TheOVFspecificationdescribesasecure,portable,efficient,andflexiblemethodtopackageanddistribute virtualmachinesandcomponents.ItoriginatedfromtheDistributedManagementTaskForce(DMTF)after vendorinitiative.CompaniesthatcontributedtothestandardincludeDell,HP,IBM,Microsoft,VMware,and Citrix.Version1.1waspublishedinJanuary2010,whichsupercedesthe1.0specificationpublishedApril2009, andisavailableontheDMTFWebsite,alongwithawhitepaper. Specification:http://www.dmtf.org/standards/published_documents/DSP0243_1.1.0.pdf Whitepaper:http://www.dmtf.org/standards/published_documents/DSP2017_1.0.0.pdf

Benefits of OVF
UsingOVFtodistributevirtualmachineshasthefollowingbenefits: Easeofuse.WhenusersreceiveapackageinOVFformat,theydonothavetounzipfiles,executebinaries, orconvertdiskformats.AddingavAppcanbeassimpleastypingaURLandclickingInstall.

VMware, Inc.

Using VMware OVF Tool

Virtualhardwarevalidation.OVFsupportsfastandrobusthardwarevalidation.Youdonothaveto installacompletevirtualmachinebeforedeterminingwhetheritiscompatiblewithanESXhost(for example,becauseitusesIDEvirtualdisks). Metadatainclusion.Additionalmetadata,suchasanenduserlicenseagreement,canbepackagedwith theOVFanddisplayedbeforeinstallation. OptimizeddownloadfromtheInternet.Largevirtualdisksarecompressedforfastdownloadandto reducediskspaceforlargetemplatelibraries.

VMware Platforms Using OVF


VMwaresupportsOVFonthefollowingplatforms: UseOVFTool2.1forvSphere4.0andlater,vCloudDirector1.5,vCloudDirector1.0(forOVFandOVA typesonly),vCenter2.5andlater,ESX3.5andlater,VMwareServer2,VMwareWorkstation6.0andlater, andVMwareFusion3.0andlater. OVF0.9issupportedforimportandexportbyVirtualCenter2.5andlater,andESX3.5andlater. VMwareStudio1.0andlatercangenerateOVFpackages. OVFsupportisbuiltintothevSphereClientthatinstallsfrom,andiscompatiblewithvCenter5.0andESX5.0, vCenter4.0andESX 4.0.ItisalsobuiltintothevSphereClientthatinstallsfromandiscompatiblewith VirtualCenter 2.5andlater,andESX 3.5andlater.

Examples of Importing and Exporting OVF Packages Using vSphere Client


UsingthevSphere5.0or4.0Client,youcanimportanOVFpackageandexportavAppintoanOVFpackage. Forexample,toimportanOVFpackageusingvSphereClient4: ClickFile>DeployOVFTemplate. Forexample,toexportavAppintoanOVFpackageusingvSphereClient4: ClickFile>Export>ExportOVFTemplate. UsingthevSphereClient2.5,youcanimportanOVFvirtualmachineintoanESXhostandexportavirtual machinetoanOVFfile(notethatvSphereClient2.5islimitedtoOVF0.9).Forexample,toimportanOVF vAppintoanESXhostusingvSphereClient2.5: ClickFile>VirtualAppliance>Import. Forexample,toexportavirtualmachinetoanOVFfileusingvSphereClient2.5: ClickFile>VirtualAppliance>Export. OVFpackagesimportedorexportedbyOVFToolarecompletelycompatiblewithpackagesimportedor exportedbythevSphereClientorthevSphereClient.

Space Requirements of OVF Packages


Avirtualmachineisstoredasasetoffilesondisk.IntheVMwareruntimeformat,thesefileshaveextensions .vmx,.vmdk,.vmsd,.vmxf,and.nvram.TheVMwarehypervisorrequiresthesefileformats,whichare optimizedforefficientexecution.AnESXhostoftenusesfullyallocatedflatdisksinaVMFSfilesystemto optimizevirtualmachineperformance. OVFsupportsefficient,securedistributionofvAppsandvirtualmachinetemplates.OVFisoptimizedfor thesegoals,ratherthanforefficientruntimeexecution.OVFdoesnotincludespecificinformationonruntime diskformatbecausesuchinformationisnotrequireduntilthevirtualmachineisdeployed.Whenyoupackage applianceswithOVF,youcanoptimizeonevAppforhighperformanceinaproductionenvironment,and optimizeanotherforminimalstoragespaceduringevaluation.

VMware, Inc.

OVF Tool Users Guide

Table 2contrastsavirtualmachineinVMwarefileformatwithavirtualmachineinOVFformat.OVFemploys acompressedsparseformatforVMDKfiles.Virtualdisksinthatformatcannotbeuseddirectlyforexecution withoutconversion. Table 2. VMware-Format File Sizes Compared to OVF and OVA file Sizes
VMware Format Files LinuxBasedAppliance.nvram LinuxBasedAppliance.vmdk LinuxBasedAppliances001.vmdk LinuxBasedAppliances002.vmdk LinuxBasedAppliance.vmsd LinuxBasedAppliance.vmx LinuxBasedAppliance.vmxf Total size 251MBusingthinprovisioning 4000MBusingthickprovisioning 132MB 132MB OVF Format LinuxBasedAppliance.ovf LinuxBasedAppliance0.vmdk LinuxBasedAppliance1.vmdk LinuxBasedAppliance2.vmdk OVA Format LinuxBasedAppliance.ova

VMware OVF Tool Delta Disk Facilities


VMwareOVFToolautomaticallycompressesdiskfiles.InthestreamingVMDKfilesthatOVFToolgenerates, thetoolcompresseseach64KBdiskgrain.Itispossibletoachieveevenbettercompressionusingthe --compressoption.Inaddition,ifapackagecontainsmultiplevirtualmachines,itispossibletocompressan OVFpackageevenmoreusingatechniquecalleddeltadiskcompression.Thiscompressionalgorithmis invokedusingthe--makeDeltaDisksoption.
ovftool --makeDeltaDisks package.ovf output-dir/

Deltadiskcompressionidentifiesdisksegmentsthatareequalandcombinestheseequalpartsinaparentdisk. Thisprocesspreventsstoringthesamesegmenttwice. Asanexample,considerasoftwaresolutionthatconsistsofanApacheWebservervirtualmachineanda MySQLdatabasevirtualmachine,bothinstalledontopofasinglediskUbuntuserver.Thetwovirtual machineswerecreatedwiththefollowingprocess: 1 2 3 4 CreateaplainUbuntuinstallationononevirtualmachine. Clonethevirtualmachine. InstallApacheonthefirstvirtualmachine. InstallMySQLonthesecondvirtualmachine.

Usingdeltadiskcompressiononthetwovirtualmachinediskscreatesaparentdiskcontainingallofthe informationtheyshare,whichisessentiallytheentireoperationsystemandtwochilddiskscontainingthe MySQLandApacheparts. AplainUbuntuservercanuse400500MBofspace,andtwowoulduse8001000MBofspace.Bycontrast, usingdeltadiskcompression,anOVFpackagewiththesetwoserversusesonly400500MB(plusthesizeof theMySQLandApacheinstallations),whichsaves400500MBbynotduplicatingtheUbuntuserver. Anynumberofdiskscanbecombinedcreatingvariousdisktreesandsavingmorespace. vSphere4andlatersupportthedeploymentofOVFpackagesthatcontaindeltadiskhierarchies. Fordeltadiskcompression,keepinmindthefollowing: Onlydiskswithequalcapacitycanbecombined.Ifyouexpecttousedeltadiskcompression,youmust keepdiskcapacitiesequal.

10

VMware, Inc.

Using VMware OVF Tool

Deltadiskcompressionnecessitatesthatsegmentsthatmightbeputinaparentdiskareatthesameoffset fromthebeginningoftheirrespectivefiles.IntheUbuntuexample,ifthesetupvariesbetweenthetwo installations,itcancompletelyoffseteachsegmentononeofthedisksfromthesegmentsontheother disk.Inthiscase,deltadiskcompressiondoesnotproduceanysignificantdiskspacesavings.Thisiswhy theexamplespecifiedcloningtheUbuntuserverbeforeinstallingtheMySQLandApacheparts, respectively. DeltadiskcompressiontakesOVFpackagesandvSphereandVMXfilesasinput,butnotOVApackages. Thedeltadiskcompressionalgorithmneedstoreadthecontentsofeachdiskuptotwotimes.Itmight makesensetoinvokeOVFToolonalocalcopyoftheOVFpackage. ThedeltadiskcompressionalgorithmalwaysgeneratesanOVFpackageinthegivenoutputdirectory.To convertthisOVFpackageintoanOVApackage,reinvokeOVFTool.

Supported Operating Systems


OVFToolsupportsthefollowingWindows32bit(x86)and64bit(x86_64)operatingsystems: WindowsXP Windows2003 WindowsVista Windows2008 Windows7 OVFToolsupportsthefollowingLinuxoperatingsystems: CentOS5.x FedoraCore12.x,13.x,14.x,and15.x RedHatEnterpriseLinux(RHEL)5.xand6.x SUSEEnterpriseserver10.x UbuntuDesktop9.xand10.x OVFToolsupportsthefollowingMacOSX64bitoperatingsystems: MacOSX10.6 MacOSX10.7

Installing VMware OVF Tool


TheVMwareOVFToolisavailableasaninstallerorZIPfile,dependingontheoperatingsystem. To install VMware OVF Tool 1 DownloadVMwareOVFTool:
Operating System Linux32bit Linux64bit MacOSX64bit Windows32bit Windows64bit Download Filename VMware-ovftool-2.1.0-467744-lin.i386.bundle VMware-ovftool-2.1.0-467744-lin.x86_64.bundle VMware-ovftool-2.1.0-467744-mac.i386.tar.gz VMware-ovftool-2.1.0-467744-win-i386.msi VMware-ovftool-2.1.0-467744-win-x86_64.msi

Installusingthemethodforyouroperatingsystem:

VMware, Inc.

11

OVF Tool Users Guide

Operating System Linux32bit Linux64bit MacOSX64bit Windows32bit Windows64bit

Installation Method Runtheshellscriptas ./VMware-ovftool-2.1.0-467744-lin.i386.bundle Runtheshellscriptas ./VMware-ovftool-2.1.0-467744-lin.x86_64.bundle Unpackthetar.gzfileanddoubleclickonthepackageinstaller, VMware-ovftool-2.1.0-467744-mac.i386.tar.gz Doubleclickontheinstaller, VMware-ovftool-2.1.0-467744-win-i386.msi Doubleclickonthe installer,VMware-ovftool-2.1.0-467744-win-x86_64.msi

Installation Details
Thefollowingarescreenbyscreeninstructionsforallinstallations: 1 2 3 4 5 6 AttheWelcomescreen,clickNext. Atthelicenseagreement,readthelicenseagreements,selectIagree...andclickNext. AcceptthepathsuggestedorchangetoapathofyourchoiceandclickNext. Whenyouhavefinishedchoosingyourinstallationoptions,clickInstall. Whentheinstallationiscomplete,clickNext. DeselectShowthereadmefileifyoudonotwanttoviewthereadmefile,andclickFinishtoexit.

Running OVF Tool After Installation


AfterinstallingOVFToolsonWindows,youcanrunOVFToolfromaDOSprompt. To run OVF Tool from a DOS Prompt 1 FromtheStartmenu,clickRun.
Start > Run

IntheRundialog,writecmd,whichopensaDOSprompt.
cmd

IfyouhavetheOVFToolfolderinyourPathenvironmentvariable,youcanrunOVFToolatthecommand line.Forinstructionsonrunningtheutility,seeUsingVMwareOVFToolonpage 13. To add VMware OVF Tool to your Path environment variable ThefollowinginstructionsareforWindows7,butitisdonesimilarlyonotherWindowssystems. 1 2 3 4 5 RightclickMyComputer. SelectProperties. SelectAdvancedsystemsettings. SelectEnvironmentVariables. FindthesystemvariablecalledPathandaddtheOVFToolinstalldirectorybyselectingthevariable,click Editandaddingthetext. Forexample,thepathmightbethefollowing:
;C:\Program Files\VMware\VMware OVF Tool\

TheleadingsemicolonisnecessarytoappendtheOVFToolpathtotheexistingpathvariable.

12

VMware, Inc.

Using VMware OVF Tool

Using VMware OVF Tool


VMwareOVFToolisacommandlineutilitythatsupportsimportingandexportingofOVFpackagesfrom ESXhostsandotherVMwareproducts.AvSpherelocationreferstoanylocationonaVMwareproduct,such asvSphere,VMwareServerorESX.ThissectiondescribeshowtorunandselectOVFTooloptions. To run VMware OVF Tool from the command line 1 Atthecommandlineprompt,runtheOVFTool.
ovftool <source locator> <target locator>

where<source locator>and<target locator>arethepathstothesourceandtargetforthevirtual machine,OVFpackage,OVApackageorvSpherelocation.SeeCommandLineOptionsonpage 13for thevariousoptions. 2 Ifyouwanttospecifyadditionaloptions,typethembeforethesourceandtargetlocators.


ovftool <options> <source locator> <target locator>

3 4

Todisplayalloptions,typeovftool -h. Probemodeallowsyoutoinvestigatethecontentsofasource.Toinvokeprobemode,usetheovftool commandwithonlyasourceandnotarget.


ovftool <options> <source locator>

OVFToolprintsinformationaboutthesourcesuchashardware,EULAsandOVFproperties. UseprobemodetoexamineanOVFpackagebeforedeployingit.Forexample,youcanexaminethe downloadanddeploymentsizes,determinethesetofnetworkstobemapped,determinetheOVF propertiestobeconfigured,readtheEULA,anddeterminethevirtualhardwarerequirements.Theprobe operationisfast,asitonlyneedstoaccesstheOVFdescriptor.Itdoesnotneedtodownloadtheentire OVAorVMDKfiles.Probemodealsovalidatesthecertificateifthesourceissigned. FormoreinformationaboutProbeModeandanexampleoftheoutput,seeProbeModeonpage 27. Table 3describesthesourceandtargetlocators.Formoreinformation,seeSpecifyingaLocatoron page 17.

Command-Line Options
Foreverycommand,youspecifythesourceandtargetlocators.Table 3defineseachlocatortype. Table 3. OVF Tool Definitions of Source and Target Locators
Locator <source locator> Definition Pathtothesource,whichmustbeeitheravirtualmachine,vApp,vApprunworkspace entity,oranOVFpackage. Thesourcelocatorcanbeoneofthefollowing: ApathtoanOVForOVAfile(alocalfilepath,oranHTTP,HTTPS,orFTPURL). Avirtualmachine(alocalfilepathtoa.vmx file). AvSpherelocatoridentifyingavirtualmachineorvApponvCenter,ESX,orVMware Server. AvCloudDirectorlocatoridentifyingavirtualmachineoravAppinvCloudDirector. AlocalfilepathtoavApprunworkspaceentity. <target locator> Thetargetlocatorcanbeoneofthefollowing: AlocalfilepathforVMX,OVF,OVA,orvApprunworkspace. AvSpherelocatoridentifyingacluster,host,oravSpherelocation. AvCloudDirectorlocatoridentifyingavirtualmachineoravAppinvCloudDirector.

Table 4showsallthecommandlineoptions.

VMware, Inc.

13

OVF Tool Users Guide

Optionsperformactionsonlybetweencertainsourceandtargettypes.Table 4showswhichsourceandtarget typeseachoptionworkswith.Ifyouspecifyanoptionusinganirrelevantsourceortargettype,thecommand doesnothing. Alloptionscanbesetusingtheform--option=value. Binaryoptionscanbeenabledordisabledexplicitly.Forexample:--option=true,--option=false.

Table 4. OVF Tool Command-Line Options


Option Short Name Relevant Source Types OVF, OVA vSphere vSphere N/A Relevant Target Types N/A vSphere vSphere OVF, OVA

Option Long Name --acceptAllEulas --authdPortSource --authdPortTarget --chunkSize

Description AcceptallEULAswithoutbeingprompted. Binaryoption. OverridesdefaultVMwareauthdport(902) whenusingahostassource. OverridesthedefaultVMwareauthdport(902) whenusingahostastarget. Specifiesthechunksizetouseforfilesina generatedOVFpackage.Defaultisnottochunk. Whenusingthisoption,alloutputfiles(except theOVFdescriptor,manifestandcertificatefiles) areslicedintothespecifiedchunksize.Thisis usefulifyouneedtotransportanOVFpackage onaseriesof800MBCDROMs,orareonlyable tocreatefilesupto2GBonFAT32filesystems. ChunkingcombinedwithanOVApackageas outputmakesanOVAinwhichallthefilesare chunked,likefortheOVFpackage,buttheOVA packageitselfisstillbeasinglefile. CompressesthediskwhengivenanOVForOVA targetlocator.Thevaluemustbebetween1and 9.Thefastestis1,butgivestheworst compression.Theslowestis9,butgivesthebest compression. TargetdatastorenameforavSpheredeployment. DeploymentoptionsforadeployedOVF package.AnOVFpackagecancontainseveral deploymentconfigurations.Thisoptionallows youtoselectwhichconfigurationtousewhen deployingtothevSpheretarget. Skipsvalidationofsignatureandcertificate. Binaryoption. Selectstargetdiskformat.Commonformatsare monolithicSparse,monolithicFlat, twoGbMaxExtentSparse, twoGbMaxExtentFlat,streamOptimized,thin (vSpheretarget),thick(vSpheretarget) InsertstheEULAinthefirstvirtualsystemor virtualsystemcollectionintheOVF.IftheEULA isinafile,usethefollowingoptionformat: --eula@=filename SetsanExtraConfigelementforall VirtualHardwareSections.Thesyntaxis -:extraConfig:<key>=<value> IfaparentnetworkexistsonavCloudtarget, fencedModespecifiestheconnectivitytothe parent.Possiblevaluesarebridged,isolated, allowIn,allowInOut,allowOut.

--compress

N/A

OVF, OVA

--datastore --deploymentOption

-ds

N/A OVF, OVA

vSphere N/A

--disableVerification --diskMode -dm

OVF, OVA N/A

N/A VMX, vApprun, vSphere

--eula

N/A

OVF, OVA

extraConfig

N/A

All

fencedMode

vCloud

14

VMware, Inc.

Using VMware OVF Tool

Table 4. OVF Tool Command-Line Options (Continued)


Option Short Name -h Relevant Source Types N/A OVF, OVA vSphere Relevant Target Types N/A N/A vSphere

Option Long Name --help --hideEula --I:morefArgs

Description PrintstheVMwareOVFToolhelpmessagewith usageinformation. DoesnotincludetheEULAintheprobeoutput. Binaryoption. Integrationoption.Interpretargumentsfor networks,datastores,andfoldersasVIM ManagedObjectReferenceidentifiers(type:id) forvSpheresourceanddestinationlocators. Integrationoption.Specifiesthesessionticket usedforauthenticatingthevSpheresource locator. Integrationoption.Specifiesthesessionticket usedforauthenticatingthevSpheretarget locator. IPallocationpolicyforadeployedOVFpackage. Supportedvaluesare:fixed,transient,and dhcp.InOVFdescriptors,youcanspecifya VMwarespecificIPassignmentpolicythat guidesthedeploymentprocessbyexpressing whichofthepoliciestheOVFpackagesupports. OnlyvalueslistedintheOVFdescriptorare supportedwhentheOVForOVApackageis deployed. SelectstheIPprotocoltouse.Forexample,IPv4, IPv6.AswiththeipAllocationPolicyoption, youcanspecifywhichIPversionthisOVF packageuseswhenitisdeployed.Useonlythe valueslistedintheOVFdescriptor. RelaxOVFspecificationconformanceandvirtual hardwarecompliancechecks.(Foradvanced usersonly.) Selectsthelocaleforthetarget. OutputsOVFToolmessagesinamachine readableformat.Binaryoption. UsedeltadiskcompressiontocreateanOVF packagefromadisksource.Binaryoption.

--I:sourceSessionTicket

vSphere

vSphere

--I:targetSessionTicket

vSphere

vSphere

--ipAllocationPolicy

OVF, OVA

N/A

--ipProtocol

OVF, OVA

N/A

--lax

OVF, OVA OVF, OVA N/A OVF, vSphere, VMX, vApprun -n N/A OVF, OVA

N/A

--locale --machineOutput --makeDeltaDisks

N/A N/A Mustbe directory

--name --net

All N/A

Specifiesthetargetname.Defaultstothesource name. SetsanetworkassignmentinthedeployedOVF package.Forexample,--net:<OVF name>=<target name>.OVFpackagescontain symbolicnamesfornetworknameswhichare assignedwiththisoption.Formultiplenetwork mappings,repeattheoption,separatingthem withablank,forexample, --net:s1=t1 --net:s2=t2 --net:s3=t3. TargetnetworkforavSpheredeployment.Use thisoptioninplaceofthe--netoptionwhen onlyonenetworkexistsintheOVFpackage.This optionmapsthesymbolicOVFnametothe specifiednetworkname.

--network

-nw

OVF, OVA

N/A

VMware, Inc.

15

OVF Tool Users Guide

Table 4. OVF Tool Command-Line Options (Continued)


Option Short Name Relevant Source Types N/A Relevant Target Types All

Option Long Name --noDisks

Description Createsanduploadsthevirtualmachineor vAppsbutdoesnotuploadanydisjfiles.Disks arecreatedempty. Createsanduploadsthevirtualmachineor vAppsbutdoesnotuploadISOfilestoa CDROM. Forcesoverwriteofexistingfiles.Binaryoption. EnsuresthatavirtualmachineorvAppis poweredoffbeforeimportingfromavSphere source.Binaryoption. EnsuresthatavirtualmachineorvAppis poweredoffbeforeoverwritingavSpheretarget. Binaryoption. PowersonavirtualmachineorvAppdeployed onavSpheretarget.Binaryoption. SignstheOVFpackagewiththegivenprivate key(.pemfile).Thefilemustcontainaprivate keyandacertificate. Passwordfortheprivatekey.Usedinconjunction with--privateKeyiftheprivatekeyrequires passwordauthentication.Ifrequiredbutnot specified,thetoolpromptsforthepassword. SetsapropertyinthedeployedOVFpackage.For example,--prop:<key>=<value>.Useprobe modetolearnwhichpropertiesanOVFpackage canset.Formultiplepropertymappings,repeat theoption,separatingthemwithablank,for example--prop:p1=v1 --prop:p2=v2 --prop:p3=v3. ProxyusedforHTTP,HTTPS,FTP,andvSphere access.TheproxyisexpressedastheURLtothe proxy.Forexample,forproxy.example.com, theoptionvalueis: https://proxy.example.com:345 OVFToolsupportsproxiesthatrequire authentication.Ifyoudonotprovidecredentials intheURL,OVFToolpromptsforthem.

--noImageFiles

N/A

All

--overwrite --powerOffSource

-o

N/A vCloud, vSphere N/A

All N/A

--powerOffTarget

vCloud, vSphere vCloud, vSphere OVF, OVA OVF, OVA

--powerOn --privateKey

N/A N/A

--privateKeyPassword

N/A

--prop

OVF, OVA

N/A

--proxy

OVF, OVA, vCloud, vSphere

OVF, OVA, vCloud, vSphere

--quiet --schemaValidate --skipManifestCheck --skipManifestGeneration --sourceSSLThumbprint

-q

N/A OVF, OVA OVF, OVA N/A vSphere

N/A N/A N/A OVF, OVA N/A

Printsnooutputtothescreenexceptforerrors. Binaryoption. ValidatesOVFdescriptoragainsttheOVF schema.Binaryoption. SkipsvalidationoftheOVFpackagemanifest. Binaryoption. SkipsgenerationoftheOVFpackagemanifest. Binaryoption. SSLthumbprintofthesource.OVFToolverifies theSSLthumbprintthatitreceivesfromthe source,ifthisvalueisset. ExplicitlyexpressesthatthesourceisOVF,OVA, VMX,vApprun,orvSphere. SSLthumbprintofthetarget.OVFToolverifies theSSLthumbprintthatitreceivesfromthe target,ifthisvalueisset.

--sourceType --targetSSLThumbprint

-st

All N/A

N/A vSphere

16

VMware, Inc.

Using VMware OVF Tool

Table 4. OVF Tool Command-Line Options (Continued)


Option Short Name -tt Relevant Source Types N/A OVF, OVA All -v N/A N/A Relevant Target Types All N/A

Option Long Name --targetType --vService

Description ExplicitlyexpressthatthetargetisOVF,OVA, VMX,vApprun,orvSphere. SetadependencyonavServiceproviderinthe OVFpackage,usingthefollowingsyntax: --vService:<dependencyId>=<providerId> Donotuploadthesource;onlyverifyit. ShowsversioninformationforOVFTool.Binary option. SpecifytheCPUresourcesettingsforVIlocator targets.Thesyntaxis --viCpuResource=<shares>:<reservation> :<limit> SpecifythememoryresourcesettingsforVI locatortargets.Thesyntaxis --viMemoryResource=<shares>:

--verifyOnly --version --viCpuResource

N/A N/A vSphere

--viMemoryResource

N/A

vSphere

<reservation>:<limit> --vmFolder -vf N/A vSphere ThetargetvirtualmachinefolderinvSphere inventory(foradatacenter).

Specifying a Locator
Asourceortargetlocatorpointstosomeresource.Locatorsmustspecifyaprotocol,whichdefineshowto reachtheresource.Supportedprotocolsarefileaccess,vSphere,HTTP,HTTPS,andFTP. FilelocatorscanpointtoanOVFpackage(.ovfor.ova),avirtualmachine(.vmx).HTTP,HTTPS,ora vApprunworkspaceentity.FTPlocatorscanpointtoOVFandOVAfiles.Theresourcetypeisdetermined fromthefilenamesuffix,unlessoneorbothoftheoptions--sourceTypeand--targetTypeareused explicitly. vSpherelocatorscanpointtovariousresourcetypes:virtualmachines,vApps,hosts,clusters,orresource pools.Forasourcelocator,theresourcetypemustbeavirtualmachineorvApp.Foratargetlocator,the resourcetypemustbeahost,cluster,oraresourcepool.AvSpherelocatorisusedforavSphereserver, vCenterServer,VMwareServer,oranESXhost. Atthecommandline,type--help locatorstodisplaytheonlinehelpforlocators. Table 5andTable 6listthedefaultextensionsofthedifferentsourceandtargettypes,aswellaswhich protocolsaresupported. Table 5. Source Locator
Source Type OVF OVA VMX vApprun vCloudDirector vSphere Default File Extension .ovf .ova .vmx N/A N/A N/A Protocol File,HTTP,HTTPS,FTP File,HTTP,HTTPS,FTP File File HTTPS vSphere

VMware, Inc.

17

OVF Tool Users Guide

Table 6. Target Locator


Target Type OVF OVA VMX vApprun vCloudDirector vSphere File Extension .ovf .ova .vmx N/A N/A N/A Protocol File File File(Sourcemustbeasinglevirtualmachine) File HTTPS vSphere(IfthevSpheretargetlocatorisonaVMwareServersystem, ordirectlyonanESXhost,thesourcemustbeasinglevirtualmachine)

File Locators
Filelocatorsarethesameforsourceandtarget.Theyarespecifiedusingordinarypathsyntax. Windows Path Syntax OnWindows,pathsarespecifiedaseitherabsoluteorrelative. ThisisanexampleofanabsolutepathonWindows:
C:\folder1\folder2\package.ovf

TheseexamplesshowrelativepathsonWindows:
..\folder1\package1.ovf package1.ovf

Linux and Mac OS Path Syntax OnLinux,pathsarespecified,similarly,aseitherabsoluteorrelative. ThefollowingisanexampleofanabsolutepathonLinux:


/folder1/folder2/package.ovf

ThefollowingareexamplesofrelativepathsonLinux:
../folder1/package1.ovf package1.ovf

Using URIs as Locators ItispossibletospecifyfilelocationsasaURIbyprefixingthepathwithfile://,asshowninthefollowing examples:


file://c:\folder1\folder2\package.ovf (Absolute, Windows) file:///folder1/folder2/package.ovf (Absolute, Linux) file://package.ovf (Relative for both Windows and Linux)

HTTP, HTTPS, and FTP Locators


YoucanuseHTTP,HTTPS,andFTPtorefertoanOVFpackage(OVForOVAfile)onaWebserver.Youcan onlyusetheseprotocolstospecifyasourcelocator.Inthefollowingsyntax,protocolisHTTP,HTTPSorFTP:
protocol://username:password@host:port/<path to OVF package>

Itispossibletoomittheusernameandpasswordfromthelocator.Ifneeded,OVFToolpromptsyouforthem. Ifyouusethestandardport,itisnotnecessarytospecifytheport.Table 7showsthestandardports. Table 7. Standard Ports


Protocol Port

HTTP

80

18

VMware, Inc.

Using VMware OVF Tool

Table 7. Standard Ports


Protocol Port

HTTPS FTP

443 21

vCloud Director Locators


ThesyntaxforvCloudlocatorsarethesameasforotherlocators:
vcloud://username:password@host:port?org=name_of_org&vapp=name_of_deployed_vapp& catalog=name_of_catalog&vappTemplate=name_of_vapp_template_in_catalog&vdc=name_of_vdc

Someoftheoptionsarenotneededifthereisonlyonevirtualdatacentertochoosefrom.Iftherearemorethan ondatacenter,thecatalogoptionisrequired.Theorgoptionismandatory,becauseitisusedtologinto vCloudDirector. NOTEOVFToolsupportsallsourcetypesforvCloudDirector1.5.ForvCloudDirector1.0,OVFToolonly supportsOVF/OVA/vCloudsources.OVFTooldoesnotsupportvi,vmx,orvapprunsourcesforvCloud Director1.0. Examples of vCloud Locators ThefollowingexampleuploadsanddeploysanOVFnamedtestintovCloudDirectorandnamesthevApp my_test1.
ovftool /tmp/test.ovf vcloud://user1:password@10.99.99.99:7443?org=o&vapp=my_test1

ThisexampleexportsavCloudDirectorvApptotheOVFfile/tmp/test1.ovf
ovftool vcloud://user1:password@10.10.99.99.99:7443?org=o&vapp=my_test1 /tmp/test1.ovf

Ifyouuseanetwork,youmapthenetworkintheusualway:
--net:sourceNET=targetNET

Youalsoapplypropertiesintheusualway.

vSphere Locators
vSpheresourcelocatorspointtoavirtualmachineorvAppwithinthevirtualinfrastructure.ThevSphere targetlocatorprovidesallrequiredinformationforimportinganOVFpackageorvirtualmachineintoa cluster,hostorresourcepool.Bothsourceandtargetlocatorusethesamesyntax:
vi://<username>:<password>@<host>:<port>/<search-term>

TheservernameandportcandesignateeitheravCenterserver,VirtualCenterserver,VMwareServer,oran ESXhost.Ifyouomitcredentials,inwhichcaseOVFToolpromptsyouforthem.Defaultinstallationsof vCenterServer,VirtualCenter,andESXuseport443.Ifyouareusingthedefaultport,youdonotneedto specifyit.WhenusingOVFToolagainstaVMwareServer,youmustexplicitlyspecifyport8333,whichisthe defaultportforVMwareServer. Thesearchtermhasthefollowingformat:


<path>[?<query>=<value>]

Ifaqueryisnotgiven,aVCinventorypathlookupisperformedusingthespecifiedpath.Otherwise,theobject matchingthequeryisused.Themeaningofthequerydependsontheobjecttype.Table 8showsthedifferent valuesthatyoucanuseinthequeryfield. Table 8. Source and Target Values for All Query Types
Name BIOS Datastore IPAddress Query bios ds ip Source BIOSIDofavirtualmachine Datastorepathtoavirtualmachine IPaddressofavirtualmachine Target BIOSIDofahost N/A IPaddressofahost

VMware, Inc.

19

OVF Tool Users Guide

Table 8. Source and Target Values for All Query Types


Name DNS MoRef Query dns moref Source DNSnameofavirtualmachine Managedobjectreference(vSphere specificidentifier)ofavirtualmachine orvApp Target DNSnameofahost Managedobjectreference(vSpherespecific identifier)ofahost,cluster,orresource pool

Table 9showsexamplevaluesforeachquerytype. Table 9. Examples of Query Values


Name BIOS Datastore IPAddress DNS MoRef Query bios ds ip dns moref Example Value vi://localhost?bios=234290984 vi://localhost/TestDatacenter?ds=[foo]/myvm/myvm.vmx vi://localhost?ip=123.231.232.232 vi://localhost?dns=production-vm3.example.com vi://localhost?moref=vim.vm.VirtualMachine:vm-23423

Youcanenterapartialsourcelocatorifyoudonotknowtheentireinventorypath.Inthiscase,thetoolfails butsuggestspossibleinventorypathcompletions.

Specifying the Inventory Path to a Virtual Machine or vApp


TospecifyaninventorypathforavirtualmachineorvApp,usethefollowingsyntax:
<datacenter name>/vm/<folders>/<vm or vApp name>

or
<datacenter name>/host/<resource pool path>/<vm or vApp name>

TheuseofthevmtagafterthedatacenternamespecifiesthatyouarelocatingavirtualmachineorvAppinthe VMandTemplateview.Usethehosttagafterthedatacenternameifyouarelocatingavirtualmachineor vAppintheHostandClustersview. Thefollowingexampleshowsaninventorypathwithoutanyfolders:


MyDatacenter/vm/MyVM

Thefollowingexampleshowsaninventorypathwithtwonestedfolders:
MyDatacenter/vm/Folder 1/Sub Folder/MyVM

Specifying the Inventory Path for a Cluster, Host, or Resource Pool


Youcanspecifyaninventorypathforahostoraresourcepool.Youcannestresourcepoolssimilartofolders. Tospecifyaninventorypathforahostoraresourcepoolaspartoftargetlocators,usethefollowingsyntax:
<datacenter name>/host/<host name>/Resources/<resource pool>

hostandResources. Fixedpartsofthepath. Resources. Specifyonlywhenaresourcepoolisspecified. <resource pool>. Cantakethevalueofoneormorenestedresourcepools.Ifnoresourcepoolsare specified,thedefaultresourcepoolforthehostisused. Thefollowingexampleisofaninventorypathwithoutaspecifiedresourcepool:


TestDatacenter/host/esx-host3.example.com

Thefollowingexampleisofaninventorypathwithaspecifiedresourcepool:
TestDatacenter/host/esx-host3.example.com/Resources/SmallResourcePool

20

VMware, Inc.

Using VMware OVF Tool

Partial Locators
WhenusingOVFTool,itisoftennotnecessarytospecifysourceandtargettypesaslongascertainfilename conventionsareused.Itispossibletotheignorelocatortypeandspecifythesourceandtargetexplicitlyusing thearguments--sourceType=...and--targetType=. OVFToolassumesthelocatortypebasedonthefollowingrules: Ifthenamestartswithvcloud://,OVFToolassumesvCloudDirectortype. Ifthenamestartswithvi://,OVFToolassumesvSpheretype. Ifthenameendswith.ovf,OVFToolassumesOVFtype. Ifthenameendswith.vmx,OVFToolassumesVMXtype. Ifthenameendswith.ova,theOVFtoolassumesOVAtype. IfthelocatorisafilepathtoadirectorythatrepresentsavApprunworkspaceoranentityinavApprun workspace,thenOVFToolassumsvAppruntype. Similarly,sourceandtargettypescanbeinferredfromfolderlocators.OVFToolassumesthetypeaccording thefollowingrules: Ifthesourcelocatorisafolder,OVFToolassumesthatthesourceisanOVFpackageandthattheOVF descriptoriscalledthesameasthefolder,forexample,my-ovf/my-ovf.ovf. IfthesourceisanOVFpackageandthetargetlocatorisadirectory,suchasMyVirtualMachines/,OVF ToolassumesthatthetargetisaVMXlocator.ThecreatedVMX/VMDKfileisputinadirectorywiththe targetname,forexample,MyVirtualMachines/MyVM/MyVM.vmx. IfthesourceisaVMXlocatorandthetargetlocatorisadirectory,OVFToolassumesthatthetargetisan OVFpackage. IfthesourceisavSpherelocator,andthetargetlocatorisadirectory,OVFToolassumesthatthetargetis anOVFpackage. OVFToolsupportspartialvSpherelocatorswhendeployingorexporting.Foranincompletelocatorpath,the toolsuggestscompletionsatthecommandline.Example 1showsthecommandlinedialogwhenpartial locatorsareused. Example 1. Partial vSphere Locators at the Command Line
> ovftool LAMP.ovf vi://localhost/ Opening source: LAMP.ovf Opening target: vi://user@localhost/ Error: Found wrong kind of object (Folder) Possible completions are: Datacenter/ Remote Datacenter/ Secondary Datacenter/ > ovftool LAMP.ovf vi://localhost/Datacenter Opening source: LAMP.ovf Opening target: vi://user@localhost/Datacenter Error: Found wrong kind of object (Datacenter) Possible completions are: vm/ host/ > ovftool LAMP.ovf vi://localhost/Datacenter/host Opening source: LAMP.ovf Opening target: vi://user@localhost/Datacenter/host Error: Found wrong kind of object (Folder) Possible completions are: host1.foo.com/ host2.foo.com/

VMware, Inc.

21

OVF Tool Users Guide

> ovftool LAMP.ovf vi://localhost/Datacenter/vm/host1.foo.com

OVFToolsupportspartialvSpherelocatorswhendeployingorexporting.Foranincompletelocatorpath,the toolsuggestscompletionsatthecommandline.Example 2showsthecommandlinedialogwhenpartial locatorsareused.First,OVFToolsignalsthatthereismorethanonevirtualdatacenterpresent,thenmultiple catalogs,thenmultiplenetworks.Ateachattempt,youmustselectoneoftheoptionsthatOVFToolpresents. Example 2. Partial vCloud DirectorLocators at the Command Line
ovftool LAMP.ovf vcloud://jd:PASSWORD@example.com:443/?org=myOrg&vapp=test1 Opening OVF source: LAMP.ovf Warning: No manifest file Opening vCloud target: vcloud://js:PASSWORD@example.com:443/ Error: Multiple VDCs found. Possible VDC completions are: orgVdc orgVdc2 Completed with errors ovftool LAMP.ovf "vcloud://jd:PASSWORD@example.com:443/?org=myOrg&vapp=test1&vdc=orgVdc" Opening OVF source: LAMP.ovf Warning: No manifest file Opening vCloud target: vcloud://js:PASSWORD@example.com:443/ Error: Multiple catalogs found. Possible catalog completions are: catalog catalog2 Completed with errors "vcloud://jd:PASSWORD@example.com:443/?org=myOrg&vapp=test1&vdc=orgVdc&catalog=catalog" Opening OVF source: LAMP.ovf Warning: No manifest file Opening vCloud target: vcloud://js:PASSWORD@example.com:443/ Error: Multiple networks found on target. Possible completions are: extNet2 extOrgNet intNet2 intnet Completed with errors ovftool --net:"VM Network=intnet" LAMP.ovf "vcloud://jd:PASSWORD@example.com:443/ ?org=myOrg&vapp=test1&vdc=orgVdc&catalog=catalog" Opening OVF source: LAMP.ovf Warning: No manifest file Opening vCloud target: vcloud://js:PASSWORD@example.com:443/ Deploying to vCloud: vcloud://js:PASSWORD@example.com:443/ Disk Transfer Complete Completed successfully

Configuration Files
OVFToolhasmanyoptions.Ratherthanrepeatedlyenteringlongcommandsonthecommandline,youcan createaconfigurationfile.Aconfigurationfileusesthefollowingsyntax:
option1=value ... #comment optionN=value

Thefollowingisanexampleofaconfigurationfile:
proxy=http://proxy.example.com datastore=storage-test42 # Comment on something locale=dk

22

VMware, Inc.

Using VMware OVF Tool

Youcancreatelocalorglobalconfigurationfiles.Alocalconfigurationfilehasthe.ovftoolsuffixandisread inthefolderfromwhichyouinvokeOVFTool.Aglobalconfigurationfileisperuser. OnWindows,theglobalconfigurationfileisreadfromthefollowinglocation:


C:\Documents and Settings\$USERNAME\VMware\ovftool.cfg

OnLinux,theglobalconfigurationfileisreadfromthefollowinglocation:
$HOME/.ovftool

Whenusingconfigurationfiles,globallydefinedoptionsareoverwrittenbylocallydefinedandcommandline options.Locallydefinedoptionsareoverwrittenbycommandlineoptions. Youcanusetheovftool --help configcommandtogetinformationabouthowtouseaconfigurationfile. Inaddition,thecurrentcontentsoftheglobalconfigurationfileaswellasanylocalconfigurationfileisshown.

Examples of Using VMware OVF Tool


Atthecommandline,type--help examplestodisplayexamplesofovftoolcommands.

Convert a VMX to an OVF


ToconvertavirtualmachineinVMwareruntimeformat(.vmx)toanOVFpackage,typeacommandlikethe following:
> ovftool f:/myvms/BigDemo.vmx x:/ovf/BigDemo.ovf

Convert a VMX to an OVA


ToconvertaVMXtoanOVAfile,typeacommandlikethefollowing:
> ovftool vmxs/Nostalgia.vmx ovfs/Nostalgia.ova

Convert an OVF to a VMX


ToconvertanOVFpackagetoafileinVMwareformat,typeacommandlikethefollowing:
> ovftool http://www.mycompany.com/ovflib/BigDemo.ovf x:/myvms/BigDemo.vmx

BecausethesourceisanOVFpackage,youcanspecifyitasaURLoralocalfilepath. IfyouconvertanOVFpackagetoaVMXfilewithoutspecifyingthetargetdirectory,OVFToolcreatesa directoryusingtheOVFpackagenameandwritestheVMXfileinit.


> ovftool "Windows 7.ovf" .

TheVMXfileiswrittenatWindows 7/Windows 7.vmx.

Convert VMX to a vSphere


YoucanconvertanyvSphere,orVMXsourcetoanyvSphere,orVMXtargetformatwithoutanintermediate OVFconversion.ThefollowingexampleusesOVFTooltodirectlyconvertaVMXfiletoavSpherefile, withoutfirstdoingaVMXtoOVFconversionandthenanOVFtovSphereconversion.
> ovftool Nostaliga.vmx vi://user:pwd@host/Datacenter/host/host1.foo.com

Deploy an OVF Package Directly on an ESX Host


ThefollowingcommanddeploysanOVFpackageonanESXhost.
> ovftool package.ovf vi://my.esx-machine.example.com/

VMware, Inc.

23

OVF Tool Users Guide

Deploy an OVF Package and Power It On


OVFToolcanpoweronavirtualmachineorvAppafterdeployment.Thisactioncanbedoneonallsupported platforms.ThefollowingexamplepowersonthevirtualmachineorvApptoaparticularhostthroughvCenter Server:
> ovftool --powerOn package.ovf vi://MyvCenterServer/?dns=fast-esx-host1.example.com.

Export a Running Virtual Machine or vApp from vSphere


YoumustpoweroffavirtualmachineorvAppbeforeexportingit.Thefollowingexamplelocatesthevirtual machineorvAppbasedonitsDNSnamethroughthevCenterServerandpowersitoff:
> ovftool --powerOffSource vi://MyvCenterServer/?dns=test-vm test-vm.ova

NOTEThisoptiondoesnotperformashutdown,wheretheoperatingsystemshutsdownbyitself.Thisis onlyapoweroffoperation.

Deploy an OVF Package into vCloud Director


YoucandeployanOVFpackagefromOVFToolintovCloudDirector.Thefollowingexampleconnectsto vCloudDirectoranddeploystheOVFpackageLAMP.ovf.
> ovftool --net:"VM Network=intnet" LAMP.ovf "vcloud://jd:PASSWORD@example.com:443/? org=myOrg&vapp=test1&vdc=orgVdc&catalog=catalog"

Deploy an OVF Package into a vApprun Workspace


AvApprunworkspaceprovidesvAppsupportsforWorkstationandFusionusers.Itprovidesacomplete vApprunexecutionenvironment,thatincludesnestedvApps,OVFproperties,andanOVFenvironment.The environmentisfullycompatiblewithvSphere4. ReadmoreaboutvApprunat:http://labs.vmware.com/flings/vApprun. TodeployanOVFpackageintoavApprunworkspace,simplyuseatargetlocatorthatpointstoyourvApprun workspace,asshowninthefollowingexample:
> ovftool myOvfPackage c:\My_vApprun_workspace\

AcommonscenarioisthatthecurrentdirectoryisthevApprunworkspace(sinceallvAppruncommandsare relativetothis),soyoucanjustusea.asthetargetlocator,asshowninthefollowingexample:
> ovftool http://www.mycompany.com/ovflib/BigDemo.ovf .

Export a vApprun Entity to an OVF Package


BothvirtualmachineandvAppentitiesinyourvApprunworkspacecanbeexportedasOVFpackages,as showninthefollowingexample:
> ovftool c:\My_vApprun_workspace\BigDemo c:\ovflib\

Prependthenameoftheentitytoexporttothepath.IfthecurrentdirectoryisthevApprunworkspace,you onlyspecifythename,asshowninthefollowingexample:
> ovftool BigDemo vi://MyvCenterServer/...

Thepreviousexampletakesadvantageofthefactthatanysourcelocatorcanbeusedwithanydestination locator.Thus,thevApptransfersdirectlyfromthevApprunworkspacetothevCenterinstallation. NOTEvApprundoesnotkeepthesamelevelofmetadataaroundasvSphere.Thus,thevAppruncreated OVFpackageswillnotcontainanyEULAs,descriptionofproperties,andsuch.

24

VMware, Inc.

Using VMware OVF Tool

Rename the OVF Package


YoucanrenameanOVFpackagebyconvertingtheOVFtoanOVF.Thisactionalsorenamesallthedisk namesandchangesthereferencesintheOVFdescriptor.
> ovftool Windows 7.ovf win7.ovf

Omit Disks in the VMware OVF Tool Output


IfyouwantonlyinformationabouttheOVFdescriptorandnotaboutthedisksthatitrefersto,youcan suppresstheoutput. ThefollowingexamplecommandomitsdiskoutputandsimplycopiestheOVFdescriptorandanymessage bundlefilesthatmightbeassociatedwithit:
> ovftool --noDisks http://example.com/ovf/InterestingVirtualAppliance package.ovf

Compress an OVF Package


FormaximumcompressionofanOVFpackagewithmultiplevirtualmachines,setboththe--compress=9 and--makeDeltaDisksoptions.Thefollowingareexamplesofusingmaximumcompression:
> ovftool --compress=9 --makeDeltaDisks package.ovf output-dir > ovftool --compress=9 --makeDeltaDisks vi://localhost/dc/vm/VirtualAppDemo output-dir/

Ifthesourcecontainsonlyasinglevirtualmachine,the--makeDeltaDisksoptiondoesnotyieldany compressionboost.Inthiscase,the--compress=9optiongivesmaximumcompression.

Chunk or Split OVF Package Files


Somefilesystemshavearestrictiononmaximumfilesize.Forexample,FAT32allowsfilesonlyupto2GB.You cansplittheOVFfilesfromageneratedpackageintopiecesofaspecifiedmaximumsize.Thedefault measurementismegabytes(keywordmb).Youcanspecifyotherunitsusingoneofthefollowingkeywords: Unit Bytes Kilobytes Gigabytes Keyword
b kb gb

Forexample,tocreateanOVFpackageoptimizedforaFAT32filesystem,usethefollowingcommand:
> ovftool --chunkSize=2gb <source> package.ovf

Eachfilechunkhasasequentiallynumberedsuffix.Forexample,fora6GBdisk,thechunkshavethesenames:
disk1.vmdk.000000000, disk1.vmdk.000000001, disk1.vmdk.000000002

Validate an OVF 1.0 or OVF 1.1 Descriptor


IfyouaregeneratingOVF1.0orOVF1.1descriptorsmanually,youcancheckwhetherthedescriptorscomply withtheOVF1.0orOVF1.1.Thefollowingexamplesshowhowtovalidatedescriptors:
> > > > ovftool ovftool ovftool ovftool --schemaValidate --schemaValidate --schemaValidate --schemaValidate package.ovf package.ova http://example.com/folder1/package.ovf http://example.com/folder1/package.ova

VMware, Inc.

25

OVF Tool Users Guide

Ifeverythingiscorrect,OVFTooloutputstheresultofprobingtheOVF.Otherwise,alistofwarningsand errorsisshown. IMPORTANTBeingcompliantwithOVF1.0or1.1schemaisonlypartoftherequirementsforbeingavalid OVFpackage.TheschemavalidationdoesnotcheckforalltherequirementsspecifiedintheOVF1.0and OVF 1.1specifications.

Download an OVF Package from a Protected Web Site


OVFToolcanreadsourcesgivenbyaURLusingbothHTTPandHTTPS.Youaccessitwiththeusernameand password.ThefollowingexampledownloadstheLAMPOVFpackageandputsitinanOVApackage.
> ovftool https://user:pass@example.com/repository/ovf/LAMP.ovf LAMP.ova

Ifyouomittheusernameandpassword,inwhichcaseOVFToolpromptsyouforthem.

Use a Proxy
YoucanspecifyaproxyforOVFTool.Thefollowingexamplesshowtheuseofthe--proxyoption:
> ovftool --proxy=proxy.example.com http://external-site.com/ovf/package.ovf > ovftool --proxy=http://proxy.example.com http://external-site.com/ovf/package.ovf

OVFToolallowsproxiesthatrequireauthentication.Credentialsaresuppliedintheproxypathasshownin thefollowingexample:
> ovftool --proxy=user:pass@proxy.example.com http://external-site.com/ovf/package.ovf

Youcanomittheusernameandpasswordforaproxyserverthatrequiresauthentication.OVFToolprompts forthem.

Overwrite a Running Virtual Machine or vApp from vSphere


VMwareOVFToolsupportsoverwritingexistingtargets.IfatargetvirtualmachineorvApphasthesame nameasthesource,OVFTooloverwritesthetargetwhenthe--overwriteoptionisspecified.Ifthetarget virtualmachineorvAppisrunning,OVFToolcannotoverwriteit.OVFTooldoesnotautomaticallypoweroff thetarget.Topoweroffthetargetbeforeoverwritingit,usethe--powerOffTargetoption.
> ovftool --overwrite --powerOffTarget package.ovf vi://localhost/?dns=production-host.example.com

YoucanalsopoweronthenewlywrittenvirtualmachineorvAppatthesametime.Inthefollowingexample, thetargetmachineispoweredoffanddeleted,thepackage.ovfisimported,andtheimportedvirtualmachine orvAppispoweredon.


> ovftool --overwrite --powerOffTarget --powerOn package.ovf vi://localhost/?dns=production-host.example.com

Set OVF Properties When Deploying to vSphere or to vCloud Director


OVFdescriptorscancontainconfigurationpropertiesforthedeployedOVFpackage.Youcansetonlyone propertyatatime,butyoucanhavemultipleinstancesoftheoptionpercommand. Thepropertyoptionhasthefollowingsyntax:
--prop:<option>=<value>

Thefollowingexamplesetstwoproperties:theadministratorsemailaddressandthenumberofconcurrent sessions.
> ovftool --prop:adminEmail=john@example.com --prop:concurrentSessions=200 package.ovf vi://localhost/?dns=fast-esx=host1.example.com

26

VMware, Inc.

Using VMware OVF Tool

Set OVF Network Mappings When Deploying to vSphere


OVFdescriptorscanusesymbolicidentifiersfornetworknames.Theseidentifiersmustbemappedtoa networkthatisavailableonthechosenvSphereplatform.Ifonlyonenetworkisavailableonthetargetand onlyonenetworkisdescribedintheOVFdescriptor,OVFToolselectsthatnetworkautomatically.Inthiscase, youdonotneedtospecifyanetworkmapping.The--netoptionhasthefollowingsyntax:
--net:<OVF network name>=<target network name>

Inthefollowingexample,anetworkisselected.
> ovftool --net:Example net 1=VM Network <source> <vSphere locator>

IftheOVFdescriptoronlyspecifiesonenetworkname,youcanspecifythetargetnetworknameofthe networkmapping,asinthefollowingexample:
> ovftool --network=VM Network <source> <vSphere locator>

Cancel VMware OVF Tool While it Is Running


TocancelOVFToolwhileitisrunning,enterCtrl-C.ThishaltsOVFToolandcleansupanygeneratedfiles.

Probe Mode
Probemoderevealsinformationaboutthecontentofasource.YoucanprobeOVAandOVFpackages,VMX, andvSpheresourcetypes.Youcanusetheinformationgatheredtofindouthowitcanbeconfiguredwhen youdeployit. Tousetheprobefeature,omitthetargetlocatorwheninvokingOVFTool.Forexample,atthecommandline, type:ovftool LAMP.ovf.ThetooldisplaysallavailableinformationabouttheLAMP.ovf. WhenprobemodeisusedonanOVForOVApackage,OVFToolalsovalidatesthecertificatefile,ifpresent. Aspartoftheinformationdisplayedinprobemode,theEULAisdisplayedbydefault.TopreventtheEULA fromdisplaying,usethe --hideEulaoption.
> ovftool --hideEula LAMP.ovf

ThefollowingexampleshowstheresultofprobingtheLAMP.ovf.
OVF version: VirtualApp: Name: Version: Vendor: Product URL: Annotation: 1.0 true LAMP running PHP-Fusion 0.1 VMware Aarhus http://example.com/ovf/1.0/LAMP/readme.txt This vApp offers the programming environment stack: Linux, Apache, MySQL and PHP programming environment -- LAMP. More specifically the vApp contains a Database server running MySQL and Web server VM running Apache2 and PHP.

End-user License Agreements: EULA for LAMP. Download Size: 604.07 MB

Deployment Sizes: Flat disks: 16.00 GB Sparse disks: Unknown Networks: Name: VM Network Description: The VM Network network Virtual Hardware: Family: vmx-04 Disk Types: SCSI-lsilogic

VMware, Inc.

27

OVF Tool Users Guide

Properties: Key: Label: Type: Description: Key: Label: Type: Description:

db_ip IP address ip:VM Network The IP address of the database server. ws_ip IP address ip:VM Network The IP address of the Web server.

IP Allocation Policy: Schemes: ovfenv dhcp Protocols: IPv4

Use Machine Mode


Youcanusethe--machineOutputoptiontorunOVFToolfromanotherprogramorscript. Ifyouusethe--machineOutputoption,OVFToolprovidesoutputinthefollowingformat: STATUS-CODE details <blank line>. OVFToolinsertsablanklinetosignaltheendofanoperation.Eachresponselineisprefixedwithaplus symbol(+)toavoidconfusingitwiththeterminatingblankline. ThelaststatusthatOVFToolsendsisalwaysRESULT. OVFToolsendsalloutput,includingerrorsandwarnings,tostdout,soclientsonlyhavetolistenonone stream. Table 10. Machine Mode Status
Status PROBE VALIDATEHOST AUTHENTICATION CERTIFICATE MANIFEST PROGRESS TARGET_ID RESULT Details XML XML source/target/proxyserver locator,orfileName Validate,Self-signed,orFailed validate ValidateorFailed validate Number(0100) Text,forexampleSugarCRM.ovfor vim.VirtualMachine:vm-415. ERRORorSUCCESS Description Proberesultwithinformationabout thesource. ShowswhethertheVItargetis compatiblewiththeinputarguments. Showsthatauthenticationisrequired. Signalsthatacertificateispresentand showstheresultofthevalidation. Signalsthatamanifestispresentand showstheresultofvalidation. Showsthepercentageprogressduring uploadanddownload. ShowsthetargetIDafteruploadand downloadfinishes. Alwaysuseasthelastcommandsent.

Youcanrunthe--machineOutputoptionindifferentmodes: Probe Validatehost Importandexport

28

VMware, Inc.

Using VMware OVF Tool

Running machineOutput in Probe Mode


WhenyourunthemachineOutputoptioninprobemode,theOVFToolreportsthefollowingsequenceof statuses: 1 2 3 AUTHENTICATION(zeroormore) PROBE (exactlyone) RESULT(exactlyone)

TorunthemachineOutputoptioninprobemode,yourunthefollowingcommand.
ovftool.exe --machineOutput source_locator

ForanexampleoftheoutputofrunningmachineOutputinprobemode,seeExample ,OutputfromRunning machineOutputinProbeMode,onpage 37.

Running machineOutput in Validate Host Mode


WhenyourunthemachineOutputoptioninvalidatehostmode,theOVFToolreportsthefollowingsequence ofstatuses: 1 2 3 4 5 AUTHENTICATION(zeroormore) VALIDATEHOST(exactlyone) PROGRESS(exactlyone) TARGET_ID(exactlyone) RESULT(exactlyone)

TorunthemachineOutputoptioninvalidatehostmode,yourunthefollowingcommand.
ovftool.exe --machineOutput --verifyOnly source_locator destination_locator

ForanexampleoftheoutputofrunningmachineOutputinvalidatehostmode,seeExample ,Outputfrom RunningmachineOutputinValidateHostMode,onpage 40.

Running machineOutput in Import to vSphere Mode


WhenyourunthemachineOutputoptioninimportmode,theOVFToolreportsthefollowingsequenceof statuses: 1 2 3 4 5 6 AUTHENTICATION(zeroormore) MANIFEST (zeroorone) CERTIFICATE (zeroorone) PROGRESS (oneormore) TARGET_ID(exactlyone) RESULT(exactlyone)

TousemachinemodetouploadanOVFtovSphere,yourunthefollowingcommand.
ovftool.exe --machineOutput --acceptAllEulas --I:morefArgs --I:targetSessionTicket=<session ticket> --net:<ovf netname>=vim.Network:<moref-id> --datastore=vim.Datastore:<moref-id> --vmFolder=vim.Folder:<moref-id> --deploymentOption=<value> --diskMode=<value> --ipAllocationPolicy=<value> --ipProtocol=<value> --name=<value> (optional) --overwrite (optional) \ \ \ \ \ \ \ \ \ \ \ \ \

VMware, Inc.

29

OVF Tool Users Guide

--powerOffTarget (optional) --powerOn (optional) --prop:<key>=<value> <src URL or PATH> vi://<servername>?moref=vim.ResourcePool:<moref-id>

\ \ \ \

ForanexampleoftheoutputofrunningmachineOutputinimportmode,seeOutputfromRunning machineOutputinImportModeonpage 41.

Running the Machine Mode Export from vSphere Operation


WhenyourunthemachineOutputoptioninimportmode,theOVFToolOVFToolreportsthefollowing sequenceofstatuses: 1 2 3 4 5 6 AUTHENTICATION(zeroormore) MANIFEST (zeroorone) CERTIFICATE (zeroorone) PROGRESS (oneormore) TARGET_ID(exactlyone) RESULT(exactlyone)

TousemachinemodetodownloadanOVFfromvSphere,yourunthefollowingcommand.
ovftool.exe --machineOutput --I:sourceSessionTicket=<session ticket> -tt <OVA or OVF> -n=<name> --overwrite (optional) --powerOffSource (optional) --chunkSize=<value> (optional) --compress=<value> (optional) vi://<servername>?moref=<type>:<moref-id> <directory> \ \ \ \ \ \ \ \ \

Thetypevalueiseithervim.VirtualMachineorvim.VirtualVApp. Whenyouspecify--machineOutput,OVFToolmonitorsSTDIN,andcancelstheoperationifitreadsthe ABORT\nlineinstdin. ForanexampleoftheoutputofrunningmachineOutputinexportmode,seeOutputfromRunning machineOutputinExportModeonpage 41.

Handling Authentication
OVFToolgeneratesAUTHENTICATIONoutputmessagesifaccesstoaresourcerequiresausernameor password.Forexample,aproxyserver,avSphereorvCloudlocator,oranauthenticatedURLrequire usernamesandpasswords.OVFToolonlygeneratesAUTHENTICATIONmessagesforresourceswhere passwordsarenotexplicitlyprovidedaspartofthelocatororascommandlinearguments. OVFToolcanauthenticatethefollowingtypesofobjects: sourcelocators targetlocators proxyServer Forsourceandtargetlocators,youmustprovidetheusernameonthecommandline.Ifyoudonotprovidea password,OVFToolgeneratesanAUTHENTICATIONmessageandyoumustprovidethepasswordonSTDIN. Iftheproxyserverrequiresauthentication,youmustprovideboththeusernameandpasswordonSTDIN OVFToolsupportsthefollowingcommandsonSTDIN:
Forthesourcepassword:

30

VMware, Inc.

Using VMware OVF Tool

PASSWORDSOURCE password Forthetargetpassword: PASSWORDTARGET password Fortheproxy: PASSWORDPROXY

username password

ForanexampleoftheoutputofrunningmachineOutputinauthenticationmode,seeOutputfromRunning machineOutputinImportModeonpage 41.

Launch OVF Tool as a Helper Process


YoucanusetheintegrationoptionstomakeitmoreconvenienttolauchOVFToolasahelperprocesstoa clientofthevSphereWebServicesAPI,suchasascriptusingPerlbindings. Ifyouusethe--I:morefArgsargument,thevaluesfor--vmFolder,--network,--net,and--datastore areinterpretedasmoRefsinsteadofnames,asshowninthefollowingexample:
> ovftool --name=vm5 \ --I:morefArgs \ --net:VM Network=vim.Network:network-12 \ --datastore=vim.Datastore:datastore-17 \ c:\temp\vm1\ \ vi://root:@localhost?moref=vim.ResourcePool:resgroup-42

Usethe--I:sourceSessionTicketor--I:targetSessionTicketoptionstoauthenticatewithasession ticketretrievedfromSessionManager.AcquireSessionTicket,whenusingthevSpheresourceor destination.

VMware, Inc.

31

OVF Tool Users Guide

32

VMware, Inc.

Appendix 1: OVF Package Signing

AvalidOVFsignaturerequirestwospecialfiles,amanifest(.mf)filethatcontainstheSHA1hashcodesofall thefilesinthepackage(exceptthe.mfand.certfiles),andacertificatefile(.cert)thatcontainsthesigned SHA1ofthemanifestfileandtheX.509encodedcertificate.ThisappendixspecifieshowtouseOpenSSLand VMwareOVFToolscommandstosignandvalidateOVFpackages. Thisappendixcontainsthefollowingtopics: CreatinganRSAPublic/PrivateKeyPairandCertificateonpage 33 SigninganOVFPackageonpage 34 ValidatinganOVFPackageonpage 35

Creating an RSA Public/Private Key Pair and Certificate


Tosignapackage,apublic/privatekeypairandcertificatethatwrapsthepublickeyisrequired.Theprivate keyandthecertificate,whichincludesthepublickey,isstoredina.pemfile. ThefollowingOpenSSLcommandcreatesa.pemfile:
> openssl req -x509 -nodes -sha1 -days 365 -newkey rsa:1024 -keyout myself.pem -out myself.pem

NOTENopasswordisnecessary.Toincludeapassword,removethe--nodesoption. Table A1showsthecontentsofthemyself.pemfile. Example A-1. Myself.pem File Contents


-----BEGIN RSA PRIVATE KEY----MIICXAIBAAKBgQDe0dCCKNfQ45+D0ezGGAuVSbhE8buqFCQnQnfi27Wt6bu4DhcE bQtjgfzuEpcl4e31txJcu18XTv4icRL74DP7i2pMN2UVj6DZW/B7jIw4UPG2g96f ... -----END RSA PRIVATE KEY---------BEGIN CERTIFICATE----MIIC5DCCAk2gAwIBAgIJAKgUiZPOajC0MA0GCSqGSIb3DQEBBAUAMFYxCzAJBgNV BAYTAkRLMRMwEQYDVQQIEwpTb21lLVN0YXRlMQ8wDQYDVQQHEwZBYXJodXMxITAf ... -----END CERTIFICATE-----

Todisplaythecontentsofa.pemfileatthecommandline,typethefollowing: >openssl x509 -text -noout -in <filename>.pem

VMware, Inc.

33

OVF Tool Users Guide

Thecontentsofthefiledisplayasfollows:
Certificate: Data: Version: 3 (0x2) Serial Number: ....

Tocreateatrustedcertificate,usetheOpenSSLcommand,omittingthe--x509option.Thiscreatesacertificate requestina.pemfilethatyoucansendtoanypublicauthority,suchasVerisign.

Signing an OVF Package


SigninganOVFpackageenablesthepersondeployingittovalidatetheauthenticityoftheOVFpackage.Once thepackageissigned,OVFpackagefilescannotbechanged,withoutinvalidatingthesignature.Whena packagecomesfromatrustedsourceandhasavalidOVFsignature,youcandeploythepackageknowingit hasnotbeentamperedwith. SigninganOVFpackagerequiresa.pemfilethatcontainsaprivatekeyandacertificate,asshowninsection CreatinganRSAPublic/PrivateKeyPairandCertificateonpage 33. TosignageneratedOVFpackage,includetheprivateKeyoption.Theoptionsyntaxisshowninthefollowing example:
> ovftool --privateKey=<path to .pem file> <source> <output OVF or OVA file>

Whenthisoptionisused,OVFToolusestheprivatekeyandcertificatetogenerateasignaturebasedonthe SHA1digestofeachfilethatisincludedintheOVFpackage,includingtheOVFdescriptoritself. OVFToolgeneratesanadditional.certfilewithasignedSHA1signatureandthecertificateusedtosignit. Example A2showsanexampleofthe.certfilegeneratedbyOVFTool. Example A-2. Certificate File Created by OVF Tool
SHA1(signed-package.mf)=5d9a307f0acdc1a424079eb38ff8954c153f978e599ed374dd784c853bab1856415fa16ef 378bde3487cd5dfa4d11a3017eda91886f98e3bba3adc2f4e28ce6d0ba3a19eef80ac0729511311603 dcb221f9ba7a6008f1a87fe15ebf3699c8a8744bd05c43b1387dd53d73723e7f0a3720d489e147e31c 4570d15fb7a3beae770 -----BEGIN CERTIFICATE----MIIDTzCCArigAwIBAgIJAKDgFLg9WvBwMA0GCSqGSIb3DQEBBQUAMHkxCzAJBgNV BAYTAkRLMQ8wDQYDVQQHEwZBYXJodXMxFTATBgNVBAoTDFZNd2FyZSwgSW5jLjEM MAoGA1UECxMDVklNMREwDwYDVQQDEwhLcmlzdGlhbjEhMB8GCSqGSIb3DQEJARYS a2xhc3NlbkB2bXdhcmUuY29tMB4XDTA5MDMwNjEzMDUwNFoXDTEwMDMwNjEzMDUw NFoweTELMAkGA1UEBhMCREsxDzANBgNVBAcTBkFhcmh1czEVMBMGA1UEChMMVk13 YXJlLCBJbmMuMQwwCgYDVQQLEwNWSU0xETAPBgNVBAMTCEtyaXN0aWFuMSEwHwYJ KoZIhvcNAQkBFhJrbGFzc2VuQHZtd2FyZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD gY0AMIGJAoGBAM2xxX9a1YITiiRrxpXGg9xbEP4Oepcs71ZcNp8Z3mQIb95mpEc6 SZemmjOsqwpkvV/82RALOBgmJ/hot1noSkiAZi0liPmX1M0BU3OS/pSim7VNKBmV SUJfOC4T6/MygVpyfkSUhB5EWx0JCUvowRex6Ytl220MOGcXnLpvdfO9AgMBAAGj gd4wgdswHQYDVR0OBBYEFM2KkX7pWTQmMg+iD6HWMOZRLrfJMIGrBgNVHSMEgaMw gaCAFM2KkX7pWTQmMg+iD6HWMOZRLrfJoX2kezB5MQswCQYDVQQGEwJESzEPMA0G A1UEBxMGQWFyaHVzMRUwEwYDVQQKEwxWTXdhcmUsIEluYy4xDDAKBgNVBAsTA1ZJ TTERMA8GA1UEAxMIS3Jpc3RpYW4xITAfBgkqhkiG9w0BCQEWEmtsYXNzZW5Adm13 YXJlLmNvbYIJAKDgFLg9WvBwMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD gYEANaNxv4QrN7iI0rDCordYDh1G7Z3jl28ntSoxehGmz6ghYAfBNhTVhWUZuX9X UXKn8QltOF/Ynijuo6JTJwO/5V1o6TAaCmFahDW/Om02AXPdSbw4UQdidGmmgrAs DYVQz2CNPk2YbkXITNeGBNHomTqsVU7MGDjReu96+V6O2zY= -----END CERTIFICATE-----

34

VMware, Inc.

Appendix 1: OVF Package Signing

Validating an OVF Package


IfanOVFcertificatefileispresent,OVFToolalwaysverifiesifthesignaturefitstheSHA1digestofthefilesin thepackageandteststheauthenticityofthecertificate. ToquicklyvalidatetheauthenticityofanOVFpackage,usetheprobemodeasshowninthefollowing example:
> ovftool signed-package.ovf

VMware, Inc.

35

OVF Tool Users Guide

36

VMware, Inc.

Appendix 2: Output from Running OVF Tool in Machine Mode

YoucanruntheOVFToolmachinemodemachineOutputoptioninprobemode,validatehostmode,or importmode. Thisappendixcontainsthefollowingtopics: OutputfromRunningmachineOutputinProbeModeonpage 37 OutputfromRunningmachineOutputinValidateHostModeonpage 40 OutputfromRunningmachineOutputinImportModeonpage 41 OutputfromRunningmachineOutputinExportModeonpage 41

Output from Running machineOutput in Probe Mode


Thefollowingexampleshowstheoutputofrunningthe--machineOutput PROBEoperationonafilenamed LAMP.ovf. Example A-1. Output from Running machineOutput in Probe Mode
ovftool --machineOutput LAMP.ovf PROBE + <probeResult> + <virtualApp> + true + </virtualApp> + <productInfo> + <name> + LAMP running PHP-Fusion + </name> + <productUrl> + http://example.com/ovf/1.0/LAMP/readme.txt + </productUrl> + <version> + 0.1 + </version> + <fullVersion> + + </fullVersion> + <vendor> + VMware + </vendor> + <vendorUrl> + + </vendorUrl> + </productInfo> + <annotation> + This vApp offers the programming environment stack: Linux, Apache, MySQL and PHP programming environment -- LAMP. More specifically the vApp contains a Database server running MySQL and Web server VM running Apache2 and PHP. + </annotation>
VMware, Inc. 37

OVF Tool Users Guide

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

<eulas> <eula> Eula for OVF </eula> </eulas> <sizes> <download> 633412608 </download> <flat> 17179869184 </flat> <sparse> Unknown </sparse> </sizes> <networks> <network> <name> VM Network </name> <description> The VM Network network </description> </network> </networks> <properties> <property> <classId> </classId> <key> db_ip </key> <instanceId> </instanceId> <category> </category> <label> IP address </label> <type> ip:VM Network </type> <description> The IP address of the database server. </description> <value> </value> </property> <property> <classId> </classId> <key> ws_ip </key> <instanceId> </instanceId> <category> </category>

38

VMware, Inc.

Appendix 2: Output from Running OVF Tool in Machine Mode

+ + + + + + + + + + + + + + + + + + + + + + +

<label> IP address </label> <type> ip:VM Network </type> <description> The IP address of the Web server. </description> <value> </value> </property> </properties> <deploymentOptions> </deploymentOptions> <ipAllocationSchemes> ovfenv,dhcp </ipAllocationSchemes> <ipProtocols> IPv4 </ipProtocols> </probeResult>

RESULT + SUCCESS

VMware, Inc.

39

OVF Tool Users Guide

Output from Running machineOutput in Validate Host Mode


Thefollowingexampleshowstheoutputofrunningthe--machineOutput VALIDATEHOSToperationonafile namedLAMP.ovf. Example A-2. Output from Running machineOutput in Validate Host Mode
ovftool --machineOutput --acceptAllEulas --verifyOnly LAMP.ovf vi://myuser:mypassword@myvc.example.com/dc/host/myhost.example.com VALIDATEHOST + + <supportedDiskProvisioning> + + + + + + + + + + + + + + + + <type> monolithicFlat </type> <type> thin </type> <type> thick </type> <type> flat </type> <type> eagerZeroedThick </type> + </supportedDiskProvisioning>

PROGRESS + 0 TARGET_ID + RESULT + SUCCESS

40

VMware, Inc.

Appendix 2: Output from Running OVF Tool in Machine Mode

Output from Running machineOutput in Import Mode


Thefollowingexampleshowstheoutputofrunningthe--machineOutputimportoperationonafilenamed LAMP.ovf. Example A-3. Output from Running machineOutput in Import Mode
ovftool --machineOutput --acceptAllEulas LAMP.ovf vi://myuser:mypassword@myvc.example.com/dc/host/myhost.example.com PROGRESS + 0 + 1 + 2 + 3 .... + 98 + 99 + 100 TARGET_ID + vim.VirtualApp:resgroup-v61 RESULT + SUCCESS

Output from Running machineOutput in Export Mode


Thefollowingexampleshowstheoutputofrunningthe--machineOutputexportoperationonafilenamed LAMP.ovf. Example A-4. Output from Running machineOutput in Export Mode
ovftool -o --machineOutput --acceptAllEulas /tmp/LAMP.ovf PROGRESS + 0 + 1 + 2 + 3 ... + 98 + 99 + 100 TARGET_ID + /tmp/LAMP.ovf RESULT + SUCCESS vi://myuser:mypassword@myvc.example.com/dc/vm/LAMP

VMware, Inc.

41

OVF Tool Users Guide

42

VMware, Inc.

Index

B
benefits of OVF 8

C
command line, running OVF Tool from 13 command-line options 13 --compress 10 compression 10 configuration files 22

installing OVF Tool 11 integration options 31 introduction to OVF Tool 7 inventory path host or resource pool 20 virtual machine or vApp 20

L
Linux path syntax for file locators 18 Linux operating systems supported 11

D
delta disk compression introduction 10 limitations 10 download file names 11

M
Mac OS 11 Machine Mode 28 Machine Mode Operations 28 --makeDeltaDisks 10

E
examples cancelling OVF Tool while running 27 chunking 25 convert .ovf to .vmx 23 convert .vmx to .ova 23 convert .vmx to .ovf 23 convert source to target 23 deploying and powering on 24 deploying OVF package 23 downloading from a protected site 26 exporting a running virtual machine or vApp 24 maximum compression 25 omitting disks in output 25 overwriting a running virtual machine or vApp 26 probe mode 27 renaming the OVF package 25 setting OVF network mappings 27 setting OVF properties 26 using a proxy 26 validating 25

N
new since 1.0 7

O
opeating systems supported Linux 11 operating systems supported Mac 11 Windows 11 Output from Running machineOutput in Probe Mode 37 Output from Running machineOutput in Validate Host Mode 40 OVF package space requirements 9 OVF standard 8 OVF support in vSphere 9 OVF Tool adding to PATH variable 12 command-line options 13 examples 23 installation 11 installing 11 partial locators 21 running 12 running from command line 13 source and target locator definitions 13 OVT Tool as a helper process, integration options 31

F
feature highlights 8 file locators 18 Forum 5

I
installing OVF 11 Windows details 12
VMware, Inc.

43

OVF Tool Users Guide

P
partial locators command-line dialog 21 OVF Tool assumptions 21 Partial vCloud DirectorLocators at the Command Line 22 PATH variable, adding OVF Tool 12 platforms supported 9 protocol locators, HTTP, HTTPS, FTP 18

R
running OVF Tool after install 12

S
source locator definition 13 vSpherer 19 space requirements 9 supported platforms 9

T
target locator definition 13 technical support resources 5

U
URI, using for file locators 18 URI, using for locators 18

V
vApprun deploying an OVF package to 24 exporting a vApprun entity to an OVF package 24 vCloud Director locators 19 virtual machine file extensions 9 vSphere source locators query values 20 source and target values 19 vSphere support for OVF 9 vSphereI source locators definition 19

W
whats new 7 Windows path syntax for file locators 18 Windows installation details 12 Windows operating systems supported 11

44

VMware, Inc.

You might also like