Sei sulla pagina 1di 28

OVF Tool User Guide

VMware OVF Tool 1.0

EN-000143-00

OVF Tool User 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

2009 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, the VMware boxes logo and design, Virtual SMP, and VMotion are registered trademarks or trademarks 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 FeaturesHighlights 7 OVFStandard 8 BenefitsofOVF 8 VMwarePlatformsUsingOVF 8 SpaceRequirementsofOVFPackages 9 VMwareOVFToolDeltaDiskFacilities 9 SupportedOperatingSystems 10 InstallingVMwareOVFTool 11 LinuxInstallationDetails 11 WindowsInstallationDetails 11 RunningOVFToolAfterInstallation 12 UsingVMwareOVFTool 12 CommandLineOptions 13 SpecifyingaLocator 16 FileLocators 16 HTTP,HTTPS,andFTPLocators 17 VILocators 17 SpecifyingtheInventoryPathtoaVirtualMachineorvApp 18 SpecifyingtheInventoryPathforaCluster,Host,orResourcePool PartialLocators 18 ConfigurationFiles 20 ExamplesofUsingVMwareOVFToolUsage 20 ConvertaVMXtoanOVF 20 ConvertaVMXtoanOVA 20 ConvertanOVFtoaVMX 20 ConvertVMXtoaVI 21 DeployanOVFPackageDirectlyonanESXHost 21 DeployanOVFPackageandPowerItOn 21 ExportaRunningVirtualMachineorvAppfromVI 21 RenametheOVFPackage 21 OmitDisksintheVMwareOVFToolOutput 21 CompressanOVFPackage 21 ChunkorSplitOVFPackageFiles 22 ValidateanOVF1.0Descriptor 22 DownloadanOVFPackagefromaProtectedWebSite 22 UseaProxy 22 OverwriteaRunningVirtualMachineorvAppfromVI 23 SetOVFPropertiesWhenDeployingtovSphere 23 SetOVFNetworkMappingsWhenDeployingtovSphere 23 ObtainProgressFeedbackfromVMwareOVFTool 23 CancelVMwareOVFToolWhileitIsRunning 23 ProbeMode 24

18

VMware, Inc.

OVF Tool User Guide

Appendix:OVFPackageSigning

25

CreatinganRSAPublic/PrivateKeyPairandCertificate 25 SigninganOVFPackage 26 ValidatinganOVFPackage 26

Index 27

VMware, Inc.

About This Book

ThisOVFToolUserGuideprovidesinformationabouthowtouseVMwareOVFTooltopackagevirtual machinesandvAppsintoOpenVirtualizationFormat(OVF)standardpackages.

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

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

Technical Support and Education Resources


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

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.

OVF Tool User Guide

VMware, Inc.

Using VMware OVF Tool

OpenVirtualizationFormat(OVF)isanindustrystandardthatdescribesmetadataaboutvirtualmachine imagesinXMLformat.VMwareOVFToolisacommandlineutilitythatenablesausertoimportandexport OVFpackagestoandfromawidevarietyofVMwareproducts.Thisguidecontainsthefollowingtopics: AboutVMwareOVFToolonpage 7. InstallingVMwareOVFToolonpage 11. UsingVMwareOVFToolonpage 12 ExamplesofUsingVMwareOVFToolUsageonpage 20.

About VMware OVF Tool


YoucanuseOVFTooltodistributeandimportvirtualmachinesandvApps.Forexample,youcancreatea virtualmachinewithinVMwarevSphere,anduseOVFTooltoexportitintoanOVFpackagefor installation,eitherwithinyourorganizationorfordistributiontootherorganizations.OVFfacilitatestheuse ofvApps,whichconsistofpreconfiguredvirtualmachinesthatpackageapplicationswiththeoperating systemthattheyrequire. OVFTool1.0replacesanearlierJavabasedOVFToolthatwasexperimental.OVFToolsupportsOVF version 1.0andisbackwardcompatiblewithOVF0.9thatwassupportedbytheJavabasedOVFTool, VirtualCenter2.5,andVMwareESX3.5.OVFTool1.0allowsyoutoscriptOVFimportandexporton productssuchasVMwarevCenter4.0,VirtualCenter2.5andlater,ESX3.5andlater,VMwareServer2.0and later,andVMwareWorkstation6.0andlater.

Features Highlights
OVFTool1.0providesthefollowingkeyfeatures: IncludesfullOVF1.0supportandbackwardcompatiblemodeforimportingexistingOVF0.9packages SupportsbothimportandgenerationofOVApackages(OVAistheportablevirtualmachineformatfrom XenSource.) DirectlyconvertsbetweenanyVI,VMX,orOVFsourceformattoanyVI,VMX,orOVFtargetformat AccessesOVFsourcesusingHTTP,HTTPS,orFTP,orfromalocalfile DeploysandexportsvAppconfigurationsonvSphere4targets ProvidesoptionstopoweronaVMorvAppafterdeployment,andtopoweroffavirtualmachineor vAppbeforeexporting(cautionadvised) Showinformationaboutthecontentofanysourceinprobemode ProvidescontextsensitiveerrormessagesforvSpheresourcesandtargets,showingpossiblecompletions forcommonerrors,suchasanincompletevCenterinventorypathormissingdatastoreandnetwork mappings
VMware, Inc. 7

OVF Tool User Guide

ProvidesanoptionaloutputformattosupportscriptingwhenanotherprogramcallsOVFTool UsesnewoptimizeduploadanddownloadAPI(optimizedforvSphere4) SignsOVFpackagesandvalidatesOVFpackagesignatures ValidatesXMLSchemaofOVF1.0descriptors

OVF Standard
TheOVFspecificationdescribesasecure,portable,efficient,andflexiblemethodtopackageanddistribute virtualmachinesandcomponents.ItoriginatedfromtheDistributedManagementTaskForce(DMTF)after vendorinitiative.CompaniesthatcontributedtothestandardincludeDell,HP,IBM,Microsoft,VMware,and Citrix.Version1.0waspublishedinApril2009andisavailableontheDMTFWebsite,alongwithawhite paper. Specification:http://www.dmtf.org/standards/published_documents/DSP0243_1.0.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. Virtualhardwarevalidation.OVFsupportsfastandrobusthardwarevalidation.Youdonothaveto installacompletevirtualmachinebeforedeterminingwhetheritiscompatiblewithanESXhost(for example,becauseitusesIDEvirtualdisks). Metadatainclusion.Additionalmetadata,suchasanenduserlicenseagreement,canbepackagedwith theOVFanddisplayedbeforeinstallation. OptimizeddownloadfromtheInternet.Largevirtualdisksarecompressedforfastdownloadandto reducediskspaceforlargetemplatelibraries.

VMware Platforms Using OVF


VMwaresupportsOVFonthefollowingplatforms: ForVirtualCenter2.5andlater,andESX3.5andlater,theVIClientsupportsOVF0.9importandexport. ForvCenter4.0,VirtualCenter2.xandlater,ESX3.xandlater,VMwareServer2,Workstation5.xandlater, useOVFTool1.0documentedhere. VMwareStudio1.0andlatercangenerateOVFpackages. FormostofthecurrentVMwareproducts,youcanalsouseConvertertoimportandexportOVF. OVFsupportisbuiltintothevSphereClientthatinstallsfrom,andiscompatiblewith,vCenter4.0andESX 4.0. ItisalsobuiltintotheVIClientthatinstallsfromandiscompatiblewithVirtualCenter2.5andlater,and ESX 3.5andlater. UsingthevSphereClient4,youcanimportanOVFpackageandexportavAppintoanOVFpackage. For example,toimportanOVFpackageusingvSphereClient4: ClickFile>DeployOVFTemplate Forexample,toexportavAppintoanOVFpackageusingvSphereClient4: ClickFile>Export>ExportOVFTemplate

VMware, Inc.

Using VMware OVF Tool

UsingtheVIClient2.5,youcanimportanOVFvirtualmachineintoanESXhostandexportavirtualmachine toanOVFfile(notethatVIClient2.5islimitedtoOVF0.9).Forexample,toimportanOVFvAppintoanESX hostusingVIClient2.5: ClickFile>VirtualAppliance>Import Forexample,toexportavirtualmachinetoanOVFfileusingVIClient2.5: ClickFile>VirtualAppliance>Export OVFpackagesimportedorexportedbyOVFToolarecompletelycompatiblewithpackagesimportedor exportedbythevSphereClientortheVIClient.

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. Table contrastsavirtualmachineinVMwarefileformatwithavirtualmachineinOVFformat.OVFemploys acompressedsparseformatforVMDKfiles.Virtualdisksinthatformatcannotbeuseddirectlyforexecution withoutconversion. Table 1. 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 Totalsize 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.

VMware, Inc.

OVF Tool User Guide

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. Deltadiskcompressionnecessitatesthatsegmentsthatmightbeputinaparentdiskareatthesameoffset fromthebeginningoftheirrespectivefiles.IntheUbuntuexample,ifthesetupvariesbetweenthetwo installations,itcancompletelyoffseteachsegmentononeofthedisksfromthesegmentsontheother disk.Inthiscase,deltadiskcompressiondoesnotproduceanysignificantdiskspacesavings.Thisiswhy theexamplespecifiedcloningtheUbuntuserverbeforeinstallingtheMySQLandApacheparts, respectively. DeltadiskcompressiontakesOVFpackagesandvSphereandVMXfilesasinput,butnotOVApackages. Thedeltadiskcompressionalgorithmneedstoreadthecontentsofeachdiskuptotwotimes.Itmight makesensetoinvokeOVFToolonalocalcopyoftheOVFpackage. ThedeltadiskcompressionalgorithmalwaysgeneratesanOVFpackageinthegivenoutputdirectory. To convertthisOVFpackageintoanOVApackage,reinvokeOVFTool.

Supported Operating Systems


OVFToolsupportstheoperatingsystemsshowninTable 2. Table 2. Supported Operating Systems
Windows32bit(x86)and64bit(x86_64) WindowsXP Windows2003 WindowsVista Windows2K8 Linux32bit(x86)and64bit(x86_64) CentOS5.x FedoraCore10.x RedHatEnterpriseLinux(RHEL)5.x SUSEEnterpriseServer10.x UbuntuDesktop9.x

10

VMware, Inc.

Using VMware OVF Tool

Installing VMware OVF Tool


TheVMwareOVFToolisavailableasaninstallerorZIPfile,dependingontheoperatingsystem. To install VMware OVF Tool 1 DownloadVMwareOVFTool:
Operating System Linux32bit Linux64bit Windows32bit Download Filename VMware-OVF-Tool.sh VMware-OVF-Tool.x86_64.sh VMware-OVF-Tool.exe

Installusingthemethodforyouroperatingsystem:
Operating System Linux32bit Linux64bit Windows32bit Installation Method Runtheshellscriptas./VMware-OVF-Tool.sh Runtheshellscriptas./VMware-OVF-Tool.x86_64.sh Doubleclickontheinstaller,VMware-OVF-Tool.exe

Linux Installation Details


To install VMware OVF Tool on a Linux machine 1 Downloadtheinstallerscript(VMware-OVF-Tool.shfor32bitorVMware-OVF-Tool.x86_64.shfor64 bit). Youmustdownloadthescriptasabinaryfile;otherwisetheinstallscriptfails. 2 Makethescriptexecutable.
chmod +x VMware-OVF-Tool.sh

Runtheinstallerscript.
./VMware-OVF-Tool.sh

ThescriptisinteractiveandpromptsfortheEULAandinstallationdirectory.

Windows Installation Details


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

VMware, Inc.

11

OVF Tool User Guide

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 12. To add VMware OVF Tool to your Path environment variable ThefollowinginstructionsareforWindowsXP,butitisdonesimilarlyonotherWindowssystems. 1 2 3 4 5 RightclickMyComputer Selectproperties SelectAdvanced SelectEnvironmentVariables FindthesystemvariablecalledPathandaddtheOVFToolinstalldirectorybyselectingthevariable,click Editandaddingthetext. Forexample,thepathmightbethefollowing:
;C:\Program Files\VMware\VMware OVF Tool\

TheleadingsemicolonisnecessarytoappendtheOVFToolpathtotheexistingpathvariable.

Using VMware OVF Tool


VMwareOVFToolisacommandlineutilitythatsupportsimportingandexportingofOVFpackagesfrom ESXhostsandotherVMwareproducts.AVIlocationreferstoanylocationonaVMwareproduct,suchas vSphere,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,OVApackageorVIlocation.SeeCommandLineOptionsonpage 13forthe variousoptions. 2 Ifyouwanttospecifyadditionaloptions,typethembeforethesourceandtargetlocators.


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

3 4

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


ovftool <options> <source locator>

OVFToolprintsinformationaboutthesourcesuchashardware,EULAsandOVFproperties.

12

VMware, Inc.

Using VMware OVF Tool

UseprobemodetoexamineanOVFpackagebeforedeployingit.Forexample,youcanexaminethe downloadanddeploymentsizes,determinethesetofnetworkstobemapped,determinetheOVF propertiestobeconfigured,readtheEULA,anddeterminethevirtualhardwarerequirements.OVFTool mustaccessonlytheOVFdescriptortodisplaythisinformation,sotheoperationdoesnotrequiretheentire OVAorVMDKfilestobedownloaded.Probemodealsovalidatesthecertificateifthesourceissigned. FormoreinformationaboutProbeModeandanexampleoftheoutput,seeProbeModeonpage 24. Table 3describesthesourceandtargetlocators.Formoreinformation,seeSpecifyingaLocatoron page 16.

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

Table 4showsallthecommandlineoptions. 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 N/A Relevant Target Types N/A OVF, OVA

Option Long Name --acceptAllEulas --chunkSize

Description AcceptallEULAswithoutbeingprompted. Binaryoption. 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.

--compress

N/A

OVF, OVA

VMware, Inc.

13

OVF Tool User Guide

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


Option Short Name -ds Relevant Source Types N/A OVF, OVA Relevant Target Types VI N/A

Option Long Name --datastore --deploymentOption

Description TargetdatastorenameforaVIorvSphere deployment. DeploymentoptionsforadeployedOVF package.AnOVFpackagecancontainseveral deploymentconfigurations.Thisoptionallows youtoselectwhichconfigurationtousewhen deployingtotheVItarget. Skipsvalidationofsignatureandcertificate. Binaryoption. Selectstargetdiskformat.Commonformatsare monolithicSparse,monolithicFlat, twoGbMaxExtentSparse, twoGbMaxExtentFlat,streamOptimized,thin (VItarget),thick(VItarget) InsertstheEULAinthefirstvirtualsystemor virtualsystemcollectionintheOVF.IftheEULA isinafile,usethefollowingoptionformat: --eula@=filename PrintstheVMwareOVFToolhelpmessagewith usageinformation. DoesnotincludetheEULAintheprobeoutput. Binaryoption. IPallocationpolicyforadeployedOVFpackage. Supportedvaluesare:fixed,transient,and dhcp.InOVFdescriptors,youcanspecifya VMwarespecificIPassignmentpolicythat guidesthedeploymentprocessbyexpressing whichofthepoliciestheOVFpackagesupports. OnlyvalueslistedintheOVFdescriptorare supportedwhentheOVForOVApackageis deployed. SelectstheIPprotocoltouse.Forexample,IPv4, IPv6.AswiththeipAllocationPolicyoption, youcanspecifywhichIPversionthisOVF packageuseswhenitisdeployed.Useonlythe valueslistedintheOVFdescriptor. Selectsthelocaleforthetarget. OutputsOVFToolmessagesinamachine readableformat.Binaryoption. UsedeltadiskcompressiontocreateanOVF packagefromadisksource.Binaryoption. 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.

--disableVerification --diskMode -dm

OVF, OVA N/A

N/A VMX,VI

--eula

N/A

OVF, OVA

--help --hideEula --ipAllocationPolicy

-h

N/A OVF, OVA OVF, OVA

N/A N/A N/A

--ipProtocol

