VMware

This Question is Answered

2 "helpful" answers available (6 pts)
3 Replies Last post: Oct 26, 2009 12:25 PM by lamw  

Update Virtual Hardware using SDK? posted: Oct 26, 2009 6:17 AM

Click to view piuhapofuhpaosf's profile Enthusiast 37 posts since
Jul 15, 2008
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".

Re: Update Virtual Hardware using SDK?

1. Oct 26, 2009 6:44 AM in response to: piuhapofuhpao…
Click to view lamw's profile Champion 2,803 posts since
Nov 27, 2007
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: http://engineering.ucsb.edu/~duonglt/vmware/
vGhetto Script Repository
VMware Code Central - Scripts/Sample code for Developers and Administrators
VMware Developer Comuunity
Twitter: @lamw

http://engineering.ucsb.edu/~duonglt/vmware/vexpert_silver_icon.jpg

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

Re: Update Virtual Hardware using SDK?

3. Oct 26, 2009 12:25 PM in response to: piuhapofuhpao…
Click to view lamw's profile Champion 2,803 posts since
Nov 27, 2007
Here's a Perl script that'll help with the upgrade process: upgradeVMVirtualHardware.pl

=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/
vGhetto Script Repository
VMware Code Central - Scripts/Sample code for Developers and Administrators
VMware Developer Comuunity
Twitter: @lamw

http://engineering.ucsb.edu/~duonglt/vmware/vexpert_silver_icon.jpg

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

Developer Social Media

Communities