Closed masihnazari closed 6 years ago
You need to set the host in the PlacementSpec. Take a look at the CreateVM samples. https://github.com/vmware/vsphere-automation-sdk-.net/blob/master/vmware/samples/vcenter/helpers/PlacementHelper.cs
i set host with vmPlacementSpec.SetHost("server2.domain.com"); but i receive System.AggregateException: 'One or more errors occurred.' server2.domain.com is my server name shown in vcenter .
The placement spec expects an id, not the hostname. Please post such queries in the communities https://code.vmware.com/forums/7504/vsphere-automation-sdk-for-.net.
hi is there any way to set which esxi host must be sellected when create new vm ? i have 2 host in DC1 but new vm always create in first esxi host in vcenter.