VMware {code} Community
piuhapofuhpaosf
Contributor
Contributor
Jump to solution

Update Virtual Hardware using SDK?

We're converting from VC 2.5 to vSphere 4.0, and I'm curious to know if it's possible to automate the process of updating the virtual hardware of our Virtual Machines from version 4 to version 7 so that we can start using them in a vSphere environment with all the bells and whistles. To be clear, I'm trying to find out if there is a way to use the Perl API to duplicate the results I would get by right-clicking on a VM in the VC and selecting "Update Virtual Hardware".

Reply
0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

Yep, you'll need to get a reference to an offline VM and then call the method UpgradeVM_Task and specify the version, and in this case it'll be 7

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

Twitter: @lamw

If you find this information useful, please award points for "correct" or "helpful".

View solution in original post

Reply
0 Kudos
3 Replies
lamw
Community Manager
Community Manager
Jump to solution

Yep, you'll need to get a reference to an offline VM and then call the method UpgradeVM_Task and specify the version, and in this case it'll be 7

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

Twitter: @lamw

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos
piuhapofuhpaosf
Contributor
Contributor
Jump to solution

Outstanding! I can't believe in all my browsing of the API Docs that I didn't notice this method. Many thanks.

Reply
0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

Here's a Perl script that'll help with the upgrade process:

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

Twitter: @lamw

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos