简体   繁体   English

如何使用VMware VSphere API通过PHP创建新VM

[英]How to create new VM using VMware VSphere API via PHP

I'm trying to create a new Virtual Machine in VSphere via specifications entered into a web form POSTed to php. 我正在尝试通过输入到发布到php的Web表单中的规范在VSphere中创建一个新的虚拟机。 I found the method call CreateVM_Task (scroll 70% of the way down) which seems to be the right API call. 我发现方法调用CreateVM_Task (向下滚动70%),这似乎是正确的API调用。 My problem is how to connect the php to this API call. 我的问题是如何将PHP连接到此API调用。 The documentation for VSphere is plentiful, but I'm having trouble getting what I need. VSphere的文档很丰富,但是我无法获得我需要的东西。

why not try with Perl, its simple, vSphere SDK avail at free , 为什么不尝试使用Perl,它简单的vSphere SDK免费提供,

http://www.vmware.com/support/developer/viperltoolkit/index.html http://www.vmware.com/support/developer/viperltoolkit/index.html

here they gave how to connect to vsphere, we can use web services calls to connect to vsphere. 在这里他们给出了如何连接到vsphere,我们可以使用web服务调用来连接到vsphere。 all the need is to open https port. 所有需要都是打开https端口。

The vSphere API is SOAP. vSphere API是SOAP。 You need to get the WSDL (download from VMware or get it directly from your vCenter) and use it to create a SOAP client. 您需要获取WSDL(从VMware下载或直接从vCenter获取)并使用它来创建SOAP客户端。

Maybe this helps: Connecting to vSphere API via PHP5 using SOAP 也许这有帮助: 使用SOAP通过PHP5连接到vSphere API

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM