Sunteți pe pagina 1din 50

OVF Tool Users Guide

VMware Open Virtualization Format Tool 4.1.0

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-001734-01

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/pubs
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-2016 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

1 OverviewoftheOVFTool 9
TheOpenVirtualizationFormat 9
TheOVFStandard 9
BenefitsofOVF 9
UsingtheVMwareOVFTool 10
VMwarePlatformsUsingtheOVFStandard 10
SettingUptheOVFTool 10
OVFToolHighlights 10
ExamplesofOVFToolUse 11
ImportingandExportingOVFUsingvSphereClient
VMwareOVFToolDeltaDiskFacilities 11

11

2 UsingtheVMwareOVFTool 13
DefinitionsandCommandSyntax 13
SpecialConsideration:RunningOVFToolfromESXiinsteadofvCenter 14
SpecialConsideration:DeployingaVMtostaticDVSportgroup 14
CommandLineOptions 15
CreatingandUsingtheVMID 21
SpecifyingDiskIDtoSetSize 22
SpecifyingtheStorageProfileID 22
MoreHelpTopics 22
UsingtheLogSettings 22
SpecifyingaLocator 23
FileLocators 24
WindowsPathSyntax 24
LinuxandMacOSPathSyntax 24
UsingURIsasLocators 24
EncodingSpecialCharactersinURLLocators 24
HTTP,HTTPS,andFTPLocators 25
vSphereLocators 25
SpecifyingtheInventoryPathtoaVirtualMachineorvApp 26
SpecifyingtheInventoryPathforaCluster,Host,orResourcePool 26
vCloudDirectorLocators 26
ExamplesofvCloudLocators 27
PartialLocators 27
ConfigurationFiles 29
HandlingAuthentication 29
LaunchingtheOVFToolasaHelperProcess 30

VMware, Inc.

OVF Tool Users Guide

3 ExamplesofOVFToolSyntax 31
SupportedFileTypesandPackageFormats 31
ChangingFileorPackageFormats 32
ConvertinganOVFPackagetoanOVAArchive 33
ConvertinganOVAArchivetoOVFPackage 33
ConvertingVMXFormattoanOVFPackage 33
ConvertingVMXFormattoanOVAArchive 33
ConvertinganOVAArchivetoVMXFormat 33
ConvertinganOVFPackagetoVMXFormat 33
InstallinganESXihostfromanOVFPackage 33
InstallinganESXihostfromanOVFPackageonaWebServer 33
InstallinganESXihostorAddingFilesfromaVMXFormat 34
InstallingavCenterServerorAddingFilesfromanOVFPackage 34
ConvertingaVMonESXiorvCenterServertoanOVFPackage 34
InstallingvCenterServerfromanOVFPackageUsinganInventoryPath 34
SettingOVFPackageProperties 34
SettingOVFPropertiesWhenDeployingtovSphereorvCloudDirector 34
SettingOVFNetworkMapsWhenDeployingtovSphere 34
SettingavServiceDependency 35
ModifyinganOVFPackage 35
RenamingtheOVFPackage 35
OmittingDisksintheVMwareOVFToolOutput 35
CompressinganOVFPackage 35
ChunkingorSplittingOVFPackages 35
DeployingOVFPackages 35
DeployinganOVFPackageDirectlyonanESXiHost 36
DeployinganOVFPackagetovCenterServer 36
DeployinganOVFPackageandPoweringItOn 36
DeployinganOVFPackageintovCloudDirector 36
DeployinganOVFPackageintoavApprunWorkspace 36
ImportinganOVFPackage 36
ImportinganOVFFileintoavCloudinstance 36
ImportingaVirtualMachinefromvSpheretovCloud 37
ImportingVMXFilesintoavApprunWorkspace 37
ExportingVirtualMachinestoOVFPackages 37
ExportingaVirtualMachinefromavCloudinstancetoanOVFPackage 37
ExportingaRunningVirtualMachineorvAppfromvSphere 37
ExportingavApprunEntitytoanOVFPackage 37
DisplayingSummaryInformation 37
ValidatinganOVF1.0orOVF1.1Descriptor 38
DownloadinganOVFPackagefromaProtectedWebSite 38
UsingaProxy 38
OverwritingaRunningVirtualMachineorvAppfromvSphere 38
CancelingtheVMwareOVFToolWhileitIsRunning 38

4 OVFPackageSigning 39
CreatinganRSAPublic/PrivateKeyPairandCertificate 39
SigninganOVFPackage 40
ValidatinganOVFPackage 40

5 UsingtheVMwareOVFToolProbeMode 41
AboutOVFToolProbeMode
ExampleofProbeMode 41

41

VMware, Inc.

Contents

6 UsingtheVMwareOVFToolMachineMode 43
RunningMachineOutput 43
RunningmachineOutputinProbeMode 43
RunningmachineOutputinValidateHostMode 44
RunningmachineOutputinImporttovSphereMode 44
RunningtheMachineModeExportfromvSphereOperation 44
ExampleOutput 45
OutputfromRunningmachineOutputinProbeMode 45
OutputfromRunningmachineOutputinValidateHostMode 47
OutputfromRunningmachineOutputinImportMode 48
OutputfromRunningmachineOutputinExportMode 48

Index 49

VMware, Inc.

OVF Tool Users Guide

VMware, Inc.

About This Book

ThisOVFToolUsersGuideprovidesinformationabouthowtouseVMwareOVFTooltopackagevirtual
machinesandvAppsintoOpenVirtualizationFormat(OVF)standardpackages.

Revision History
Arevisionoccurswitheachreleaseoftheproduct,orasneeded.Arevisedversioncancontainminorormajor
changes.Table 1liststheversionsofthismanual.
Table 1. Revision History
08

Revision

Description

02/2016

MentionneedforexplicitextraConfigflagsonESXihosts.

03/2015

OVFTool4.1.0UsersGuide.AddedDVSportgroup,viUseProxyoptionforvSphere,andvCloudlocators.

12/2014

IncreasedOpenSSLcompatibilityversionto1.0.1j.Seehttp://www.openssl.org/news/vulnerabilities.html.

10/2014

OVFTool4.0.0UsersGuide.AddedallowAllExtraConfiganddecodeBase64commandlineoptions.

06/2014

OVFTool3.5.2UsersGuide.IncreasedsecurityforOpenSSL.

04/2014

OVFTool3.5.1UsersGuide.

08/2013

OVFTool3.5.0UsersGuide.Includesnewcommandlineoptions.

08/2012

OVFTool3.0.1UsersGuide.

08/2011

OVFTool2.1UsersGuide.

06/2010

OVFTool2.0.1Guide.

05/2009

OVFTool1.0Guide.

Intended Audience
ThisbookisintendedforanyonewhoneedstoconvertanOVFpackagetoavirtualmachine,oravirtual
machinetoanOVFpackage.Userstypicallyinclude:systemadministrators,softwaredevelopers,QA
engineers,andanyonewhoneedtopackageorunpackagevirtualmachinesusingopenindustrystandards.

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

Technical Support and Education Resources


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

VMware, Inc.

OVF Tool Users Guide

OVF Tool Users Forum


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

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.

Overview of the OVF Tool

OpenVirtualizationFormat(OVF)isanindustrystandardtodescribemetadataaboutvirtualmachineimages
inXMLformat.VMwareOVFToolisacommandlineutilitythathelpsusersimportandexportOVFpackages
toandfromawidevarietyofVMwareproducts.
Thischaptercontainsthefollowingtopics:

TheOpenVirtualizationFormatonpage 9

UsingtheVMwareOVFToolonpage 10

ExamplesofOVFToolUseonpage 11

The Open Virtualization Format


VMwareimplementedatoolforimportingandexportingvirtualmachinesinOVFstandardformat.

The OVF Standard


TheOVFspecificationdescribesasecure,portable,efficient,andflexiblemethodtopackageanddistribute
virtualmachinesandcomponents.ItoriginatedfromtheDistributedManagementTaskForce(DMTF)after
vendorinitiative.CompaniesthatcontributedtotheOVFstandardincludeVMware,Dell,HP,IBM,Microsoft,
XenSource,andCitrix.
Version1.1waspublishedinJanuary2010,whichsupersedesthe1.0specificationpublishedApril2009,and
isavailableontheDMTFWebsite,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.

Virtualhardwarevalidation.OVFsupportsfastandrobusthardwarevalidation.Youdonothaveto
installacompletevirtualmachinebeforedeterminingwhetheritiscompatiblewithanESXihost(for
example,becauseitusesIDEvirtualdisks).

Metadatainclusion.Additionalmetadata,suchasanenduserlicenseagreement,canbepackagedwith
theOVFanddisplayedbeforeinstallation.

OptimizeddownloadfromtheInternet.Largevirtualdisksarecompressedforfastdownloadandto
reducediskspaceforlargetemplatelibraries.

VMware, Inc.

OVF Tool Users Guide

Using the VMware OVF Tool


TheVMwareOVFToolisavailableonmanyplatformsandcanbedownloadedifnotbuiltintoaproduct.

VMware Platforms Using the OVF Standard


VMwaresupportstheOVFstandardonthefollowingplatforms:

UsetheOVFTool3.xforvSphere4.0andlater,vCloudDirector1.5,5.1,and5.5,vCloudDirector1.0(for
OVFandOVAtypesonly),vCenter2.5andlater,ESX3.5andlater,VMwareServer2,VMware
Workstation6.0andlater,andVMwareFusion3.0andlater.

OVF0.9issupportedforimportandexportbyVirtualCenter2.5andlater,andESX3.5andlater.

VMwareStudio1.0andlatercangenerateOVFpackages.

OVFsupportisbuiltintothevSphereClientthatinstallsfrom,andiscompatiblewithvCenter5.0andESXi
5.0,vCenter4.0andESX4.0.ItisalsobuiltintothevSphereClientthatinstallsfromandiscompatiblewith
VirtualCenter2.5andlater,andESX3.5andlater.ThevSphere5.1WebClientincludesthe3.xversionofthe
VMwareOVFToolaspartoftheClientIntegrationPlugin.

Setting Up the OVF Tool


