Partial Locators
When using OVF Tool, it is often not
necessary to specify source and target types as long as certain filename
conventions are used. It is possible to the ignore locator type and specify the
source and target explicitly using the arguments
--sourceType=
... and
--targetType=
.
OVF Tool assumes the locator type based on the
following rules:
- If the name starts withvcloud://, OVF Tool assumes vCloud Director type.
- If the name starts withvi://, OVF Tool assumes vSphere type.
- If the name ends with.ovf, OVF Tool assumes OVF type.
- If the name ends with.vmx, OVF Tool assumes VMX type.
- If the name ends with.ova, the OVF tool assumes OVA type.
- If the locator is a file path to a directory that represents a vApprun workspace or an entity in a vApprun workspace, then OVF Tool assumes vApprun type.
Similarly, source and target types can be inferred
from folder locators. OVF Tool assumes the type using the following rules:
- If the source locator is a folder, OVF Tool assumes that the source is an OVF package and that the OVF descriptor is called the same as the folder, for example,my-ovf/my-ovf.ovf.
- If the source is an OVF package and the target locator is a directory, such asMyVirtualMachines/, OVF Tool assumes that the target is a VMX locator. The created VMX/VMDK file is put in a directory with the target name, for example,MyVirtualMachines/MyVM/MyVM.vmx.
- If the source is a VMX locator and the target locator is a directory, OVF Tool assumes that the target is an OVF package.
- If the source is a vSphere locator, and the target locator is a directory, OVF Tool assumes that the target is an OVF package.
OVF Tool supports partial vSphere locators when
deploying or exporting. For an incomplete locator path, the tool suggests
completions at the command line.
Partial vSphere Locators at the Command Line
shows the command-line dialog when partial locators are used.
Partial vSphere
Locators at the Command Line
> ovftool LAMP.ovf vi://localhost/ Opening source: LAMP.ovf Opening target: vi://user@localhost/ Error: Found wrong kind of object (Folder) Possible completions are: Datacenter/ Remote Datacenter/ Secondary Datacenter/ > ovftool LAMP.ovf vi://localhost/Datacenter Opening source: LAMP.ovf Opening target: vi://user@localhost/Datacenter Error: Found wrong kind of object (Datacenter) Possible completions are: vm/ host/ > ovftool LAMP.ovf vi://localhost/Datacenter/host Opening source: LAMP.ovf Opening target: vi://user@localhost/Datacenter/host Error: Found wrong kind of object (Folder) Possible completions are: host1.foo.com/ host2.foo.com/ > ovftool LAMP.ovf vi://localhost/Datacenter/vm/host1.foo.com
OVF Tool supports partial vSphere locators when
deploying or exporting. For an incomplete locator path, the tool suggests
completions at the command line.
Partial vCloud DirectorLocators at the Command Line
shows the command-line dialog when partial locators are used. First, OVF Tool
signals that there is more than one virtual datacenter present, then multiple
catalogs, then multiple networks. At each attempt, you must select one of the
options that OVF Tool presents.
Partial vCloud
DirectorLocators at the Command Line
ovftool LAMP.ovf vcloud://jd:PASSWORD@example.com:443/?org=myOrg&vapp=test1 Opening OVF source: LAMP.ovf Warning: No manifest file Opening vCloud target: vcloud://js:PASSWORD@example.com:443/ Error: Multiple VDCs found. Possible VDC completions are: orgVdc orgVdc2 Completed with errors ovftool LAMP.ovf "vcloud://jd:PASSWORD@example.com:443/?org=myOrg&vapp=test1&vdc=orgVdc" Opening OVF source: LAMP.ovf Warning: No manifest file Opening vCloud target: vcloud://js:PASSWORD@example.com:443/ Error: Multiple catalogs found. Possible catalog completions are: catalog catalog2 Completed with errors "vcloud://jd:PASSWORD@example.com:443/?org=myOrg&vapp=test1&vdc=orgVdc&catalog=catalog" Opening OVF source: LAMP.ovf Warning: No manifest file Opening vCloud target: vcloud://js:PASSWORD@example.com:443/ Error: Multiple networks found on target. Possible completions are: extNet2 extOrgNet intNet2 intnet Completed with errors ovftool --net:"VM Network=intnet" LAMP.ovf "vcloud://jd:PASSWORD@example.com:443/ ?org=myOrg&vapp=test1&vdc=orgVdc&catalog=catalog" Opening OVF source: LAMP.ovf Warning: No manifest file Opening vCloud target: vcloud://js:PASSWORD@example.com:443/ Deploying to vCloud: vcloud://js:PASSWORD@example.com:443/ Disk Transfer Complete Completed successfully