VMware {code} Community
luger_lee
Enthusiast
Enthusiast
Jump to solution

What does "an OVF descriptor" mean ?

Hi.

Could anybody tell me what is an OVF descriptor ?

I want to use ParseDescriptor method to deploy an appliance to an ESX host,

but I do not understand what means "OVF descriptor" .

Thanks in advance.

0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

The descriptor in which your defines the contents of the VM or vApp you're trying to import.

Import

For the import scenario, the typical sequence of events is as follows:

The client calls parseDescriptor to obtain information about the OVF descriptor. This typically includes information (such as a list of networks) that must be mapped to VI infrastructure entities.

The OVF descriptor is validated against the OVF Specification, and any errors or warnings are returned as part of the ParseResult. For example, the parser might encounter a section marked required that it doesn't understand, og the XML descriptor might be malformed.

The client decides on network mappings, datastore, properties etc. It then calls createImportSpec to obtain the parameters needed to call ResourcePool.importVApp.

If any warnings are present, the client will review these and decide whether to proceed or not. If errors are present, the ImportSpec will be missing, so the client is forced to give up or fix the problems and then try again.

The client now calls ResourcePool.importVApp, passing the ImportSpec as a parameter. This will create the virtual machines and VirtualApp objects in VI and return locations to which the files of the entity can be uploaded. It also returns a lease that controls the duration of the lock taken on the newly created inventory objects. When all files have been uploaded, the client must release this lease.

You'll call parseDescriptor() http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.OvfManager.html#parse... as mentioned and ovfDescriptor will refer to the location of your .ovf file which is your descriptor file. When you export a VM or vApp, you'll get a set of VMDK(s) along with the ovf descriptor file, you can run this on a dummy VM to see what it looks like but that is what you'll need to pass into this function as the first step of the import process.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

If you find this information useful, please award points for "correct" or "helpful".

View solution in original post

0 Kudos
4 Replies
lamw
Community Manager
Community Manager
Jump to solution

The descriptor in which your defines the contents of the VM or vApp you're trying to import.

Import

For the import scenario, the typical sequence of events is as follows:

The client calls parseDescriptor to obtain information about the OVF descriptor. This typically includes information (such as a list of networks) that must be mapped to VI infrastructure entities.

The OVF descriptor is validated against the OVF Specification, and any errors or warnings are returned as part of the ParseResult. For example, the parser might encounter a section marked required that it doesn't understand, og the XML descriptor might be malformed.

The client decides on network mappings, datastore, properties etc. It then calls createImportSpec to obtain the parameters needed to call ResourcePool.importVApp.

If any warnings are present, the client will review these and decide whether to proceed or not. If errors are present, the ImportSpec will be missing, so the client is forced to give up or fix the problems and then try again.

The client now calls ResourcePool.importVApp, passing the ImportSpec as a parameter. This will create the virtual machines and VirtualApp objects in VI and return locations to which the files of the entity can be uploaded. It also returns a lease that controls the duration of the lock taken on the newly created inventory objects. When all files have been uploaded, the client must release this lease.

You'll call parseDescriptor() http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.OvfManager.html#parse... as mentioned and ovfDescriptor will refer to the location of your .ovf file which is your descriptor file. When you export a VM or vApp, you'll get a set of VMDK(s) along with the ovf descriptor file, you can run this on a dummy VM to see what it looks like but that is what you'll need to pass into this function as the first step of the import process.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
luger_lee
Enthusiast
Enthusiast
Jump to solution

Thank you very much for your quick response.

>_ovfDescriptor_ will refer to the location of your .ovf file which is your descriptor file

The location of my OVF file is shown below.

$ovfpath = "D:
Temp
VMware-VIPerl-Toolkit-1.6.0-104313-Appliance
VMware-RCLI-3.5-U2-Appliance.ovf";

$pdp_spec = OvfParseDescriptorParams->new(deploymentOption => "", locale => "");

$opdr = $ovf_mgr->ParseDescriptor(ovfDescriptor => $ovfpath, pdp => $pdp_spec);

And I got an empty OvfParseDescriptorResult object. Where is wrong ?

0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

I think you need to define locale and deploymentOption even though some of the text says it may be optional, per the API it looks like a required parameter.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
luger_lee
Enthusiast
Enthusiast
Jump to solution

I’ve tried hard to solve this problem but I can’t. I give up.

Using ovftool may be a good idea, I think.

Thank you for your kindly help.

0 Kudos