I am writing a web interface which will enable a team to provision multiple VMs in our ESX3 farm. All is working fine except that all VMs are provisioned on the first host in a Datacenter or folder even when the XML file that is parsed by VMCreate.pl contians the <vmhost>hostname</vmhost> tag.
Any ideas?
Thanks
Colin
Hi Colin,
Based on your comments, I just tried to create multiple VM under multiple Host environment and then specifying the appropriate DataCenter and Host combinations and I was able to get the desired output as expected for each run. Therefore, I think if you are directly using the vmcreate.pl script then it should work. In case, if you have tailored the script to suit your needs then it might be that the error you are running into is due to the alterations. In that case, I would request you to post your version of the script so that we can correct the issue. In case you are using the unmodified version of the vmcreate.pl then please make sure that you have the latest version.
~ Sidharth
Thanks for your reply - I should have made it clear in my question that I am trying to create VMs in clusters which have DRS active. It appears that the default setting is to create the VM on the first host on the cluster. You can see this in the GUI by right clicking the ESX cluster and selecting 'New Virtual Machine' - at no point in the following Wizards are you asked which host you would like the VM to be created on.
Thinking about it now it doesn't matter which host the VM starts on; as long as I can choose the datastore I will let DRS manage the host selection.
Regards
Colin
Yes, you are correct! if you are using a DRS enabled Cluster then you actually do not need to worry about which host will be running your VM. In case you run into any other issue feel free to post your questions and we would be glad to help you.
Cheers,
~ Sidharth