DefinIT

Automate the deployment of vROps (supporting vDS)

| 18/05/2015 | Tags: , , , ,

powercli-logoRecently I have been looking at William Lam‘s excellent post on automating the deployment of vROps.

After having a play around with it, to suit my own needs, I made some modifications to the Powershell script so it would support distributed switches.

(more…)

Another fantastic South West UK VMUG

| 08/06/2014 | Tags: , , , , , , ,

vmug_logoOn the 3rd of June we had our second South West UK VMUG and I am pleased to say it went superbly well.

As before we held it at the Mshed facilities in Bristol.

We had a great day with many sessions from sponsors,vendors and community speakers alike!

Big thanks go to our speakers that day who were..

  • Justin Rohan – @justinrohan – Nimble Storage – Sponsor
  • James Smith – @james55smith – PernixData – Sponsor
  • Julian Regel – @jr_on_the_cloud – Community session on vCD
  • Adam Bohle – @adambohle – VMware – vCAC session
  • Jonathan Medd – @jonathanmedd – Community session on PowerCLI/Automation
  • Richard Munro – @RikMunro – VMware – vCHS Session

One of the South West UK VMUG leaders Barry Coombs took a fantastic time lapse video of the day which can be viewed on his blog site.

Here are a few shots from the day

swukvmug

 

 

 

 

 

 

 

 

 

 

 

 

swukvmug

 

 

 

 

 

 

 

 

 

 

 

 

swukvmug

 

London VMUG – July 2013

| 05/07/2013 | Tags: , , , , , ,

20130705003.pngYesterday I attended my second ever #LonVMUG and did my first ever VMUG presentation! Generally it was a great day, with loads of really good sessions and some really cool community and vendor content.

As ever it was great day for socialising and networking with people who you interact with on twitter. For me one of the major benefits of the VMUG is learning from other people’s experience. Twitter was alive with the hastag #LonVMUG and it definitely adds something to the day to be active (more…)

PowerCLI Basics: Auditing Virtual Machine Hardware and Tools using PowerCLI

| 27/06/2013 | Tags: , , , , , ,

PowerCLI LogoThe VM estate that I manage is large: there are more than 20 different clusters and over 300 hosts of varying ages and hardware levels – as a consequence there are various different versions of ESX and ESXi running. Upgrading the hosts is somewhat akin to painting the Forth Bridge, a never-ending task. So keeping the thousands of VMs at the correct hardware and VMtools versions can be a bit of a losing battle.

What if I want a report showing me all the VM names, Hardware Version, VMtools Status, Tools Version Status and Tools Version – how do I go about finding that? (more…)

VMware PowerCLI – Set Path Selection Policy on all LUNs for a host

Just a quick script to set the Path Selection Policy on any LUNs on a host that do not have your target policy enabled. The script sets the server to Maintenance mode first, evacuating any VMs if you are in a full DRS automated environment. While this is not strictly necessary, it was required for my production environment just to be safe.

param( [string] $vCenterServer = $(Read-Host -prompt "Enter vCenter Server Name"),
[string] $TargetPolicy = $(Read-Host -Prompt "Enter target policy (RoundRobin, Fixed or MostRecentlyUsed)"),
[string] $TargetHost = $(Read-Host -Prompt "Enter target Host"),
[switch] $WhatIf)

# Add the VI-Snapin if it isn't loaded already
if ((Get-PSSnapin -Name "VMware.VimAutomation.Core" -ErrorAction SilentlyContinue) -eq $null ) {Add-PSSnapin -Name "VMware.VimAutomation.Core"}

Connect-VIServer $vCenterServer | out-null

Write-Host "Connected to: " $vCenterServer -ForegroundColor Green
Write-Host "Target PSP: " $TargetPolicy -ForegroundColor Yellow
Write-Host

switch ($TargetPolicy) {
RoundRobin { $DisplayPolicy = "VMW_PSP_RR"; }
MostRecentlyUsed { $DisplayPolicy = "VMW_PSP_MRU"; }
Fixed { $DisplayPolicy = "VMW_PSP_FIXED"; }
default { Write-Warning "Unknown PSP selected! Please consult the help and try again."; exit }
}

Write-Host "Setting Policy to"$TargetPolicy" on "$TargetHost -ForegroundColor Green

if($WhatIf) {
$vHost = Get-VMHost -Name $TargetHost
$vHost | Set-VMHost -State Maintenance -Evacuate -WhatIf
$vHost | Get-ScsiLun -LunType "disk" -ErrorAction SilentlyContinue | where {$_.IsLocal -eq $false -and $_.MultipathPolicy -ne $TargetPolicy} | Set-ScsiLun -MultipathPolicy $TargetPolicy -WhatIf
$vHost | Set-VMHost -State Connected -WhatIf
} else {
$vHost = Get-VMHost -Name $TargetHost
Write-Host "Setting "$TargetHost" to Maintenance Mode" -ForegroundColor White
$vHost | Set-VMHost -State Maintenance -Evacuate
$vHost | Get-ScsiLun -LunType "disk" -ErrorAction SilentlyContinue | where {$_.IsLocal -eq $false -and $_.MultipathPolicy -ne $TargetPolicy} | Set-ScsiLun -MultipathPolicy $TargetPolicy
Write-Host "Exiting Maintenance mode on"$TargetHost -ForegroundColor White
$vHost | Set-VMHost -State Connected
}