0

I have 2 instances of ESXi host and vCenter. I installed VIX API package on my Ubuntu 16.04 and tried to clone a VM. To do it i used the sample from documentation. Unfortunately, my program crashes with this message after executing the code below (connection to host and opening vm processes work properly): "The operation is not supported for the specified parameters"

The code:

jobHandle = VixVM_Clone(vmHandle,
                    VIX_INVALID_HANDLE,
                    VIX_CLONETYPE_FULL,
                    "[datastore1] mytemp-21_linked/mytemp-21_linked.vmx",
                    0,
                    VIX_INVALID_HANDLE,
                    NULL, 
                    NULL);

Worth noting, in the doc sample VIX_SERVICEPROVIDER_VMWARE_WORKSTATION host type is used, by i've not found any info about restrictions for ESXi and vCenter (VIX_SERVICEPROVIDER_VMWARE_VI_SERVER type) and it should be supported too. What's wrong with my call?

Also, I saw something similar there, but there are quite bad description of the problem.

Community
  • 1
  • 1
Adam Godefroy
  • 45
  • 1
  • 9
  • 1
    VIX is pretty much dead for vSphere (see https://developercenter.vmware.com/web/sdk/60/vix or https://www.vmware.com/support/developer/vix-api/VIX-1.15-ReleaseNotes.html) so you should probably be moving away from it in favor of the webservices SDK (https://www.vmware.com/support/developer/vc-sdk/) or something like pyvmomi (https://github.com/vmware/pyvmomi). – YSK Oct 27 '16 at 19:57

1 Answers1

0

Clone from VIXAPI operation is NOT supported under VMware Server. I faced the same issue, while connecting to the host, the host-type should be set and connected through VIX_SERVICEPROVIDER_VMWARE_WORKSTATION.

You can find the full compatibility matrix at here, or under Requirements in the support document as you listed above where it mentions: "VMware Workstation 6.5 (not supported on VMware Server)"

As YSK mentioned in the comments above this is the last VIX SDK release supported for vSphere. A set of VIX Guest Operation APIs have been integrated in vSphere WebServices SDK. Here is an article from VMware on how to migrate to vSphere SDK: https://www.vmware.com/support/developer/vix-api/guestOps50_technote.pdf

Afra
  • 33
  • 5
  • 1
    Thanks! It was quite difficult for me to find this restriction in documents. But as YSK said, indeed - it's better to use webServices SDK. – Adam Godefroy Dec 04 '16 at 11:19