OVF, OVA

N/A

--locale --machineOutput --makeDeltaDisks --name --net -n

OVF, OVA N/A OVF,VI, VMX N/A OVF, OVA

N/A N/A Mustbe directory All N/A

14

VMware, Inc.

Using VMware OVF Tool

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


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

Option Long Name --network

Description TargetnetworkforavSpheredeployment. Use thisoptioninplaceofthe--netoption whenonlyonenetworkexistsintheOVF package.ThisoptionmapsthesymbolicOVF nametothespecifiednetworkname. Forcesoverwriteofexistingfiles.Binaryoption. EnsuresthatavirtualmachineorvAppis poweredoffbeforeimportingfromaVIsource. Binaryoption. EnsuresthatavirtualmachineorvAppis poweredoffbeforeoverwritingaVItarget. Binaryoption. PowersonavirtualmachineorvAppdeployed onaVItarget.Binaryoption. SignstheOVFpackagewiththegivenprivate key(.pemfile).Thefilemustcontainaprivate keyandacertificate. Passwordfortheprivatekey.Usedinconjunction with--privateKeyiftheprivatekeyrequires passwordauthentication.Ifrequiredbutnot specified,thetoolpromptsforthepassword. SetsapropertyinthedeployedOVFpackage. For example,--prop:<key>=<value>. Use probemodetolearnwhichpropertiesan OVFpackagecanset.Formultipleproperty mappings,repeattheoption,separatingthem withablank,forexample--prop:p1=v1 --prop:p2=v2 --prop:p3=v3. ProxyusedforHTTP,HTTPS,FTP,andVIaccess. TheproxyisexpressedastheURLtotheproxy. Forexample,forproxy.example.com,the optionvalueis: https://proxy.example.com:345 OVFToolsupportsproxiesthatrequire authentication.Ifyoudonotprovidecredentials intheURL,OVFToolpromptsforthem.

--overwrite --powerOffSource

-o

N/A VI

All N/A

--powerOffTarget

N/A

VI

--powerOn --privateKey

N/A N/A

VI OVF, OVA OVF, OVA

--privateKeyPassword

N/A

--prop

OVF, OVA

N/A

--proxy

OVF, OVA,VI

OVF, OVA,VI

--quiet --schemaValidate --skipManifestCheck --skipManifestGeneration --sourceType --targetType --version --vmFolder

-q

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

N/A N/A N/A OVF, OVA All All N/A VI

Printsnooutputtothescreenexceptforerrors. Binaryoption. ValidatesOVFdescriptoragainsttheOVF schema.Binaryoption. SkipsvalidationoftheOVFpackagemanifest. Binaryoption. SkipsgenerationoftheOVFpackagemanifest. Binaryoption. ExplicitlyexpressesthatthesourceisOVF,OVA, VMX,orVI. ExplicitlyexpressthatthetargetisOVF,OVA, VMX,orVI. ShowsversioninformationforOVFTool.Binary option. ThetargetvirtualmachinefolderinVIinventory (foradatacenter).

-st -tt -v -vf

All All N/A N/A

VMware, Inc.

15

OVF Tool User Guide

Specifying a Locator
Asourceortargetlocatorpointstosomeresource.Locatorsmustspecifyaprotocol,whichdefineshowto reachtheresource.Supportedprotocolsarefileaccess,VI,HTTP,HTTPS,andFTP. FilelocatorscanpointtoanOVFpackage(.ovfor.ova)oravirtualmachine(.vmx).HTTP,HTTPS,andFTP locatorscanpointtoOVFandOVAfiles.Theresourcetypeisdeterminedfromthefilenamesuffix,unlessone orbothoftheoptions--sourceTypeand--targetTypeareusedexplicitly. VIlocatorscanpointtovariousresourcetypes:virtualmachines,vApps,hosts,clusters,orresourcepools. For asourcelocator,theresourcetypemustbeavirtualmachineorvApp.Foratargetlocator,theresource typemustbeahost,cluster,oraresourcepool.AVIlocatorisusedforavSphereserver,vCenterServer, VMwareServer,oranESXhost. Atthecommandline,type--help locatorstodisplaytheonlinehelpforlocators. Table 5andTable 6listthedefaultextensionsofthedifferentsourceandtargettypes,aswellaswhich protocolsaresupported. Table 5. Source Locator
Source Type OVF OVA VMX VI Default File Extension .ovf .ova .vmx N/A Protocol File,HTTP,HTTPS,FTP File,HTTP,HTTPS,FTP File VI

