Brian over at “Quick and Dirty Scripting� a blog that focuses on automating system administration tasks for Linux, Windows, and VMware ESX is (like me) a VMware PowerShell pioneer. He created a script that creates a new virtual machine. He also tried to create a new VM from a template, but he continually got an error while doing so. I guess this just goes to show that VMware is still developing this code and it has some ways to go.
Wednesday, November 14. 2007
Creating a Virtual Machine with Powershell
Tuesday, November 13. 2007
Integrate VMware PowerShell with Workflow Studio
Workflow Studio is a new platform that enables simple yet enterprise-scale data center and business process automation through the power of Windows PowerShell and the flexibility of workflow. Through a graphical workflow designer, you can build full automation of your business and/or IT processes including user account management, server and application provisioning, security enforcement and automation, disaster recovery automation, and routine and emergency maintenance on data center resources. You can integrate all these features with the VMware PowerShell command let’s and automate and provision VMware’s virtual machines. The image shows a simple tryout. Within the hour I created a workflow that creates a CSV file with all the virtual machines registered at a Virtual Center Server. The trail period is 30 days so I got 29 days of fun left. ;-)
Free vmSight Basic Edition
vmSight, the leader in virtual network intelligence, offers the Basic Edition of its product suite FREE. Designed to complement your desktop virtualization initiatives, this set of systems management tools provides valuable new management capabilities with powerful reporting for exceptional visibility. Seeing is believing. Click here to register and download the FREE Basic Edition. For more information about vmSight's product suite, visit www.vmsight.com. What is virtual network intelligence? It's a new category of virtual system management tools that provides extensive reporting, analytics and alerts on all network activity within your virtual environment. And that means improved IT accounting, visibility for IT planning and information for IT compliance.IT administrators easily view and monitor activities by user, group, desktop, server, application and time of day to meter usage in the virtual environment. Reports support IT accounting to determine chargebacks and IT planning to optimize configuration. Monitor your access right policies in real-time and receive alerts when virtual network activities do not comply with those defined policies. Easily report on detailed user activity in the virtual environment to validate your virtual network security.
Sunday, November 11. 2007
My first VMware PowerShell script
Several months ago I created a Visual Basic program named VMCDConnected. This application checks if one of your virtual machines is connected to an ISO image. When you have created a DRS cluster the virtual machines in this cluster are automatically migrated to the least busy ESX host. These migrations depend on VMotion. The most common show stopper for VMotion is a connected CD that’s not on shared storage. With one click of a button all the CD’s are disconnected. This weekend I had the change to try out the VMware Infrastructure Toolkit for Windows. It provides a core set of Windows PowerShell cmdlets for managing VI. Within minutes I created a script with the same features as my Visual Basic application. The difference is that creating the Visual basic program took me over a month. One other big difference is that the PowerShell script only counts five lines of code. The image shows a glimpse of the Visual Basic Object Browser investigating the Toolkit’s classes and properties. Building Visual Basic application on top of the Toolkit will also become a lot easier.
For the creation of the five-liner I used the script editor from PowerGui and the VMworld presentation “Managing VMware Infrastructure with Windows PowerShell� presented by Antonio Dias and Danny Kim. VMware is preparing a technology preview of the PowerShell. If you'd be interested in receiving an early version of that software and you'd be willing to try it out and send them feedback, please send email to vi_tk_4win-admin@vmware.com.
Add-PSnapin VMware.VimAutomation.Core
Get-VIServer vcserver.local
$vms = Get-VM
$CDConnected = Get-CDDrive $vms | where {$_.ISOPath -like "*.ISO*"}
Set-CDDrive -connected 0 $CDConnected