VMware {code} Community
dayra01
Contributor
Contributor

vmx file to VirtualMachineConfigSpec

Hi,

I want to populate VirtualMachineConfigSpec[] from a vmx file, so that i can call CreateVM_Task() API. Can someone suggest me, what should be the best way to acheive this?

I have a vmx file on my local machine. I want to read from this vmx file and populate VirtualMachineConfigSpec class, so that i can use VI SDK to create a VM(CreateVM_Task() API).

What should be the stpes to populate VirtualMachineConfigSpec[] from vmx file??

Thanks,

-Raghu.

0 Kudos
1 Reply
njain
Expert
Expert

There are no defined or recommended steps using which you can populate the VirtualMachineConfigSpec from your vmx file. Though, the vmx file describes the VM's configuration, but it might not give you all the information required in VirtualMachineConfigSpec to create a VM. You can parse the vmx file and populate the properties of VirtualMachineConfigSpec accordingly, ensuring that the appropriate sub-classes are implemented.