YoucanfindthelatestinformationaboutSystemRequirements,supportedVMwaresoftwareandplatforms,
installation,andknownissuesbyreadingthelatestreleasenoteslocatedatthefollowingwebpage:
www.vmware.com/support/developer/ovf.

OVF Tool Highlights


TheOVFTool4.1.0providesthefollowingkeyfeatures:

SupportsimportandgenerationofOVApackages(OVAispartoftheOVFstandard,andcontainsallthe
filesofavirtualmachineorvAppinasinglefile.)

DirectlyconvertsbetweenanyvSphere,vCloudDirector,VMX,orOVFsourceformattoanyvSphere,
vCloudDirector,VMX,orOVFtargetformat

AccessesOVFsourcesusingHTTP,HTTPS,FTP,orfromalocalfile

DeploysandexportsvAppconfigurationsonvSphere4.0(andallnewer)targetsandonvCloudDirector
1.5(andallnewer)targets

ProvidesoptionstopoweronaVMorvAppafterdeployment,andtopoweroffavirtualmachineor
vAppbeforeexporting(cautionadvised)

Showinformationaboutthecontentofanysourceinprobemode

ProvidescontextsensitiveerrormessagesforvSphereandvCloudDirectorsourcesandtargets,showing
possiblecompletionsforcommonerrors,suchasanincompletevCenterinventorypathormissing
datastoreandnetworkmappings

ProvidesanoptionaloutputformattosupportscriptingwhenanotherprogramcallsOVFTool

UsesnewoptimizeduploadanddownloadAPI(optimizedforvSphere4.0andnewer)

SignsOVFpackagesandvalidatesOVFpackagesignatures

ValidatesXMLSchemaofOVF1.0andOVF1.1descriptors

ImportandexportofOVFpackagesintoavApprun1.0workspace.
FormoreinformationaboutvApprun,seehttp://labs.vmware.com/flings/vapprun.

10

VMware, Inc.

Chapter 1 Overview of the OVF Tool

Examples of OVF Tool Use


OVFimportandexportarebuiltintothevSphereClientandthevSphereWebClient,andvariousother
enterpriseorientedVMwareproducts.
ForVMwareproductswithoutbuiltinOVFsupport,orwhenyouneedtoaccomplishspecializedOVF
operations,youcandownloadtheOVFToolovertheWeb.

Importing and Exporting OVF Using vSphere Client


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

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

CreateaplainUbuntuinstallationononevirtualmachine.

Clonethevirtualmachine.

InstallApacheonthefirstvirtualmachine.

InstallMySQLonthesecondvirtualmachine.

Usingdeltadiskcompressiononthetwovirtualmachinediskscreatesaparentdiskcontainingallofthe
informationtheyshare,whichisessentiallytheentireoperationsystemandtwochilddiskscontainingthe
MySQLandApacheparts.
AplainUbuntuservercanuse400500MBofspace,andtwowoulduse8001000MBofspace.Bycontrast,
usingdeltadiskcompression,anOVFpackagewiththesetwoserversusesonly400500MB(plusthesizeof
theMySQLandApacheinstallations),whichsaves400500MBbynotduplicatingtheUbuntuserver.
Anynumberofdiskscanbecombinedcreatingvariousdisktreesandsavingmorespace.

VMware, Inc.

11

OVF Tool Users Guide

vSphere4andlatersupportthedeploymentofOVFpackagesthatcontaindeltadiskhierarchies.
Fordeltadiskcompression,keepinmindthefollowing:

12

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.

VMware, Inc.

Using the VMware OVF Tool

Thischaptercoversthefollowingtopics:

CommandLineOptionsonpage 15

SpecifyingaLocatoronpage 23

ConfigurationFilesonpage 29

TheVMwareOVFToolisacommandlineutilitythatsupportsimportingandexportingofOVFpackages,
VMXfiles,orvirtualmachinesfromESXihostsandotherVMwareproducts.

Definitions and Command Syntax


AsourcelocationorsourceURLlocatorreferstoanOVFpackage,VMXfile,orvirtualmachineinaVMware
product,suchasVMwareWorkstation,vSphereESXiHost,vSpherevCenterServer,vCloudDirector,or
vFabricDataDirector.
AtargetlocationordestinationURLlocatorspecifieseitherafilelocation,oralocationwithinaVMware
product,suchasVMwareWorkstation,vSphereESXiHost,vSpherevCenterServer,vCloudDirectoror
vFabricDataDirector.
To run VMware OVF Tool from the command line
1

Atthecommandlineprompt,runtheOVFToolasfollows
ovftool <source locator> <target locator>

<sourcelocator>and<targetlocator>arepathstothesourceandtargetforthevirtualmachine,
OVFpackage,OVApackage,orvSpherelocation.SeeCommandLineOptionsonpage 15foroptions.
Table 21describesthesourceandtargetlocators.Fordetails,seeSpecifyingaLocatoronpage 23.
Ifyouareusinganoperatingsystemwherespacesarenotallowedinpathsonthecommandline,and
needthefullpathtorunOVFTool,enclosethepathinquotesasshownbelow:
"/Applications/VMware OVF Tool/ovftool" --help

Ifyouwanttospecifyadditionaloptions,typethembeforethesourceandtargetlocators.
ovftool <options> <source locator> <target locator>

Todisplayalloptions,typeovftool -h.
Probemodeallowsyoutoinvestigatethecontentsofasource.Toinvokeprobemode,usetheovftool
commandwithonlyasourceandnotarget.OVFToolprintsinformationaboutthesourcesuchas
hardware,EULA,andOVFproperties.
ovftool <options> <source locator>

UseprobemodetoexamineanOVFpackagebeforedeployingit.Forexample,youcanexaminethedownload
anddeploymentsizes,determinethesetofnetworkstobemapped,determinetheOVFpropertiestobe
configured,readtheEULA,anddeterminethevirtualhardwarerequirements.

VMware, Inc.

13

OVF Tool Users Guide

Theprobeoperationisfast,asitonlyneedstoaccesstheOVFdescriptor.Itdoesnotneedtodownloadthe
entireOVAorVMDKfiles.Probemodealsovalidatesthecertificateifthesourceissigned.Fordetailsabout
ProbeModeandsampleoutput,seeUsingtheVMwareOVFToolProbeModeonpage 41.

Special Consideration: Running OVF Tool from ESXi instead of vCenter


IfyouaredeployingwiththeovftoolcommandfromvCenterServer,youcanusethecommandlineoptions
inthetablebelowtospecifyparameterswhenyoudeploy.
IfyouaredeployingwiththeovftoolcommandfromanESXihost,youmustinjecttheparametersintothe
resultingVMwhenitispoweredon.ThisisbecausetheESXihostlacksacachetostoretheOVFparameters,
asinvCenterServer.Therefore,youmustusethe--X:injectOvfEnvdebugoptionwiththe--poweronflag
inthecommandlineifyouaredeployingavirtualmachinefromESXi.Examplebelow.(Youcanalsodothis
usingtheCreateaVMfromanOVA/OVFoptionintheESXihostclient,thenbrowsetothe.ovafile.)
>./ovftool/ovftool\
--name="Cloudvm_2074586_with_inject"\
--X:injectOvfEnv\
--X:logFile=ovftool.log\
--X:logLevel=trivia\
--acceptAllEulas\
-ds=cl-storage-1\
-dm=thin\
--net:'Network 1=VM Network'\
--X:enableHiddenProperties\
--noSSLVerify\
--allowExtraConfig\
--machineOutput\
--prop:vami.netmask0.VMware_vCenter_Server_Appliance=255.255.255.0\
--prop:guestinfo.cis.appliance.net.prefix=24\
--prop:guestinfo.cis.appliance.net.gateway=X.X.X.123\
--prop:guestinfo.cis.appliance.time.tools-sync=True\
--prop:vami.gateway.VMware_vCenter_Server_Appliance=X.X.X.123\
--prop:guestinfo.cis.appliance.net.dns.servers=X.X.X.1,X.X.X.2\
--prop:vami.ip0.VMware_vCenter_Server_Appliance=X.X.X.145\
--prop:guestinfo.cis.appliance.root.passwd=vmware\
--prop:guestinfo.cis.appliance.net.addr=X.X.X.145\
--prop:vami.DNS.VMware_vCenter_Server_Appliance=X.X.X.1,X.X.X.2\
--prop:vami.vmname=vmc-srm-vc10\
--prop:guestinfo.cis.appliance.root.shell=/bin/bash\
--prop:guestinfo.cis.vmdir.first-instance=True\
--prop:guestinfo.cis.appliance.ssh.enabled=True\
--prop:guestinfo.cis.appliance.net.mode=static\
--prop:guestinfo.cis.appliance.net.addr.family=ipv4\
--prop:guestinfo.cis.vmdir.domain-name=vsphere.local\
--prop:guestinfo.cis.vmdir.password=vmware\
--powerOn\
--X:waitForIp\
http://<directory_w/cloudvm>/VMware-vCenter-Server-Appliance-6.0.0.XXXX-XXXXXXX_OVF10.ovf\
vi://root:pwd@vm_name

Youwillneedtoreplacethevariables(IPaddresses,buildnumbers,rootpassword,andVMnames)inthe
aboveexamplewithvaluesfromyourownsystem.

Special Consideration: Deploying a VM to static DVS port group


Atthistime,youcannotusetheOVFTooltodeployavirtualmachinetoastaticportgroup.
To work around this issue:

14

UsevCenterServertocreateanephemeralportonthedesirednetwork.

DeploytheappliancetothatportgrouponanESXihost.

Switchtheapplianceovertothatstaticportgroup.

UsevCenterServertodeletetheephemeralportgroup.
VMware, Inc.

Chapter 2 Using the VMware OVF Tool

Command-Line Options
Foreverycommand,youspecifythesourceandtargetlocators.Table 21defineseachlocatortype.
Table 2-1. OVF Tool Definitions of Source and Target Locators
Locator

Definition

<source locator>

Pathtothesource,whichmustbeeitheravirtualmachine,vApp,vApprunworkspace
entity,oranOVFpackage.
Thesourcelocatorcanbeoneofthefollowing:

<target locator>

ApathtoanOVForOVAfile(alocalfilepath,oranHTTP,HTTPS,orFTPURL).

Avirtualmachine(alocalfilepathtoa.vmx file).

AvSpherelocatoridentifyingavirtualmachineorvApponvCenter,ESXi,orVMware
Server.

AvCloudDirectorlocatoridentifyingavirtualmachineoravAppinvCloudDirector.

AlocalfilepathtoavApprunworkspaceentity.

Thetargetlocatorcanbeoneofthefollowing:

AlocalfilepathforVMX,OVF,OVA,orvApprunworkspace.

AvSpherelocatoridentifyingacluster,host,oravSpherelocation.

AvCloudDirectorlocatoridentifyingavirtualmachineoravAppinvCloudDirector.

Table 22showsallthecommandlineoptions.
Optionsperformactionsonlybetweencertainsourceandtargettypes.Table 22showswhichsourceand
targettypeseachoptionworkswith.Ifyouspecifyanoptionusinganirrelevantsourceortargettype,the
commanddoesnothing.
Alloptionscanbesetusingtheform--option=value.
Binaryoptionscanbeenabledordisabledexplicitly.Forexample:--option=true,--option=false.
Table 2-2. OVF Tool Command-Line Options
Option Long Name
--acceptAllEulas

Optional
Short
Name

Relevant
Source
Types

Relevant
Target
Types

OVF,
OVA

N/A

Description
Acceptsallenduserlicensesagreements
(EULAs)withoutbeingprompted.Binary
option.

--allowExtraConfig

Letsyouspecifytheextraconfigoptionsthat
canbeconvertedto.vmxformat.These
optionsareasecurityriskastheycontrol
lowlevelandpotentialunsafeoptionsonthe
VM.Eachoptionmustbespecifiedusinga
seriesofkeyvaluepairs(sometimesreferred
toasawhitelist).

--allowAllExtraConfig

Convertsallextraconfigoptionsto.vmx
format.Flagsmustbeexplicitlyspecifiedon
ESXihosts,butwithvCenterServer
--exportflags=extraconfigproduces
vmw:ExtraConfig.

--annotation

All

--authdPortSource

vSphere

vSphere

OverridesdefaultVMwareauthdport(902)
whenusingahostassource.

--authdPortTarget

vSphere

vSphere

OverridesthedefaultVMwareauthdport
(902)whenusingahostastarget.

VMware, Inc.

Addsannotationtovi,vmx,vapprun,
vCloud,OVF,andOVAsourcelocators.

15

OVF Tool Users Guide

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


Option Long Name

Optional
Short
Name

--chunkSize

Relevant
Source
Types

Relevant
Target
Types

N/A

OVF,
OVA

Description
Specifiesthechunksizetouseforfilesina
generatedOVForOVApackage.Thedefault
isnottochunk.
Ifyoudontspecifyaunitforthechunksize,
thechunksizeisassumedtobeinmegabytes
(mb).Acceptedunitsareb,kb,mb,gb.
Example:2gbor100kb.
Whenusingthisoption,alloutputfiles
(excepttheOVFdescriptor,manifestand
certificatefiles)areslicedintothespecified
chunksize.Thisisusefulifyouneedto
transportanOVFpackageonaseriesof
800MBCDROMs,orareonlyabletocreate
filesupto2GBonFAT32filesystems.
WhenyouusechunkingwiththeOVA
packageoption,theresultissimilartoOVF
becauseallthefilesarechunked,buttheOVA
packageisstillbeasinglefile.

N/A

--compress

OVF,
OVA

CompressesthediskwhengivenanOVFor
OVAtargetlocator.Thevaluemustbe
between1and9.Use9fortheslowest
processingtime,butbestcompression.Use1
forthefastestprocessingtime,butleast
compression.
SetsthecomputernameintheguestforaVM
usingthesyntax--computerName:<VM
ID>=<value>.

--computerName

OnlyappliestovCloudtargetsofversion5.5
ornewer.
Specifiesthedistributionofthetotalnumber
ofCPUsoveranumberofvirtualsockets
usingthesyntax--coresPerSocket:<VM
ID>=<value>.OnlyappliestovCloud
targetsofversion5.5ornewer.

--coresPerSocket

--datastore

16

-ds

N/A

vSphere

TargetdatastorenameforavSpherelocator.

--decodeBase64

EnablesBase64decodingforvaluesinthe
OVFToolcommandline.

--defaultStorageProfile

ThestorageprofileforallVMsintheOVF
package.ThevalueshouldbeanSPBMprofile
ID.OnlyappliestoVItargetsofversion5.5or
newer.

--deploymentOption

OVF,
OVA

N/A

DeploymentoptionsforadeployedOVF
package(ifthesourceOVFpackagesupports
multipleoptions.)AnOVFpackagecan
containseveraldeploymentconfigurations.
Thisoptionallowsyoutoselectwhich
configurationtousewhendeployingtothe
vSpheretarget.

--disableVerification

OVF,
OVA

N/A

Skipsvalidationofsignatureandcertificate.
Binaryoption.

VMware, Inc.

Chapter 2 Using the VMware OVF Tool

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


Option Long Name

Optional
Short
Name

Relevant
Source
Types

Relevant
Target
Types

--diskMode

-dm

N/A

VMX,
vApprun
,vSphere

Description
Selecttargetdiskformat.Supportedformats
are:monolithicSparse, monolithicFlat,
twoGbMaxExtentSparse,
twoGbMaxExtentFlat, seSparse(vSphere
target),eagerZeroedThick(vSpheretarget),
thin(vSpheretarget),thick(vSphere
target),sparse,andflat.
SetsthesizeofaVMdiskinmegabytesusing
thesyntax--diskSize:<VM ID>,<disk
instance ID>=<value>.Onlyappliesto
vCloudtargetsofversion5.5ornewer.

--diskSize

N/A

--eula

OVF,
OVA

InsertstheEULAinthefirstvirtualsystemor
virtualsystemcollectionintheOVF.Ifthe
EULAisinafile,use the format:
--eula@=filename
Specifiesthesourceofanexport.The
supportedvaluesforvSpheresourceare:mac,
uuid,andextraconfig.

--exportFlags

ThesupportedvalueforvCloudsourceis
preserveIdentity.
Youcanprovideoneormoreoptions,
separatedbycommas.
-extraConfig

N/A

All

SetsanExtraConfigelementforall
VirtualHardwareSections.Thesyntaxis
-:extraConfig:<key>=<value>
Thisoptionappliestovi,vmx,vapprun,
vCloud,ovf,andovasourcelocators

vCloud

--fencedMode

IfaparentnetworkexistsonavCloudtarget,
thisoptionspecifiestheconnectivitytothe
parent.Possiblevaluesarebridged,
isolated,allowIn,allowInOut,allowOut.

N/A

N/A

PrintstheVMwareOVFToolhelpmessage
thatliststhehelpoptions.

--hideEula

OVF,
OVA

N/A

DoesnotincludetheEULAintheOVFprobe
output.Binaryoption.

--I:morefArgs

vSphere

vSphere

Integrationoption.Interpretargumentsfor
networks,datastores,andfoldersasVIM
ManagedObjectReferenceidentifiers
(type:id)forvSpheresourceanddestination
locators.

--I:sourceSessionTicket

vSphere

vSphere

Integrationoption.Specifiesthesessionticket
usedforauthenticatingthevSpheresource
locator.

--I:targetSessionTicket

vSphere

vSphere

Integrationoption.Specifiesthesessionticket
usedforauthenticatingthevSpheretarget
locator.

--help

VMware, Inc.

-h

17

OVF Tool Users Guide

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


Option Long Name

Optional
Short
Name

--ipAllocationPolicy

Relevant
Source
Types

Relevant
Target
Types

OVF,
OVA

N/A

Description
IPallocationpolicyforadeployedOVF
package.Supportedvaluesare:dhcpPolicy,
transientPolicy, fixedPolicy, or
fixedAllocatedPolicy.
InOVFdescriptors,youcanspecifya
VMwarespecificIPassignmentpolicythat
guidesthedeploymentprocessbyexpressing
whichofthepoliciestheOVFpackage
supports.OnlyvalueslistedintheOVF
descriptoraresupportedwhentheOVFor
OVApackageisdeployed.

--ipProtocol

OVF,
OVA

N/A

SpecifieswhichIPprotocoltouse.For
example,IPv4,IPv6.Aswiththe
ipAllocationPolicyoption,youcan
specifywhichIPversionthisOVFpackage
useswhenitisdeployed.Useonlythevalues
listedintheOVFdescriptor.

--lax

OVF,
OVA

N/A

RelaxOVFspecificationconformanceand
virtualhardwarecompliancechecks.(For
advancedusersonly.)

--locale

OVF,
OVA

N/A

Selectsthelocaleforthetarget.

--machineOutput

N/A

N/A

OutputsOVFToolmessagesinamachine
readableformat.Binaryoption.

--makeDeltaDisks

OVF,
vSphere,
VMX,
vApprun

Mustbe
directory

UsedeltadiskcompressiontocreateanOVF
packagefromadisksource.Binaryoption.

--maxVirtualHardwareVersion

Themaximalvirtualhardwareversionto
generate.

--memorySize

SetsthememorysizeinmegabytesofaVM
usingthesyntax--memorySize:<VM
ID>=<value>.Example:
--memorySize:vm1=1024.Onlyappliesto
vCloudtargetsofversion5.5ornewer.

--name
--net

-n

N/A

All

Specifiesthetargetname.Defaultstothe
sourcename.

OVF,
OVA

N/A

Setsanetworkassignmentinthedeployed
OVFpackage.Forexample,--net:<OVF
name>=<target name>.OVFpackages
containsymbolicnamesfornetworknames
whichareassignedwiththisoption.
Formultiplenetworkmappings,repeatthe
option,separatingthemwithaspacefor
example, --net:s1=t1 --net:s2=t2
--net:s3=t3.
IfthetargetisvCloud5.5ornewer,afence
modecanalsobespecifiedusingthesyntax
--net:<OVF name>=<target
name>,<fence mode>.Possiblefencemode
valuesare:bridged, isolated,and
natRouted.

18

VMware, Inc.

Chapter 2 Using the VMware OVF Tool

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


Option Long Name

Optional
Short
Name

Relevant
Source
Types

Relevant
Target
Types

--network

-nw

OVF,
OVA

N/A

Description
TargetnetworkforavSpheredeployment.
Usethisoptioninplaceofthe--netoption
whenonlyonenetworkexistsintheOVF
package.ThisoptionmapsthesymbolicOVF
nametothespecifiednetworkname.
SpecifiesNICconfigurationinaVMusingthe
syntax--nic:<VM ID>,<index>=<OVF net
name>,<isPrimary>,<ipAddressingMode>
,<ipAddress>.

--nic

PossiblevaluesforipAddressingModeare:
DHCP, POOL, MANUAL,and NONE.ipAddress
isoptionalandshouldonlybeusedwhen
ipAddressingModeissettoMANUAL.
OnlyappliestovCloudtargetsofversion5.5
ornewer.
--noDisks

N/A

All

Createsanduploadsthevirtualmachineor
vAppsbutdoesnotuploadanydiskfiles.
Disksarecreatedempty.(Disablesdisk
conversion.)

--noImageFiles

N/A

All

Createsanduploadsthevirtualmachineor
vAppsbutdoesnotuploadISOfilestoa
CDROM.(Doesnotincludeimagefilesin
destination.

--noSSLVerify

SkipSSLverificationforvSphereconnections.

--numberOfCpus

SetsthenumberofCPUsforaVMusingthe
syntax--numberOfCpus:<VM ID>=<value>.
OnlyappliestovCloudtargetsofversion5.5
ornewer.
N/A

All

Forcesanoverwriteofexistingfiles.Binary
option.

--powerOffSource

vCloud,
vSphere

N/A

EnsuresthatavirtualmachineorvAppis
poweredoffbeforeimportingfromavSphere
source.Binaryoption.

--powerOffTarget

N/A

vCloud,
vSphere

EnsuresthatavirtualmachineorvAppis
poweredoffbeforeoverwritingavSphere
target.Binaryoption.

--powerOn

N/A

vCloud,
vSphere

PowersonavirtualmachineorvApp
deployedonavSpheretarget.Binaryoption.

--privateKey

N/A

OVF,
OVA

SignstheOVFpackagewiththegivenprivate
key(.pemfile).Thefilemustcontainaprivate
keyandacertificate.

--privateKeyPassword

N/A

OVF,
OVA

Passwordfortheprivatekey.Usedin
conjunctionwith--privateKeyiftheprivate
keyrequirespasswordauthentication.If
requiredbutnotspecified,thetoolprompts
forthepassword.

--prop

OVF,
OVA

N/A

SetsapropertyinthedeployedOVFpackage.
Forexample,--prop:<key>=<value>.Use
probemodetolearnwhichpropertiesanOVF
packagecanset.Formultipleproperty
mappings,repeattheoption,separatingthem
withablank,forexample--prop:p1=v1
--prop:p2=v2 --prop:p3=v3.

--overwrite

VMware, Inc.

-o

19

OVF Tool Users Guide

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


Option Long Name

Optional
Short
Name

--proxy

Relevant
Source
Types

Relevant
Target
Types

Description

OVF,
OVA,
vCloud,
vSphere

OVF,
OVA,
vCloud,
vSphere

SpecifiestheproxyusedforHTTP,HTTPS,
FTP,vSphereandvCloudaccess.Theproxyis
expressedastheURLtotheproxy.
Forexample,forproxy.example.com,the
optionvalueis:
https://proxy.example.com:345
OVFToolsupportsproxiesthatrequire
authentication.Ifyoudonotprovide
credentialsintheURL,theOVFToolprompts
youforthem.
Youcanalsousethe--X:viUseProxyoption
forvsphereandthe--X:vCloudUseProxy
optionforvcloudbutonlyifyouusethem
together.

OVF,
OVA,
vCloud,
vSphere

OVF,
OVA,
vCloud,
vSphere

EnablessupportfortheNTLMauthentication
andsecurityprotocol.NTLanManageristhe
authenticationprotocolusedonnetworksthat
includesystemsrunningtheWindows
operatingsystemandonstandalonesystems.

N/A

N/A

Printsonlyerrors.Nootheroutputissentto
thescreen.Binaryoption.

--schemaValidate

OVF,
OVA

N/A

ValidatesOVFdescriptoragainsttheOVF
schema.Binaryoption.

--shaAlgorithm

sha1,
sha256

--proxyNTLMAuth

--quiet

-q

UsethisoptiontocondenseusingaSecure
HashAlgorithm(SHA)whencreatinganOVF
package.Supportedvaluesaresha1(SHA1)
andsha256(SHA256).
Thedefaultvalueissha1.

--skipManifestCheck

OVF,
OVA

N/A

SkipsvalidationoftheOVFpackagemanifest.
Binaryoption.

--skipManifestGeneration

N/A

OVF,
OVA

SkipsgenerationoftheOVFpackage
manifest.Binaryoption.
FilepathtoaPrivacyEnhancedMail(.pem)
fileusedtoverifyvSphereconnections.

--sourcePEM

Example:--sourcePEM:<filename>.pem
--sourceSSLThumbprint

--sourceType

--storageProfile

-st

vSphere

N/A

SSLthumbprintofthesource.OVFTool
verifiestheSSLthumbprintthatitreceives
fromthesource,ifthisvalueisset.

OVF,
OVA,
VMX,
VMX,VI,
vCloud,
ISO,FLP,
vApprun

N/A

ExplicitlyexpressesthatthesourceisOVF,
OVA, VMX, VMX, vSphere, vCloud, ISO,
FLP, orvApprun.

SetsthestorageprofileforaVMusingthe
syntax--storageProfile:<VM
ID>=<value>.
OnlyappliestovCloudtargetsofversion5.5
ornewer.

--targetPEM

FilepathtoaPrivacyEnhancedMail(.pem)
fileusedtoverifyvSphereconnections.
Example:--targetPEM:<filename>.pem

20

VMware, Inc.

Chapter 2 Using the VMware OVF Tool

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


Option Long Name

Optional
Short
Name

--targetSSLThumbprint

--targetType

-tt

Relevant
Source
Types

Relevant
Target
Types

N/A

vSphere

SSLthumbprintofthetarget.OVFTool
verifiestheSSLthumbprintthatitreceives
fromthetarget,ifthisvalueisset.

N/A

OVF,
OVA,
VMX,VI,
vCloud,
ISO,FLP,
vApprun

ExplicitlyexpressthatthetargetisOVF,OVA,
VMX,VMX,vSphere,vCloud,ISO,FLP,or
vApprun.

Description

CreateonlyavAppTemplate.

--vCloudTemplate
--vService

OVF,
OVA

N/A

SetadependencyonavServiceproviderin
theOVFpackage,usingthefollowingsyntax:
--vService:<dependencyId>=<providerI
d>

--verifyOnly

All

N/A

Donotuploadthesource;justverifyit.This
onlyappliestovSphere4.

N/A

N/A

ShowsversioninformationforOVFTool.
Binaryoption.

--viCpuResource

N/A

vSphere

SpecifytheCPUresourcesettingsforVI
locatortargets.Thesyntaxis
--viCpuResource=<shares>:<reservatio
n>:<limit>

--viMemoryResource

N/A

vSphere

Specifythememoryresourcesettingsfor
vSpherelocatortargets.Thesyntaxis
--viMemoryResource=<shares>:<reservati
on>:<limit>

N/A

vSphere

ThetargetvirtualmachinefolderinvSphere
inventory(foradatacenter).

--version

--vmFolder

-v

-vf

Creating and Using the VM ID


WhentheparametersforoneofthecommandlineoptionsincludestheVMID,thisidreferstoanattributein
theOVFdescriptorfile.Specifically,itistheidattributeoftheVirtualSystemelementthatwillappearinthe
OVFfilethatdescribestheVMyouwanttocreateorcustomize.IfyouarecreatingaVM,youneedtospecify
theidinthedescriptorfile.
Forexample,theidoftheVMspecifiedinthedescriptorfragmentbelowisvm1.
<ovf:VirtualSystem ovf:id="vm1">
<ovf:Info>A virtual machine</ovf:Info>
<ovf:Name>WinServer2012</ovf:Name>
<ovf:OperatingSystemSection ovf:id="74" vmw:osType="windows8Server64Guest">
<ovf:Info>Specifies the operating system installed</ovf:Info>
<ovf:Description>Microsoft Windows Server 2012 (64-bit)</ovf:Description>
</ovf:OperatingSystemSection>
........

Forexample,youneedtousetheVMIDwhenspecifyingthesizeofthememoryforaVM.
> --memorySize:vm1=1024

IfyouarecustomizinganexistingVM,lookatthedescriptorfiletogettheVMID.
YoucanalsohavetheovftoolreadanovffileandextracttheIDsbeforeimportingordeployingit.
>ovftool --verifyOnly --machineOutput <src ovf>

VMware, Inc.

21

OVF Tool Users Guide

Specifying Disk ID to Set Size


Whenspecifyingdisksizes,youwillneedtospecifytheinstanceIDaswellastheVMID.TheinstanceIDis
thevalueofRASDInstanceIDelementofthevirtualhardwaresectionelementdescribingthediskthatshould
beresized.
<ovf:DiskSection>
<ovf:Info>Virtual disk information</ovf:Info>
<ovf:Disk ovf:capacity="4" ovf:capacityAllocationUnits="byte * 2^20"
ovf:diskId="disk1" ovf:fileRef="disk1-file"
ovf:format="http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized"/>
</ovf:DiskSection>
<ovf:VirtualSystem ovf:id="vm1">
.......
<ovf:VirtualHardwareSection>
<ovf:Info>Virtual hardware requirements</ovf:Info>
<ovf:Item>
<rasd:AddressOnParent>0</rasd:AddressOnParent>
<rasd:Description>SCSI Hard disk</rasd:Description>
<rasd:ElementName>SCSI Hard disk 1</rasd:ElementName>
<rasd:HostResource>ovf:/disk/disk1</rasd:HostResource>
<rasd:InstanceID>2000</rasd:InstanceID>
<rasd:Parent>2</rasd:Parent>
<rasd:ResourceType>17</rasd:ResourceType>
</ovf:Item>
.......

IntheaboveexamplespecifyinginstanceID2000(withoutquotes)wouldcausethediskwithiddisk1
(withoutquotes)toberesized:diskSize:vm1,2000=256(setthesizeto256).
Notethatifmultiplediskdevicesarebackedbythesamedisk(i.e.theOVFcontainsmultiplediskRASDitems
thatrefertothesamedisk)youmustspecifythenewsizeforallofthesediskelements,notjustone.Sharing
disksbetweenVMsisnotcommon,butallowedintheOVFspec.
Notethatyoucannotshrinkdisks.

Specifying the Storage Profile ID


Whenyouspecifyastorageprofile,theIDreferstotheUIDofthestorageprofileinthevCDcell.Thiscanbe
obtainedusingthevCDRESTAPI.

More Help Topics


Formorehelp,type:--help <topic>,wheretopicsare:
locators

:detailedsourceanddestinationlocatorsyntax

debug

:liststhedebugsettings

examples

:examplesofusage

config

:syntaxofconfigurationfiles

integration

:listofoptionsprimarilyusedwhenyouexecutetheovftoolfromanothertoolorshellscript

Using the Log Settings


UsetheOVFToolslogoptionsifyouarenotseeingtheresultsyouexpect.Thelogoptionsallowyoutosee
theoperationsoftheOVFTool,andsendtheresultstotheconsoleortoafile.
Twoofthemostcommonlyusedoptionsare:--X:logFileand--X:logLevel.

22

Usethe--X:logFile=<filename>optiontologthecompleteovftoolsessiontoafile

Usethe--X:logLevel=<level> optiontocontroltheverbosityofthelogs

VMware, Inc.

Chapter 2 Using the VMware OVF Tool

Forexample,youcanuseacommandsimilartothistowritetheloginafilecalledovftool-log.txt:
>ovftool --X:logFile=ovftool-log.txt --X:logLevel=verbose LAMP.ovf
vi://localhost/Datacenter/host/Cluster
Thefollowingtablelistsallofthelogoptions.
Log Option

Use option to:

X:logFile=<filename>

Loginternaleventstoaspecifiedlogfile.

X:logLevel=<level>

Loglevel.Validvaluesare:none,quiet,panic,error,warning,
info,verbose,andtrivia).

