Website: vmwarescripting.com


image

Ik kwam de volgende site tegen op google: http://www.vmwarescripting.com/

Je vind hier scripts voor de volgende platformen:

  • Bash Scripts
  • Powershell Scripts
  • RCLI
  • Perl Scripts
  • Python

Vooral de Powershell scripts is al aardig gevuld. Zie http://www.vmwarescripting.com/ voor de inhoud.

VMware: An introduction to scripting VI using Perl or Powershell


David Deeths heeft een post geplaats met daarin de VMworld labs over Perl scripting en het gebruik van Powershell.

Hello, my name is David Deeths and I’m a new contributor to the VMware Developer Blog. I wanted to share with the community the scripting lab we put together for VMworld 2008. This is a great introduction to scripting with the VI Toolkits in Perl or PowerShell. The PowerShell version doesn’t require any programming or scripting experience at all.

The labs will help you get started with scripting VMware Infrastructure to enable automation, extensibility, and integration with existing tools. When we ran this at VMworld, we had about 600 attendees and it was so popular some students camped out in line to attend the lab a second time. We had so many folks request a way to share this with their teams that we decided to publish the whole thing for the community.

The lab is available in two versions: one shows how to use the VI Perl Toolkit and the other shows how to use the PowerShell-based VI Toolkit (for Windows). The attached files contain the manuals for both versions of the lab and the exercises for both versions of the lab.

The lab takes 2-3 hours to complete (not including the time to set the environment up first), but is conveniently split into 20 minute exercises. You’ll walk away with a better understanding of VMware Infrastructure, resources for using the toolkits, and a variety of useful scripts for performing common administrative tasks. The exercises cover triggering tasks, examining VM attributes, performing actions on VMs, and exporting performance data.

Meer info en een aantal downloads vind je hier: an-introduction-to-scripting-vi-using-perl-or-powershell

VMware: Autostart from the COS


Duncan heeft vandaag de volgende blogpost http://www.yellow-bricks.com/2009/01/01/check-if-autostart-is-enabled-from-the-cos/ online gezet, over het nakijken van de autostart (van VM’s) feature in het COS.

I didn’t know this was possible. But you can easily check via the COS if autostarting of VM’s in enabled or not according to this KB article:

Via het volgende commando kun je nakijken of de setting op false staat:

cat /etc/vmware/hostd/vmAutoStart.xml | grep ‘<enabled>false</enabled>’

image

Via de volgende commando’s kun je deze setting aanpassen:

Om de setting op true te zetten voer je het volgende commando uit:

perl -p -i.old -e ‘s/<enabled>false/<enabled>true/g’ /etc/vmware/hostd/vmAutoStart.xml 
de optie –i.old zorgt er voor dat er een backup gemaakt wordt

Om de setting op false te zetten voer je het volgende commando uit:

perl -p -i.old -e ‘s/<enabled>true/<enabled>false/g’ /etc/vmware/hostd/vmAutoStart.xml