1

I have a single standalone ESXi installation, and it's not being managed by vCenter. How can I programmatically deploy a new VM on this ESXi using an OVF, VMDK file?

I have come across pyvmomi and its deploy_ove.py example, but it looks like it's designed for vCenter.

C:\Users\lab_crbaval\Desktop>python centos_clone\samples\deploy_ovf.py -s 10.24.125.25 -u root -p 1234234 --vmdk-path C:\Users\...centos.vmdk --ovf-path C:\Users\..centos.ovf -nossl
Traceback (most recent call last):
  File "centos_clone\samples\deploy_ovf.py", line 143, in <module>
    exit(main())
  File "centos_clone\samples\deploy_ovf.py", line 118, in main
    objs["datacenter"].vmFolder)
  File "C:\Python36\lib\site-packages\pyvmomi-7.0.1-py3.6.egg\pyVmomi\VmomiSupport.py", line 706, in <lambda>
  File "C:\Python36\lib\site-packages\pyvmomi-7.0.1-py3.6.egg\pyVmomi\VmomiSupport.py", line 511, in _InvokeMethod
  File "C:\Python36\lib\site-packages\pyvmomi-7.0.1-py3.6.egg\pyVmomi\VmomiSupport.py", line 1041, in CheckField
TypeError: Required field "spec" not provided (not @optional)

What libraries are available for the automation of a single ESXi host?

Sapnesh Naik
  • 11,011
  • 7
  • 63
  • 98
  • 1
    How about using [vmware_deploy_ovf](https://docs.ansible.com/ansible/latest/collections/community/vmware/vmware_deploy_ovf_module.html) with Ansible? The ovf deploy easily by using Ansible :) – sky_jokerxx Apr 11 '21 at 14:37

1 Answers1

2

Documentation with example : https://code.vmware.com/docs/11747/ovf-tool-user-s-guide/GUID-1D091BE1-36D7-42C2-990F-CBBD8F06F51A.html

Charles
  • 54
  • 2