Tag Archives: VMware

Release: PowerCLI 4.1.1


Just noticed the new release of PowerCLI 4.1.1 on twitter:

image

There are a lot of new features:

  • Added support for the ESX CLI functionality through the Get-EsxCli cmdlet.
  • Added support for ESX Top statistics through the Get-EsxTop cmdlet.
  • Enhanced Get-VirtualSwitch, Get-VirtualPortGroup, Get-VMHost, Get-VM, New-NetworkAdapter, Set-NetworkAdapter, and Get-VMHostNetworkAdapter to add support for distributed switches and distributed switch port groups.
  • Added support for SCSI controllers through the New-ScsiController, Get-ScsiController, and Set-ScsiController cmdlets, and the new Controller parameter of New-HardDisk and Set-HardDisk.
  • Added support for querying and modifying vCenter Server alarms through the Get-AlarmDefinition, Set-AlarmDefinition, Get-AlarmAction, New-AlarmAction, Remove-AlarmAction, Get-AlarmActionTrigger, New-AlarmActionTrigger, and Remove-AlarmActionTrigger cmdlets.
  • Added the Get-AdvancedSetting, Set-AdvancedSetting, New-AdvancedSetting, and Remove-AdvancedSetting cmdlets for managing advanced vCenter Server settings and Cluster HA advanced options.
  • Added the Wait-Tools cmdlet that allows you to wait for VMware Tools of the specified virtual machines to load before proceeding.
  • Added support for querying disk and disk partition information of hosts through the Get-VMHostDisk and Get-VMHostDiskPartition cmdlets.
  • Added support for formatting host disk partitions through the Format-VMHostDiskPartition cmdlet.
  • Added support for querying the primary HA cluster nodes through the Get-HAPrimaryVMHost cmdlet.
  • Added support for zeroing out a virtual machine hard disk through a new ZeroOut parameter to Set-HardDisk cmdlet.

looking forward to test the new Get-EsxCli and the Get-EsxTop cmdlets.

The complete change log is available here.

You can download the new release from here: download link.

Book: Administering VMware Site Recovery Manager 1.0 for Free


Mike Laverick just dropped the news on Twitter:

image

 

image

 

This book will teach you how to install and configure VMware’s SRM. It also covers in detail the failover and failback processes – and I will guide you step-by-step through the set up of the product. This book is not filled with project management padding that typifies a lot of IT books. It is practical and technical, and assumes you are already pretty familiar with VMware’s Virtual Vi3 products. In this book you will learn the strengths and weaknesses of Site Recovery Manager, and I will show you the common pitfalls and errors that can happen, and also more importantly why they happen, and how to fix them.

So go and grab your copy here: http://www.lulu.com/content/4343147 and visit Mike’s blog for more great stuff about VMware!

 

Source: Twitter.com and http://www.rtfm-ed.co.uk/?p=1727

Book: Managing VI with Powershell


image

You can pre-order your book now: http://www.scriptingoutpost.com/

VMware is the king when it comes to virtualization. Windows PowerShell has gotten huge accolades as an extremely powerful tool for automation of IT tasks. These two technologies make a lot of sense together, and VMware is now making that happen with the release of their VI Toolkit for Windows.

In "Managing VMware Infrastructure with PowerShell", you will learn how to perform everything from simple ad-hoc reporting at the command-line ("are any of my virtual machines powered off?") to complex scripts to automate a massive deployment of hundreds of virtual machines. Simple, yet powerful; concise, yet robust; you will enjoy using this new language to solve your old problems using less code than you thought possible.

If you are a system administrator responsible for managing a VMware Virtual Infrastructure (version 2.0 or above), or a standalone ESX Server (version 3.0 or above), then you need this book. Aimed at scripters of every level, the book starts off with a PowerShell primer and continues well into the internals of virtualization on the VMware platform.

