Hi,
We want to change the credentials(password) for the users(eg. root) on the Guest OS(VMs) which is hosted on the ESXi 4.1 host using vSphere Web Services SDK 4.1.
We also need to perform few other operations on the VM like Changing Time Zone / finding the status of the any tasks running on the VM / / run any custom scripts.
Need suggestions to resolve the above using the SDK
Thanks in Advance
Ravi
The vSphere API is not designed to perform this level of customization within the guestOS, there are certain things you can configure such as hostname, dns servers, timezone, administrator password for Windows only, etc. For other specific guestOS changes, you can leverage VMware VIX API to to execute either a specific command within the guestOS or a script within the guestOS, this is the same thing if you were logged into the guest and running a custom script to perform the changes. Here are the details on vSphere customization spec on what you can customize within a guestOS - http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.vm.customization.Spec... You can also get a graphical view if you have a Windows or Linux VM and you can go through the cloning wizard and towards the end, you'll be prompted to customize the VM. Assuming your vCenter is configured to allow customization, you can go through the GUI to see what you can and can't customize.
=========================================================================
William Lam
VMware vExpert 2009,2010
VMware scripts and resources at:
Getting Started with the vMA (tips/tricks)
Getting Started with the vSphere SDK for Perl
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".
Can we apply this customization after we bringup the VM, like changing timezone through API. Not during cloning of the VM
Thanks
Ravi
So the customization only happens after the cloning process and the VM is powered on. The customization spec that is created is then read in and then the guest will reboot for the changes to take affect. There is a separate API method CustomizeVM_Task that you can call but it's basically do the exact same thing if you were to perform customization as part of a single clone operations version calling two separate methods.
=========================================================================
William Lam
VMware vExpert 2009,2010
VMware VCP3,4
VMware VCAP-DCA4
VMware scripts and resources at:
Getting Started with the vMA (tips/tricks)
Getting Started with the vSphere SDK for Perl
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".