VMware

This Question is Answered

2 "helpful" answers available (6 pts)
9 Replies Last post: Feb 4, 2009 9:45 PM by c_shanklin  

remediate posted: Feb 2, 2009 3:36 AM

Click to view rDale's profile Enthusiast 71 posts since
Mar 22, 2007

Is it possible to create a script to remadiate servers using powershell, im trying to set the server to patch once a month but the VC scheduler will not allow me to set repetative tasks.

R

Re: remediate

1. Feb 2, 2009 4:43 AM in response to: rDale
Click to view LucD's profile Champion vExpert 2,851 posts since
Oct 31, 2005
Yes, you can do that.
The Update Manager includes a snapin (VMware.VumAutomation) with 13 cmdlets.
You have to use the Remediate-Inventory cmdlet to trigger remediation.

PS: the snapin can be installed from the VC installation CD.
Run VMware-Pscli.exe in the updateManager folder.

Re: remediate

4. Feb 3, 2009 6:08 AM in response to: rDale
Click to view LucD's profile Champion vExpert 2,851 posts since
Oct 31, 2005
Just tried a script an apparently there is a bug in the Remediate-Inventory with VITK 1.5 and the VI 3.5U3 VMware-Pscli.
Can't get it to work either.

I reported the error to the development team and I'm waiting for feedback.

Re: remediate

5. Feb 3, 2009 9:14 AM in response to: LucD
Click to view bbambalova's profile Novice VMware Employees 3 posts since
Feb 3, 2009
The workaround is to supply value for -HostFailureAction parameter. You can use the configured host failure action for the Update Manager or one of the values: FailTask, Retry, PowerOffVMsAndRetry, SuspendVMsAndRetry

$vumConfig = Get-VumConfig
$entity = Get-Inventory "<host_ip>"
#this will return only attached to the host baselines
$baseline = Get-Baseline -Entity $entity
Remediate-Inventory -Entity $entity -Baseline $baseline -HostFailureAction $vumConfig.HostFailureAction

Re: remediate

6. Feb 3, 2009 9:33 AM in response to: bbambalova
Click to view LucD's profile Champion vExpert 2,851 posts since
Oct 31, 2005
Is that with VITK 1 or VITK 1.5 ?

With VITK 1.5 I keep getting the following error (tested with PS v1 and PS v2 CTP3)

VUM-get-connectionId.png

Re: remediate

7. Feb 3, 2009 9:49 AM in response to: LucD
Click to view bbambalova's profile Novice VMware Employees 3 posts since
Feb 3, 2009

Update Manager Powershell works with VITK 1. I used VITK 1 for testing the script.


Re: remediate

8. Feb 3, 2009 11:09 AM in response to: bbambalova
Click to view LucD's profile Champion vExpert 2,851 posts since
Oct 31, 2005
Thanks, with VITK 1 it works.
But note that the Get-Baseline and Remediate-Inventory cmdlets only work when the baseline is directly attached to the entity, not when it is inherited.

Any clue when there will be a working version for VITK 1.5 ?

Btw are you working for VMware ?

Re: remediate

9. Feb 4, 2009 9:45 PM in response to: LucD
Click to view c_shanklin's profile Master VMware Employees 830 posts since
Dec 3, 2007
Hi everyone,

There is an incompatibility between VI Toolkit 1.5 and the VUM cmdlets. For now if you need to use the VUM cmdlets you will need to do so on a system that has VITK 1.0 installed.

This incompatibility will be resolved by a minor update to VI Toolkit that will be shipped when the next version of VUM ships. The next version of VUM will have cmdlets that support that version as well as the current version.

We've updated the release notes to note the incompatibility. Sorry for the inconvenience.

VMware Beta Programs

Want to be Considered for Future Beta Programs?

Learn More

VMware Developer

Download SDKs, APIs, videos,
training, and more in the Developer community.

Learn More

Developer
Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld
Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

Only VMware ... Delivers Nexus 1000V

Ensure consistent, policy-based network capabilities to virtual machines across your data center.

Learn More

Communities