Table of Contents
  • Introduction – Why You Need This Book
  1. Windows PowerShell Crash Course
  2. Getting Started
  3. Scripting with Virtual Infrastructure
  4. Inventory and Reporting
  5. Deployment and Configuration
  6. Maintenance and Operations
  7. Troubleshooting and Problem Resolution
  8. Managing VMWare with PowerGUI

VMware: Creating VMware ESX Unattended Install Media


Paul Shannon heeft weer een super document gemaakt over het maken van een Unattended Installatie CD voor VMWare ESX. In de tijd van ESX 2.5.x heb ik ook eens zo’n CD gemaakt door de volgende guide te gebruiken: http://www.vmprofessional.com/index.php?content=kickstart_2. Helaas werkte deze guide niet meer met ESX 3.5. Ik ben dus erg blij met het document van Paul. Thanks Paul!

Paul schrijft het volgende op zijn blog:

I had a customer that had a requirement to backup the ESX Service Console settings and wanted to know the best files to backup. I suggested that it may be more prudent to create unattended installation media to make restores more seamless. This took a turn and I was asked to make a single CD that was capable of restoring any one of the 11 ESX hosts in the clusters. With a lot of reading and a lot of testing this was achieved and this document explains how I did it.

Download het document hier: http://www.vm-aware.com/files/tech_notes/Creating_Custom_ESX_CD.pdf

Bron: http://www.vm-aware.com/2008/12/22/creating-vmware-esx-unattended-install-media/

Add Custom Fields to VI Client with Powershell (Samples)


Hugo Peeters heeft zijn Powershell scripts voor het vullen van Custom Fields in vCenter gepost:

Snapshot Count

I already showed you how to do this, but I have now added an IF-statement so that only changes are updated (equal values are not overwritten). And I have added Julian Wood’s correction. Add-VMSnapshotCount.ps1

Total Snapshot Size

The number of snapshots is quite inetresting, but even more interesting, is the total size of the delta files all snapshots are occupying. They might be eating up all your precious SAN space. Plus, reverting to or committing a large snapshot is tricky. Add-VMSnapshotSize.ps1

Host Hardware Model

Want to see what models of hardware you are using in your datacenter? You could look at the summary tab of each host. Or run this script to add the info to the every Hosts tab in the VI Client. Select your Datacenter, select the Hosts tab and enjoy! Add-VMHostModel.ps1

Host ESX Version

Did you update all your ESX Servers to the latest version? Check it quickly using this script. Add-VMHostVersion.ps1

Host LUN Count

Last but certainly not least: are you sure every datastore you are using is available to all your ESX Servers? It is visible at a glance when you add the LUN Count to your VI Client! Add-VMHostLUNCount.ps1

 

Check zijn site voor allerlei top Powershell scripts: http://www.peetersonline.nl/

 

Bron: http://www.peetersonline.nl/index.php/vmware/add-custom-fields-to-vi-client-with-powershell-samples/

Script: Defrag all Local VMDK’s.


powerShellIcon

De volgende function zoekt eerst alle *.VMX bestanden op en vervangt daarna de extentie *.VMX naar *.VMDK. Deze *.VMDK bestanden worden in de $List geplaatst. Daarna worden alle VMDK’s gedefragmenteerd via de vmware-vdiskmanager.exe.

function Defrag-allVMDKs{
param([string]$path)
$vdiskmanager = “C:\Program Files\VMware\VMware Workstation\vmware-vdiskmanager.exe”
$parameter = “-d”
$List = get-childitem $path -recurse | where {$_.extension -eq “.vmx”} |
foreach-object -process { $_.FullName } | ForEach-Object {$_ -replace “.vmx”, “.vmdk”}
ForEach($vmdk in $List)
{
echo $vmdk
& $vdiskmanager $parameter $vmdk
}
}

Via het volgende commando kun de bovenstaande function gebruiken.

Defrag-allVMDKs <drive>\<path>

Als je dit in de Shell uitvoerd ziet het er als volgt uit:

image