X:logToConsole

Loginternaleventstoconsole

X:logTransferHeaderData

Addtransferheaderdatatothelog.Usewithcare.Defaultvalue
isfalse

TheOVFToolincludes22otherdebugoptions,thatyoucansettoretrievespecificdata.Youcanseeallofthe
debugoptionsandtheirdefinitionsbyrunningovftool --help debug.

Specifying a Locator
Asourceortargetlocatorpointstoaspecificresource.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,oranESXihost.
Atthecommandline,type--help locatorstodisplaytheonlinehelpforlocators.
Table 23andTable 24listthedefaultextensionsofthedifferentsourceandtargettypes,aswellaswhich
protocolsaresupported.
Table 2-3. Source Locator

Source Type

Default
File
Extension

Protocol

Example

OVF

.ovf

File,HTTP,HTTPS,FTP

/ovfs/my_vapp.ovf

OVA

.ova

File,HTTP,HTTPS,FTP

/ovfs/my_vapp.ova

VMX

.vmx

File

/vms/my_vm.vmx

vApprun

N/A

File

~/my_vApprun_workspace/MyVM

vCloudDirector

N/A

HTTPS

vcloud://username:password@mycloud.org/\
org=MyOrg&vdc=MyVDC&catalog=MyCatalog\
&vapp=myVapp

vSphere

N/A

vSphere

vi://username:pass@localhost/my_datacenter/vm/\
my_vms_folder/my_vm_name

VMware, Inc.

23

OVF Tool Users Guide

Table 2-4. Target Locator


Target Type

File
Extension

Protocol

Example

OVF

.ovf

File

/ovfs/my_vapp.ovf

OVA

.ova

File

/ovfs/my_vapp.ova

VMX

.vmx

File(Sourcemustbea

/vms/my_vm.vmx

singlevirtualmachine)
vApprun

N/A

File

~/my_vApprun_workspace/MyVM

vCloudDirector

N/A

HTTPS

vcloud://username:password@mycloud.org/\
org=MyOrg&vdc=MyVDC&catalog=MyCatalog\
&vapp=myVapp

vSphere

N/A

vSphere(IfthevSphere

vi://username:pass@localhost/my_datacenter/vm/
\my_vms_folder/my_vm_name

targetlocatorisonaVMware
Serversystem,ordirectlyon
anESXihost,thesourcemust
beasinglevirtualmachine)

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)

Encoding Special Characters in URL Locators


WhenyouuseURIsaslocators,youmustescapespecialcharactersusing %followedbytheirASCIIhexvalue.
Forinstance,ifyouusea@inyourpassword,itmustbeescapedwith %40asinvi://foo:b%40r@hostname,
andaslashinaWindowsdomainname(\)canbespecifiedas %5c.

24

VMware, Inc.

Chapter 2 Using the VMware OVF Tool

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 25showsthestandardports.
Table 2-5. Standard Ports
Protocol

Port

HTTP

80

HTTPS

443

FTP

21

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

TheservernameandportcandesignateeitheravCenterserver,VirtualCenterserver,VMwareServer,oran
ESXihost.Ifyouomitcredentials,inwhichcaseOVFToolpromptsyouforthem.Defaultinstallationsof
vCenterServer,VirtualCenter,andESXiuseport443.Ifyouareusingthedefaultport,youdonotneedto
specifyit.WhenusingOVFToolagainstaVMwareServer,youmustexplicitlyspecifyport8333,whichisthe
defaultportforVMwareServer.
Thesearchtermhasthefollowingformat:
<path>[?<query>=<value>]

Ifaqueryisnotgiven,aVCinventorypathlookupisperformedusingthespecifiedpath.Otherwise,theobject
matchingthequeryisused.Themeaningofthequerydependsontheobjecttype.Table 26showsthedifferent
valuesthatyoucanuseinthequeryfield.
Table 2-6. Source and Target Values for All Query Types
Name

Query

Source

Target

BIOS

bios

BIOSIDofavirtualmachine

BIOSIDofahost

Datastore

ds

Datastorepathtoavirtualmachine

N/A

IPAddress

ip

IPaddressofavirtualmachine

IPaddressofahost

DNS

dns

DNSnameofavirtualmachine

DNSnameofahost

MoRef

moref

Managedobjectreference(vSphere
specificidentifier)ofavirtualmachine
orvApp

Managedobjectreference(vSpherespecific
identifier)ofahost,cluster,orresource
pool

Table 27showsexamplevaluesforeachquerytype.
Table 2-7. Examples of Query Values
Name

Query

Example Value

BIOS

bios

vi://localhost?bios=234290984

Datastore

ds

vi://localhost/TestDatacenter?ds=[foo]/myvm/myvm.vmx

IPAddress

ip

vi://localhost?ip=123.231.232.232

DNS

dns

vi://localhost?dns=production-vm3.example.com

VMware, Inc.

25

OVF Tool Users Guide

Table 2-7. Examples of Query Values (Continued)


Name

Query

Example Value

MoRef

moref

vi://localhost?moref=vim.VirtualMachine:vm-23423

Note:ForthesameVM,theManagedObjectReference(MoRef)willbedifferentforvCenterServerthanitisforthe
ESXihost.Forinstance,thesameVMcanhaveaMoRefofvm92invCenterServerand118intheESXihost.Alsonote
thatthesyntaxcontainsvmforavCenterServerMoRef.WhentheMotifisdefinedbyvCenterServer,youcanseeit
inthebrowseraddressanduseitdirectly.TheOVFToolscriptdoesntdefineandparsetheformatofaMoRef.

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:
vi://username:pass@localhost/my_datacenter/host/esx01.example.com

Thefollowingexampleisofaninventorypathwithaspecifiedresourcepool:
vi://username:pass@localhost/my_datacenter/host/esx01.example.com/Resources/my_resourcepool

NOTEYoumustspecifythe/host/sectionofaninventorypathwhenusingavidestinationlocator.Ifyouare
specifyingthedestinationofaresourcepool,youmustincludethe/Resources/sectionofthepath.

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

26

VMware, Inc.

Chapter 2 Using the VMware OVF Tool

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.

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,thenOVFToolassumesvAppruntype.

Similarly,sourceandtargettypescanbeinferredfromfolderlocators.OVFToolassumesthetypeusingthe
followingrules:

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/

VMware, Inc.

27

OVF Tool Users Guide

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

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/
28

VMware, Inc.

Chapter 2 Using the VMware OVF Tool

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

Youcancreatelocalorglobalconfigurationfiles.Alocalconfigurationfilehasthe.ovftoolsuffixandisread
inthefolderfromwhichyouinvokeOVFTool.Aglobalconfigurationfileisperuser.
OnpreVistaWindows,theglobalconfigurationfileisreadfromthefollowinglocation:
C:\Documents and Settings\$USERNAME\VMware\ovftool.cfg

OnpostVistaWindows,theglobalconfigurationfileisreadfromthefollowinglocation:
C:\Users\$USERNAME\AppData\Roaming\VMware\ovftool.cfg

OnLinuxandMac,theglobalconfigurationfileisreadfromthefollowinglocation:
$HOME/.ovftool (example: ~/.ovftool)

Whenusingconfigurationfiles,globallydefinedoptionsareoverwrittenbylocallydefinedandcommandline
options.Locallydefinedoptionsareoverwrittenbycommandlineoptions.Note:therearesomevariables,
suchasproxy,thatdonotallowyoutospecifytheoptionsinmultipleplaces.Iftheovftoolstopsrunningwith
theerror,already exists,itisverylikelythatyouhavespecifiedoptionsonthecommandlineandinthe
configurationfile.
Youcanusetheovftool --help configcommandtogetinformationabouthowtouseaconfigurationfile.
Inaddition,thecurrentcontentsoftheglobalconfigurationfileaswellasanylocalconfigurationfileisshown.

Handling Authentication
OVFToolgeneratesAUTHENTICATIONoutputmessagesifaccesstoaresourcerequiresausernameor
password.Forexample,aproxyserver,avSphereorvCloudlocator,oranauthenticatedURLrequire
usernamesandpasswords.OVFToolonlygeneratesAUTHENTICATIONmessagesforresourceswhere
passwordsarenotexplicitlyprovidedaspartofthelocatororascommandlinearguments.
OVFToolcanauthenticatethefollowingtypesofobjects:

sourcelocators

targetlocators

proxyServer

Forsourceandtargetlocators,youmustprovidetheusernameonthecommandline.Ifyoudonotprovidea
password,OVFToolgeneratesanAUTHENTICATIONmessageandyoumustprovidethepasswordonSTDIN.
Iftheproxyserverrequiresauthentication,youmustprovideboththeusernameandpasswordonSTDIN
OVFToolsupportsthefollowingcommandsonSTDIN:

VMware, Inc.

29

OVF Tool Users Guide

For the source password:


PASSWORDSOURCE
password
For the target password:
PASSWORDTARGET
password
For the proxy:
PASSWORDPROXY

username password

ForanexampleoftheoutputofrunningmachineOutputinauthenticationmode,seeOutputfromRunning
machineOutputinImportModeonpage 48.

Launching the OVF Tool as a Helper Process


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

30

VMware, Inc.

Examples of OVF Tool Syntax

ThischapterprovidesmanyexamplesofOVFToolusage,thataredividedintothefollowingcategories:
SupportedFileTypesandPackageFormatsonpage 31
ChangingFileorPackageFormatsonpage 32
SettingOVFPackagePropertiesonpage 34
ModifyinganOVFPackageonpage 35
DeployingOVFPackagesonpage 35
ImportinganOVFPackageonpage 36
ExportingVirtualMachinestoOVFPackagesonpage 37
DisplayingSummaryInformationonpage 37
ValidatinganOVF1.0orOVF1.1Descriptoronpage 38
DownloadinganOVFPackagefromaProtectedWebSiteonpage 38
UsingaProxyonpage 38
OverwritingaRunningVirtualMachineorvAppfromvSphereonpage 38
CancelingtheVMwareOVFToolWhileitIsRunningonpage 38
YoucanseesimilarexampleswithintheOVFTool,bytyping--help examplesonthecommandlinewhile
youareinthedirectorywheretheovftoolscriptisrunning.

Supported File Types and Package Formats


AsdiscussedinChapter1,youcanusetheOVFTooltopackagevirtualmachinesasvApps(readytouse
virtualmachineswithoperatingsystemsand/orapplications).ThepackageformatssupportedbytheOVF
Toolcanbereadand/orimportedbyotherVMwareandthirdpartysoftware.

VMware, Inc.

31

OVF Tool Users Guide

Thetablebelowdescribeseachofthesupportedformats:
Table 3-8. Supported File and Package Types for OVF Tool Input and Output
Package Type

Full Name

Usage

OVF(.ovf)

OpenVirtualizationFormat

NationalANSIstandardforpackagingsoftwareforvirtual
machines,originallycreatedbyanindustrytaskforce
knownastheDistributedManagementTaskForce(DTMF).
AnOVFpackageincludes:adescriptorfile,optional
manifestandcertificatefiles,optionaldiskimages,and
optionalresourcefiles(suchasISOs).Thediskimagefiles
canbefilesinVMwares.vmdkdiskimageformatorinany
othersupporteddiskimageformat.
OVFpackagescanbeusedbythesoftwareofany
hypervisororprocessorarchitecturethatsupportsthis
format.

OVA(.ova)

OpenVirtualAppliance

ATARarchivethatcontainsanOVFpackage.

VMX(.vmx)

VirtualMachine
ConfigurationFile

Whenyoucreateanewvirtualmachine,thisfileiscreated
tostoreinformationabouttheoperatingsystem,disksizes,
networking,andvirtualhardware.
Filesinthisformatandthe.vmdkformataresometimes
referredtotogetheras,VMwareruntimeformat.

VMDK(.vmdk)

VirtualMachineDisk

Fileswiththisextensionmaycontaindiskcharacteristics
(,vmdk),contents(flat.vmdk),orsnapshotfiles
(delta.vmdk).ThesefilesarecalledoutontheOVFTool
commandline,butmayexistwithinthepackage.