Table 6. Target Locator


Target Type OVF OVA VMX VI File Extension .ovf .ova .vmx N/A Protocol File File File(Sourcemustbeasinglevirtualmachine) VI(IftheVItargetlocatorisonaVMwareServersystem,ordirectly onanESXhost,thesourcemustbeasinglevirtual machine)

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

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

Linux Path Syntax OnLinux,pathsarespecified,similarly,aseitherabsoluteorrelative. ThefollowingisanexampleofanabsolutepathonLinux:


/folder1/folder2/package.ovf

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

16

VMware, Inc.

Using VMware OVF Tool

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 HTTPS FTP

80 443 21

VI Locators
VIsourcelocatorspointtoavirtualmachineorvAppwithinthevirtualinfrastructure.TheVItargetlocator providesallrequiredinformationforimportinganOVFpackageorvirtualmachineintoacluster,hostor resourcepool.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 DNS MoRef Query bios ds ip dns moref Source BIOSIDofavirtualmachine Datastorepathtoavirtualmachine IPaddressofavirtualmachine DNSnameofavirtualmachine Managedobjectreference(vSphere specificidentifier)ofavirtualmachine orvApp Target BIOSIDofahost N/A IPaddressofahost DNSnameofahost Managedobjectreference(vSpherespecific identifier)ofahost,cluster,orresource pool

VMware, Inc.

17

OVF Tool User Guide

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

Partial Locators
WhenusingOVFTool,itisoftennotnecessarytospecifysourceandtargettypesaslongascertainfilename conventionsareused.Itispossibletotheignorelocatortypeandspecifythesourceandtargetexplicitlyusing thearguments--sourceType=...and--targetType=.

18

VMware, Inc.

Using VMware OVF Tool

OVFToolassumesthelocatortypebasedonthefollowingrules: Ifthenamestartswithvi://,OVFToolassumesVItype. Ifthenameendswith.ovf,OVFToolassumesOVFtype. Ifthenameendswith.vmx,OVFToolassumesVMXtype. Ifthenameendswith.ova,theOVTtoolassumesOVAtype. 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. IfthesourceisaVIlocator,andthetargetlocatorisadirectory,OVFToolassumesthatthetargetisan OVFpackage. OVFToolsupportspartialVIlocatorswhendeployingorexporting.Foranincompletelocatorpath,thetool suggestscompletionsatthecommandline.Example 1showsthecommandlinedialogwhenpartiallocators areused. Example 1. Partial 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/ > ovftool LAMP.ovf vi://localhost/Datacenter/vm/host1.foo.com

VMware, Inc.

19

OVF Tool User Guide

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

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 Usage


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.

20

VMware, Inc.

Using VMware OVF Tool

Convert VMX to a VI
YoucanconvertanyVI,orVMXsourcetoanyVI,orVMXtargetformatwithoutanintermediateOVF conversion.ThefollowingexampleusesOVFTooltodirectlyconvertaVMXfiletoaVIfile,withoutfirstdoing aVMXtoOVFconversionandthenanOVFtoVIconversion.
> 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/

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 VI


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

NOTEThisoptiondoesnotperformashutdown,wheretheoperatingsystemshutsdownbyitself.Thisis onlyapoweroffoperation.

Rename the OVF Package


YoucanrenameanOVFpackagebyconvertingtheOVFtoanOVF.Thisactionalsorenamesallthedisknames andchangesthereferencesintheOVFdescriptor.
> 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.

VMware, Inc.

21

OVF Tool User Guide

Chunk or Split OVF Package Files


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

Bytes Kilobytes Gigabytes

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 Descriptor


IfyouaregeneratingOVF1.0descriptorsmanually,youcancheckwhetherthedescriptorscomplywiththe OVF1.0.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

