VMware {code} Community
clabman
Contributor
Contributor

Deploy OVF with perl sdk

Hi,

I'am trying to deploy an OVF on Vcenter via perl sdk :

Here is my snippet :

# Get OvfManager

print "Get OVF Manager\n";

my $OVFView=Vim::get_view(mo_ref => Vim::get_service_content()->ovfManager);

## Get OVF Descriptor
print "Get ParseDescriptor : OVF\n";
my $pdp = OvfParseDescriptorParams->new(deploymentOption=>"",locale=>"");
my $ParseDescriptor = $OVFView->ParseDescriptor(ovfDescriptor=>'/home/test/VMware/myovf.ovf',pdp=>$pdp);
print Dumper $ParseDescriptor;

But it always return this kind of error :

$VAR1 = bless( {

                 'error' => [

                              bless( {

                                       'localizedMessage' => 'Line 1: Could not parse the document: \'not well-formed (invalid token)\'.',

                                       'fault' => bless( {

                                                           'lineNumber' => '1',

                                                           'description' => 'not well-formed (invalid token)'

                                                         }, 'OvfXmlFormat' )

                                     }, 'LocalizedMethodFault' )

                            ],

                 'virtualApp' => '1',

                 'defaultDeploymentOption' => '',

                 'defaultEntityName' => '',

                 'annotation' => ''

               }, 'OvfParseDescriptorResult' );

Have you already encountered this kind of error ??

Reply
0 Kudos
1 Reply
Chinmay_Shepal
Contributor
Contributor

I do use OVF Tool for this purpose.

Here is the link : http://www.vmware.com/support/developer/ovf/ovf301/ovftool-301-userguide.pdf

Please let me know if it solves your problem.

Reply
0 Kudos