Quantcast
Channel: VMware Communities : Popular Discussions - VIX API
Viewing all articles
Browse latest Browse all 34639

VIX_COM connect to remote host

$
0
0

 

 

 

 

 

 

 

I'm trying to connect to VMWare machine running on the remote host (Host: Windows XP SP2 with VMWare Server v1.04)

 

 

Getting VBScript error "Type Mismatch" on line higlighted below. As you can see I pass hostname/username/password as a variable, which is defined. According to documentation this should work, but for some reason when I use this code to connect to a local host it works fine. Any help with this will be greatly appreciated.

 

 

 

 

 

Set job = lib.Connect(VixCOM.Constants.VIX_API_VERSION, VixCOM.Constants.VIX_SERVICEPROVIDER_VMWARE_SERVER, strHostName, 902, strUserName, strPassword, 0, Nothing, Nothing)

 

 

Set results = Nothing

 

 

err = job.Wait(Array(VixCOM.Constants.VIX_PROPERTY_JOB_RESULT_HANDLE), results)

'QuitIfError(err)

 

 

Set host = results(0) -error line

 

 

Set job = host.OpenVM("D:\VM_Images\VMXP01EN\Windows XP Professional.vmx", Nothing)

err = job.Wait(Array(VixCOM.Constants.VIX_PROPERTY_JOB_RESULT_HANDLE), results)

'QuitIfError(err)

 

 


Viewing all articles
Browse latest Browse all 34639

Trending Articles



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