Ifeverythingiscorrect,OVFTooloutputstheresultofprobingtheOVF.Otherwise,alistofwarningsand errorsisshown. IMPORTANTBeingcompliantwiththeOVF1.0schemaisonlypartoftherequirementsforbeingavalidOVF package.TheschemavalidationdoesnotcheckforalltherequirementsspecifiedintheOVF1.0specification.

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.

22

VMware, Inc.

Using VMware OVF Tool

Overwrite a Running Virtual Machine or vApp from VI


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


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

Set OVF Network Mappings When Deploying to vSphere


OVFdescriptorscanusesymbolicidentifiersfornetworknames.Theseidentifiersmustbemappedtoa networkthatisavailableonthechosenVIplatform.Ifonlyonenetworkisavailableonthetargetandonlyone networkisdescribedintheOVFdescriptor,OVFToolselectsthatnetworkautomatically.Inthiscase,youdo notneedtospecifyanetworkmapping.The--netoptionhasthefollowingsyntax:
--net:<OVF network name>=<target network name>

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

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

Obtain Progress Feedback from VMware OVF Tool


Youcanhavemachinereadableprogressfeedbackdisplayedonthecommandline.Theprogressissimply writtenasthepercentagefinished.
> ovftool --machineOutput source target 0 1 3 10 ... 99 100

Cancel VMware OVF Tool While it Is Running


TocancelOVFToolwhileitisrunning,enterCtrl-C.ThishaltsOVFToolandcleansupanygeneratedfiles.

VMware, Inc.

23

OVF Tool User Guide

Probe Mode
Probemoderevealsinformationaboutthecontentofasource.YoucanprobeOVAandOVFpackages,VMX, andVIsourcetypes.Youcanusetheinformationgatheredtofindouthowitcanbeconfiguredwhenyou deployit. 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: Name: Version: Vendor: Product URL: 1.0 LAMP running PHP-Fusion 0.1 VMware Aarhus http://example.com/ovf/1.0/LAMP/readme.txt

Annotation: This vApp offers the programming environment stack: Linux, Apache, MySQL and PHP prgramming environmnent, LAMP. More specifically the vApp contains a database server running MySQL and a Web server VM running Apache2 and PHP. End-user License Agreements: Present: Yes (1) 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 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

24

VMware, Inc.

Appendix: OVF Package Signing

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

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. Example 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


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

VMware, Inc.

25

OVF Tool User Guide

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 25. 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-----

Validating an OVF Package


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

26

VMware, Inc.

Index

B
benefits of OVF 8

I
installing OVF 11 Linux details 11 Windows details 11 installing OVF Tool 11 introduction to OVF Tool 7 inventory path host or resource pool 18 virtual machine or vApp 18

C
command line, running OVF Tool from 12 command-line options 13 --compress 9 compression 9 configuration files 20

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

L
Linux path syntax for file locators 16 Linux installation of OVF 11 Linux operating systems supported 10

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

M
--makeDeltaDisks 9

O
operating systems supported 10 OVF package space requirements 9 OVF standard 8 OVF support in vSphere 8 OVF Tool adding to PATH variable 12 command-line options 13 examples 20 installation 11 installing 11 partial locators 18 running 12 running from command line 12 source and target locator definitions 13

P
partial locators command-line dialog 19 OVF Tool assumptions 18 PATH variable, adding OVF Tool 12 platforms supported 8 protocol locators, HTTP, HTTPS, FTP 17

F
feature highlights 7 file locators 16 file size comparisons 9

R
running OVF Tool after install 12

VMware, Inc.

27

OVF Tool User Guide

S
source locator definition 13 VI 17 space requirements 9 supported platforms 8

V
VI source locators definition 17 query values 18 source and target values 17 virtual machine file extensions 9 vSphere support for OVF 8

T
target locator definition 13 technical support resources 5

W
Windows path syntax for file locators 16 Windows installation details 11 Windows operating systems supported 10

U
URI, using for file locators 17 URI, using for locators 16

28

VMware, Inc.

Potrebbero piacerti anche