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

How to import ova file to vcenter or a host using perl VI SDK

$
0
0

I am currently trying this :

 

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

$ovfMgr=Vim::get_view(mo_ref => $sc_view->ovfManager);
$pdresult=$ovfMgr->ParseDescriptor('C:/test.ova');

print $pdresult;

 

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

 

and getting the following response:

 

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

Odd number of elements in hash assignment at (eval 23) line 9.
Unexpected arguments: C:/test.ova at (eval 18) line 143
        VimService::build_arg_string('ARRAY(0x3f5299c)', 'HASH(0x3f5293c)') call
ed at (eval 18) line 1743
        VimService::ParseDescriptor('VimService=HASH(0x6f64aa0)', '_this', 'Mana
gedObjectReference=HASH(0x6f704a0)', 'C:/test.ova', 'undef') called at C:/Progra
m Files (x86)/VMware/VMware vSphere CLI/Perl/lib/VMware/VICommon.pm line 1693
        ViewBase::invoke('OvfManager=HASH(0x6f736d4)', 'ParseDescriptor', 'C:/te
st.ova', 'undef') called at (eval 23) line 10
        OvfManagerOperations::ParseDescriptor('OvfManager=HASH(0x6f736d4)', 'C:/
test.ova') called at C:\Users\buggi\Desktop\Virt-man\ovadeploy.pl line 20

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

 

Can sombody provide a sample code snippet to perform this operation?


Viewing all articles
Browse latest Browse all 1577

Trending Articles



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