Quantcast
Channel: VMware Communities : Discussion List - vSphere SDK for Perl
Viewing all articles
Browse latest Browse all 1577

Deploy OVF with perl sdk

$
0
0

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 ??

Viewing all articles
Browse latest Browse all 1577

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>