VI(vi://)

VMwareInfrastructure

ThisisanoldertermthatoriginatedwithESX3,butisstill
seeninthecommandlinesyntaxfortheOVFTool.Asan
OVFcommandlineoption,vi//isusedbeforethe
credentialsandpathtoaserver.

vCloud

vCloudDirectorformat

ThevCloudDirectorRESTAPImakesbasictransfer
betweencloudspossibleusingOVFpackages,which
preserveapplicationproperties,networkingconfiguration
andothersettings.

ISO(.iso)

OpticalImageFile

AnISOarchiveisaCD/DVDimage.Creatingapackageas
anISOimageallowsyoutoinstallavirtualapplianceusing
aCDROMdrive.
ThistypeofarchiveiscalledanISObecauseitwascreated
bytheInternationalStandardsOrganizations9660
standard.

FLP(.flp)

FloppyDiskImageFile

Usethisformatifyouneedtotransferdatafromafloppy
driveortothevirtualmachinefloppydrive.Instructionsare
availableinKnowledgeBasearticle1739.

vApprun

vApprun

Thisformatallowsyoutorunavirtualapplianceon
VMwareWorkstationorFusion.YoucanusetheOVFTool
toconvertvAppstothevApprunformat,andyoucanuse
VMwareWorkstationtoconvertvAppstoanOVFformat.

UsetheOVFToolwiththeTargetTypeoptiontospecifythetargetoutasOVF,OVA,VMX,VI,vCloud,ISO,
FLP,vApprun.
Inthisfollowingexample,thetargettypeissettothevmxorVMwareruntimeformat(.vmxand .vmdkfiles)
> ovftool -tt=vmx /ovfs/my_vapp.ovf /vms/

Theresultingfilesare:/vms/my_vapp/my_vapp.vmx and/vms/my_vapp/my_vapp.vmdk files (like the


contents of a typical virtual machine directory).

Changing File or Package Formats


Theexamplesbelowshowyouhowtoconvertfromanexistingformattoadifferentformat.

32

VMware, Inc.

Chapter 3 Examples of OVF Tool Syntax

Converting an OVF Package to an OVA Archive


ToconvertanOVFpackage,toasingleOVAarchive,usethefollowingsyntax:
> ovftool

/ovfs/my_vapp.ovf /ovfs/my_vapp.ova

Converting an OVA Archive to OVF Package


ToextractanOVAarchivetoanOVFpackage,usethefollowingsyntax:
> ovftool

/ovfs/my_vapp.ova /ovfs/my_vapp.ovf

Converting VMX Format to an OVF Package


ToconvertavirtualmachineinVMwareruntimeformat(.vmxand .vmdkfiles)toanOVFpackage,usethe
followingsyntax:
> ovftool /vms/my_vm.vmx /ovfs/my_vapp.ovf

Theresultislocatedin/ovfs/my_vapp.ovf

Converting VMX Format to an OVA Archive


ToconvertVMXfilestoanOVAarchive,usethefollowingsyntax:
> ovftool vmxs/Nostalgia.vmx ovfs/Nostalgia.ova

Converting an OVA Archive to VMX Format


ToconvertanOVAarchivetoVMwareruntimeformat(.vmxand .vmdkfiles),usethefollowingsyntax:
> ovftool https://my_ovf_server/ovfs/my_vapp.ova /vm/my_vm.vmx

Converting an OVF Package to VMX Format


ToconvertanOVFpackagetoVMwareruntimeformat(.vmxand .vmdkfiles),usethefollowingsyntax:
> ovftool http://www.mycompany.com/ovflib/BigDemo.ovf x:/myvms/BigDemo.vmx

BecausethesourceisanOVFpackage,youcanspecifyitasaURLoralocalfilepath.
IfyouconvertanOVFpackagetoaVMXformatwithoutspecifyingthetargetdirectory,OVFToolcreatesa
directoryusingtheOVFpackagenameandwritesthe.vmxand.vmdkfilesinit.
> ovftool "Windows 7.ovf" .

TheVMXfileiswrittenatWindows 7/Windows 7.vmx.


YoucanalsoconvertfromanovfformattoavmxformatusingaURL,asshown:
> ovftool https://my_ovf_server/ovfs/my_vapp.ova /vm/my_vm.vmx

Installing an ESXi host from an OVF Package


ToinstallanOVFpackageasanESXihost,usethefollowingsyntax:
> ovftool /ovfs/my_vapp.ovf vi://username:pass@my_esx_host

(Usesdefaultmappings.)

Installing an ESXi host from an OVF Package on a Web Server


ToinstallanOVFpackageonawebserverasanESXihost,usethefollowingsyntax:
> ovftool http://my_ovf_server/ovfs/my_vapp.ovf vi://username:pass@my_esx_host

(Usesdefaultmappings.)

VMware, Inc.

33

OVF Tool Users Guide

Installing an ESXi host or Adding Files from a VMX Format


ToinstallanESXihostfromaVMwareruntimeformat(.vmxand .vmdkfiles),ortoadd .vmxfilestoanESXi
host,usethefollowingsyntax(usesdefaultmappings):
> ovftool /ovfs/my_vm.vmx vi://username:pass@my_esx_host
> ovftool Nostaliga.vmx vi://user:pwd@host/Datacenter/host/host1.foo.com

Installing a vCenter Server or Adding Files from an OVF Package


ToinstalloraddfilestoavCenterServerfromanOVFpackage,usethefollowingsyntax(usesamanagedESXi
hostsIPaddress):
> ovftool /ovfs/my_vapp.ovf vi://username:pass@my_vc_server/?ip=10.20.30.40

Converting a VM on ESXi or vCenter Server to an OVF Package


ThisexampleusesadatastorelocationquerytoconvertaVM(locatedonavCenterServer)toOVFformat.
> ovftool vi://username:pass@my_vc_server/my_datacenter?ds=[Storage1] foo/foo.vmx c:\ovfs\

or
> ovftool vi://username:pass@my_host/my_datacenter/vm/my_vm_folder/my_vm_name /ovfs/my_vapp.ovf

Installing vCenter Server from an OVF Package Using an Inventory Path


ThisexampleusesavSphereinventorypathtoinstalloraddfilestoavCenterServerfromanOVFpackage.
> ovftool /ovfs/my_vapp.ovf vi://username:pass@my_vc_server/my_datacenter/host/my_host

Setting OVF Package Properties


ThefollowingsectionsshowyouhowtosetpropertiesforOVFpackages.

Setting OVF Properties When Deploying to vSphere or vCloud Director


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

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

Setting OVF Network Maps When Deploying to vSphere


OVFdescriptorscanusesymbolicidentifiersfornetworknames.Theseidentifiersmustbemappedtoa
networkthatisavailableonthechosenvSphereplatform.Ifonlyonenetworkisavailableonthetargetand
onlyonenetworkisdescribedintheOVFdescriptor,OVFToolselectsthatnetworkautomatically.Inthiscase,
youdonotneedtospecifyanetworkmap.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>

34

VMware, Inc.

Chapter 3 Examples of OVF Tool Syntax

Setting a vService Dependency


Youcandependencysothatyourapplicationdeploysasaserviceusingthefollowingoption:
ovftool --vService:vDep1=provider_1 /ovfs/my_vapp.ovf
vi://username:pass@localhost/my_datacenter/host/esx01.example.com

Modifying an OVF Package


ThefollowingsectionsshowyouhowtomodifyOVFpackages.

Renaming the OVF Package


YoucanrenameanOVFpackagebyconvertingtheOVFtoanOVF.Thisactionalsorenamesallthedisknames
andchangesthereferencesintheOVFdescriptor.
> ovftool Windows 7.ovf win7.ovf

Omitting Disks in the VMware OVF Tool Output


IfyouwantonlyinformationabouttheOVFdescriptorandnotaboutthedisksthatitrefersto,youcan
suppressoutput.ThefollowingexamplecommandomitsdiskoutputandsimplycopiestheOVFdescriptor
andanymessagebundlefilesthatmightbeassociatedwithit:
> ovftool --noDisks http://example.com/ovf/InterestingVirtualAppliance package.ovf

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

Chunking or Splitting OVF Packages


Somefilesystemshavearestrictiononmaximumfilesize.Forexample,FAT32allowsfilesonlyupto2GB.You
cansplittheOVFfilesfromageneratedpackageintopiecesofaspecifiedmaximumsize.Thedefault
measurementismegabytes(keywordmb).Youcanspecifyotherunitsusingoneofthefollowingkeywords:
Unit

Keyword

Bytes

Kilobytes

kb

Gigabytes

gb

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

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

Deploying OVF Packages


ThefollowingsectionsshowyouhowtodeployOVFpackages.

VMware, Inc.

35

OVF Tool Users Guide

Deploying an OVF Package Directly on an ESXi Host


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

Ifyourhosthasmultipledatastores,usethedsoption:
> ovftool package.ovf -ds=storage1 vi://my.esx-machine.example.com/

SeealsoSpecialConsideration:RunningOVFToolfromESXiinsteadofvCenteronpage 14.

Deploying an OVF Package to vCenter Server


ThefollowingcommanddeploystestVM.ovffromalocalWindowsdisktoadatastorenamedstorage1inhost
(12.98.76.54)fromvCenter(12.34.56.789).theVMwillbenamedmyVMonthehost.(Totestthisonyoursystem,
replacetheincorrectIPaddressesinthisexamplewithyouractualdatastoreandhostIPaddresses.)
> ovftool -ds=storage1 -n=myVM C:\testVM.ovf vi://user1:passwd@12.34.56.789/?ip=12.98.76.54.

Deploying an OVF Package and Powering It On


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

Deploying 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"

Deploying an OVF Package into a vApprun Workspace


AvApprunworkspaceallowsWorkstationandFusionuserstorunvApps.ItprovidesacompletevApprun
executionenvironment,thatincludesnestedvApps,OVFproperties,andanOVFenvironment.The
environmentisfullycompatiblewithvSphere4andalllaterreleases.
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.

Importing an OVF Package


ThefollowingsectionsshowyouhowtoimportOVFpackages.

Importing an OVF File into a vCloud instance


ThissectionprovidestwoexamplesofimportingusingaURLtocreateavCloudinstancefromanOVFfile.
ThefirstexamplenamestheresultingvAppasvApp.
> ovftool http://my_ovflib/vm/my_vapp.ovf \
vcloud://username:pass@my_cloud?org=MyOrg&vdc=MyVDC&catalog=MyCatalog&vapp=myVapp

(ImportsanOVFfromhttpintoavCloudinstanceandnamesthevAppmyVapp)

36

VMware, Inc.

Chapter 3 Examples of OVF Tool Syntax

ThesecondexamplealsocreatesavApptemplate:
> ovftool http://my_ovflib/vm/my_vapp.ovf \
vcloud://username:pass@my_cloud?org=MyOrg&vdc=MyVDC&catalog=MyCatalog&vappTemplate=myTemplate

(ThisimportsanOVFfromhttpintoavCloudinstanceandcreatesavApptemplate)

Importing a Virtual Machine from vSphere to vCloud


ThefollowingcommandimportsavirtualmachinefromvSphereintoavCloudinstanceandnamesthe
resultingvAppmyVapp.
> ovftool vi://username:pass@my_host/my_datacenter/vm/my_vm_folder/my_vm_name \
vcloud://username:pass@my_cloud?org=MyOrg&vdc=MyVDC&catalog=MyCatalog&vapp=myVapp

Importing VMX Files into a vApprun Workspace


ToimportaVMXformatintoavApprunworkspace,usethefollowingsyntax:
> ovftool /virtualmachines/MyVM.vmx ~my_vApprun_workspace/

Exporting Virtual Machines to OVF Packages


ThefollowingsectionsshowyouhowtoexportvirtualmachineswithinOVFpackages.

Exporting a Virtual Machine from a vCloud instance to an OVF Package


ThefollowingcommandexportsaVirtualMachinefromavCloudinstanceintoanOVFpackage.
> ovftool vcloud://username:pass@my_cloud?org=MyOrg&vdc=MyVDC&catalog=MyCatalog&vapp=myVapp \
/ovfs/myVapp.ovf

Exporting a Running Virtual Machine or vApp from vSphere


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

NOTEThisoptiondoesnotperformashutdownoftheoperatingsystem.Thisisonlyapoweroffoperation.

Exporting a vApprun Entity to an OVF Package


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

Prependthenameoftheentitytoexporttothepath.IfthecurrentdirectoryisthevApprunworkspace,you
onlyspecifythename,asshowninthefollowingexample.Thisexampletakesadvantageofthefactthatany
sourcelocatorcanbeusedwithanydestinationlocator.Thus,thevApptransfersdirectlyfromthevApprun
workspacetothevCenterinstallation.
> ovftool BigDemo vi://MyvCenterServer/...

NOTEvApprundoesnotkeepthesamelevelofmetadataaroundasvSphere.Thus,thevAppruncreated
OVFpackageswillnotcontainanyEULAs,descriptionofproperties,andsuch.

Displaying Summary Information


TodisplayasummaryofinformationabouttheOVFpackage[inprobemode],usethefollowingsyntax:
> ovftool https://my_ovflib/vm/my_vapp.ovf

(showssummaryinformationabouttheOVFpackage[probemode])
VMware, Inc.

37

OVF Tool Users Guide

Validating an OVF 1.0 or OVF 1.1 Descriptor


IfyouaregeneratingOVF1.0orOVF1.1descriptorsmanually,youcancheckwhetherthedescriptorscomply
withOVF1.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

Ifeverythingiscorrect,OVFToolshowstheresultofprobingOVF.Otherwise,itshowswarningsanderrors.
IMPORTANTBeingcompliantwithOVF1.0or1.1isonlypartoftherequirementsforavalidOVFpackage.
SchemavalidationdoesnotcheckforalltherequirementsspecifiedintheOVF1.0andOVF 1.1specifications.

Downloading an OVF Package from a Protected Web Site


TheOVFToolcanreadsourcesgivenbyaURLusingbothHTTPandHTTPS.Youaccessitwiththeusername
andpassword.ThefollowingexampledownloadstheLAMPOVFpackageandputsitinanOVApackage.If
youomittheusernameandpassword,theOVFToolwillpromptyouforthem.
> ovftool https://user:pass@example.com/repository/ovf/LAMP.ovf LAMP.ova

Using a Proxy
YoucanspecifyaproxyfortheOVFTool.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

TheOVFToolallowsproxiesthatrequireauthentication.Credentialsaresuppliedintheproxypathasshown
inthefollowingexample:
> ovftool --proxy=user:pass@proxy.example.com http://external-site.com/ovf/package.ovf

Youcanomittheusernameandpasswordforaproxyserverthatrequiresauthentication.OVFToolprompts
forthem.IfyouareusingvSphereorvCloudasthelocatorforasourceortarget,youhavetoaddtheUseProxy
option:--X:viUseProxyforvSphereor--X:vCloudUseProxyforvCloud.
> ovftool --X:viUseProxy --proxy=proxy.example.com package.ovf vi://my.esx-machine.example.com/
> ovftool --X:vCloudUseProxy --proxy=proxy.example.com package.ovf
"vcloud://USERNAME:PASSWORD@example.com:443/?org=myOrg&vapp=test&vdc=orgVdc&catalog=catalog"

Overwriting a Running Virtual Machine or vApp from vSphere


TheOVFToolsupportsoverwritingexistingtargets.IfatargetvirtualmachineorvApphasthesamenameas
thesource,OVFTooloverwritesthetargetwhenthe--overwriteoptionisspecified.Ifthetargetvirtual
machineorvAppisrunning,OVFToolcannotoverwriteit.OVFTooldoesnotautomaticallypoweroffthe
target.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

Canceling the VMware OVF Tool While it Is Running


TocancelOVFToolwhileitisrunning,typeCtrl-C.ThishaltsOVFToolandcleansupanygeneratedfiles.

38

VMware, Inc.

OVF Package Signing

AvalidOVFsignaturerequirestwospecialfiles,amanifest(.mf)filethatcontainstheSHA1hashcodesofall
thefilesinthepackage(exceptthe.mfand.certfiles),andacertificatefile(.cert)thatcontainsthesigned
SHA1ofthemanifestfileandtheX.509encodedcertificate.ThisappendixspecifieshowtouseOpenSSLand
VMwareOVFToolscommandstosignandvalidateOVFpackages.
Thisappendixcontainsthefollowingtopics:

CreatinganRSAPublic/PrivateKeyPairandCertificateonpage 39

SigninganOVFPackageonpage 40

ValidatinganOVFPackageonpage 40

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 41showsthecontentsofthemyself.pemfile.
Example 4-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
Thecontentsofthefiledisplayasfollows:
Certificate:
Data:
Version: 3 (0x2)
Serial Number:

VMware, Inc.

39

OVF Tool Users 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 39.
TosignageneratedOVFpackage,includetheprivateKeyoption.Theoptionsyntaxisshowninthefollowing
example:
> ovftool --privateKey=<path to .pem file> <source> <output OVF or OVA file>

Whenthisoptionisused,OVFToolusestheprivatekeyandcertificatetogenerateasignaturebasedonthe
SHA1digestofeachfilethatisincludedintheOVFpackage,includingtheOVFdescriptoritself.
OVFToolgeneratesanadditional.certfilewithasignedSHA1signatureandthecertificateusedtosignit.
Example 42showsanexampleofthe.certfilegeneratedbyOVFTool.
Example 4-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

40

VMware, Inc.

Using the VMware OVF Tool Probe Mode

Thischapterincludesthefollowingtopics:

AboutOVFToolProbeModeonpage 41

ExampleofProbeModeonpage 41

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

Example of Probe Mode


ThefollowingexampleshowstheresultofprobingtheLAMP.ovfpackage.
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
VMware, Inc.

41

OVF Tool Users Guide

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

42

VMware, Inc.

Using the VMware OVF Tool Machine Mode

Youcanusethe--machineOutputoptiontorunOVFToolfromanotherprogramorscript.Withthe
--machineOutputoption,OVFToolprovidesoutputinthefollowingformat:
STATUS-CODE details <blank line>.
OVFToolinsertsablanklinetosignaltheendofanoperation.Eachresponselineisprefixedwithaplus(+)
toavoidconfusionwiththeterminatingblankline.ThelaststatusitsendsisalwaysRESULT.OVFToolsends
alloutput,includingerrorsandwarnings,tostandardoutput(stdout)soclientscanlistenononlyonestream.
Table 6-9. Machine Mode Status
Status

Details

Description

PROBE

XML

Proberesultwithinformationaboutthe
source.

VALIDATEHOST

XML

ShowswhethertheVItargetis
compatiblewiththeinputarguments.

AUTHENTICATION

source/target/proxyserverlocatororfileName

Showsthatauthenticationisrequired.

CERTIFICATE

Validate,Self-signed,orFailed validate

Signalsthatacertificateispresentand
showstheresultofthevalidation.

MANIFEST

ValidateorFailed validate

Signalsthatamanifestispresentand
showstheresultofvalidation.

PROGRESS

Number(0100)

Showsthepercentageprogressduring
uploadanddownload.

TARGET_ID

Text,forexampleSugarCRM.ovfor
vim.VirtualMachine:vm-415.

ShowsthetargetIDafteruploadand
downloadfinishes.

RESULT

ERRORorSUCCESS

Alwaysuseasthelastcommandsent.

Running Machine Output


Youcanrunthe--machineOutputoptionindifferentmodes:Probe,Validatehost,Import,andExport.

Running machineOutput in Probe Mode


WhenyourunthemachineOutputoptioninprobemode,OVFToolreportsthefollowingstatussequence:
1

AUTHENTICATION(zeroormore)

PROBE(exactlyone)

RESULT(exactlyone)

TorunthemachineOutputoptioninprobemode,yourunthefollowingcommand.
ovftool.exe --machineOutput source_locator
Foranexample,seeOutputfromRunningmachineOutputinProbeModeonpage 45.
VMware, Inc.

43

OVF Tool Users Guide

Running machineOutput in Validate Host Mode


WhenyourunmachineOutputinvalidatehostmode,OVFToolreportsthefollowingstatussequence:
1

AUTHENTICATION(zeroormore)

VALIDATEHOST(exactlyone)

PROGRESS(exactlyone)

TARGET_ID(exactlyone)

RESULT(exactlyone)

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

Foranexample,seeOutputfromRunningmachineOutputinValidateHostModeonpage 47.

Running machineOutput in Import to vSphere Mode


WhenyourunthemachineOutputoptioninimportmode,OVFToolreportsthefollowingstatussequence:
1

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

\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\

Foranexample,seeOutputfromRunningmachineOutputinImportModeonpage 48.

Running the Machine Mode Export from vSphere Operation


WhenyourunthemachineOutputoptioninexportmode,OVFToolreportsthefollowingstatussequence:

44

AUTHENTICATION(zeroormore)

MANIFEST(zeroorone)

CERTIFICATE(zeroorone)

PROGRESS(oneormore)

TARGET_ID(exactlyone)
VMware, Inc.

Chapter 6 Using the VMware OVF Tool Machine Mode

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.
Foranexample,seeOutputfromRunningmachineOutputinExportModeonpage 48.

Example Output
YoucanruntheOVFToolmachinemode --machineOutputoptioninprobemode,validatehostmode,or
importmode.InimportandvalidateHostmodes,--machineOutputismeantforthirdpartyprogramtouse
silentlywithoutanyinteractivepromptappearinginthestandaloneOVFtoolcommandconsole.IfyourOVF
filecontainsEULAinformation,youshouldaddthisoption--acceptAllEulassothattheprogramdoesnt
pausetowaitforacceptanceofthelicenseagreement.Thissectioncontainsthefollowingtopics:

OutputfromRunningmachineOutputinProbeModeonpage 45

OutputfromRunningmachineOutputinValidateHostModeonpage 47

OutputfromRunningmachineOutputinImportModeonpage 48

OutputfromRunningmachineOutputinExportModeonpage 48

Output from Running machineOutput in Probe Mode


Thefollowingexampleshowstheoutputofa--machineOutputPROBEoperationonafilenamedLAMP.ovf.
Example 6-3. 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>
+

VMware, Inc.

45

OVF Tool Users Guide

+ </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>
+ <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

46

VMware, Inc.

Chapter 6 Using the VMware OVF Tool Machine Mode

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

</key>
<instanceId>
</instanceId>
<category>
</category>
<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

Output from Running machineOutput in Validate Host Mode


Thefollowingexampleshowstheoutputofa--machineOutputVALIDATEHOSToperationonfileLAMP.ovf.
Example 6-4. 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

VMware, Inc.

47

OVF Tool Users Guide

+
RESULT
+ SUCCESS

Output from Running machineOutput in Import Mode


Thefollowingexampleshowstheoutputofa--machineOutputimportoperationonafilenamedLAMP.ovf.
Example 6-5. 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


Thefollowingexampleshowstheoutputofa--machineOutputexportoperationonafilenamedLAMP.ovf.
Example 6-6. Output from Running machineOutput in Export Mode
ovftool -o --machineOutput --acceptAllEulas
/tmp/LAMP.ovf
PROGRESS
+ 0
+ 1
+ 2
+ 3
...
+ 98
+ 99
+ 100

vi://myuser:mypassword@myvc.example.com/dc/vm/LAMP

TARGET_ID
+ /tmp/LAMP.ovf
RESULT
+ SUCCESS

48

VMware, Inc.

Index

benefits of OVF 9

Linux
path syntax for file locators 24

C
command-line options 15
--compress 11
compression 11
configuration files 29

Output from Running machineOutput in Probe


Mode 45
Output from Running machineOutput in Validate
Host Mode 47
OVF standard 9
OVF support in vSphere 10
OVF Tool
command-line options 15
partial locators 27
source and target locator definitions 15
OVT Tool as a helper process, integration options 30

delta disk compression


introduction 11
limitations 12

E
examples
cancelling OVF Tool while running 38
chunking 35
convert .ova to .vmx 33
convert .ovf to .vmx 33, 34
convert .vmx to .ova 33
convert .vmx to .ovf 33
deploying and powering on 36
deploying OVF package 36
downloading from a protected site 38
exporting a running virtual machine or vApp 37
maximum compression 35
omitting disks in output 35
overwriting a running virtual machine or
vApp 38
renaming the OVF package 35
setting OVF network mappings 34
setting OVF properties 34
using a proxy 38
validating 38

F
feature highlights 10
file locators 24
Forum 8

I
integration options 30
inventory path
host or resource pool 26
virtual machine or vApp 26

VMware, Inc.

Machine Mode Operations 43


--makeDeltaDisks 11

P
partial locators
command-line dialog 27
OVF Tool assumptions 27
Partial vCloud DirectorLocators at the Command
Line 28
platforms supported 10
protocol locators, HTTP, HTTPS, FTP 25

S
source locator
definition 15
vSpherer 25
supported platforms 10

T
target locator
definition 15
technical support resources 7

U
URI, using for file locators 24
URI, using for locators 24

V
vApprun

49

OVF Tool Users Guide

deploying an OVF package to 36


exporting a vApprun entity to an OVF
package 37
vCloud Director locators 26
vSphere source locators
query values 25
source and target values 25
vSphere support for OVF 10
vSphereI source locators
definition 25

W
Windows
path syntax for file locators 24

50

VMware, Inc.

S-ar putea să vă placă și