set syslog server for all Hosts

run the following commands to add a syslog server to all esxi hosts in your vCenter

Get-VMHost | Set-VMHostSysLogServer -SysLogServer ‘your syslog server’ -SysLogServerPort 514

afterwords you have to open the firewall for outgoing syslog traffic

Get-VMHost | Get-VMHostFirewallException | where {$_.Name.StartsWith(‘syslog’)} | Set-VMHostFirewallException -Enabled $true

vSphere Flash Read Cache – the powershell way

Recently we’ve upgraded one of our vcenters to 5.5 and added some ssd disk to each host. After configuring all hosts to enable vFlash aka vSphere Flash Read Cache, I’ve written the following small script to enable vFlash on all vms in a folder. Currently it is filtered by hard disk size, feel free to add other filters.
Continue reading

Veeam get snapshot removal time

Sometimes it’s useful to find snapshot removal times for every VM in one or more job. This handy script below will do this job:

Add-PSSnapin VeeamPSSnapin
$Jobs = Get-VBRJob -Name "Name*"
foreach ($Job in $Jobs) {
	$LastSession = $Job.FindLastSession()
	$TaskSessions = $LastSession | Get-VBRTaskSession
	foreach ($vm in $TaskSessions) {
		$asd = $vm.Logger.GetLog().UpdatedRecords | where-object {$_.title -eq "Removing VM snapshot"} | Select-Object title, starttime, updatetime
		$diff = $asd.updatetime - $asd.starttime
		Write-Host $vm.Name `t $diff.TotalMinutes
	}
}

change dns servers

Here’s a short script to change DNS settings on all you VMHosts:

Add-PSsnapin VMware.VimAutomation.Core
$VCServer = "[your vc-server]"
$DNSServer = ("[DNS IP 1]","[DNS IP 2]")
Connect-VIServer -Server $VCServer
$Hosts = get-vmhost
ForEach ($VMHost in $Hosts) {
    Write-Host "Changing DNS settings for host $($VMHost)"
    Get-VMHost -Name $VMHost | Get-VMHostNetwork | Set-VMHostNetwork -DnsAddress $DNSServer
    Write-Host "************************************"
}

You can run this during production time, no downtime required. Just make sure you have a correct DNS config on you DNS servers

Regards, Christian

Veeam Proxy utilization

Some time ago we’ve decided to switch from our current backup solution to Veeam. In the meantime we’ve deployed various backup proxies to handle the load coming from different VMware clusters and standalone ESXi servers.

To get a feeling how much load is produced and to know how much proxies are needed I’ve had a look at the proxies the first few days. As our backup window is usually starting in the evening I’d like to have a report the next morning so I can see how our proxies have performed. So I’ve wrote a powershell script which will send me a report with load and data transferred the last 24 hours each morning.
Continue reading

Upgrade to SolarWinds Virtualization Manager 5.1

 

Today SolarWinds released Virtualization Manager version 5.1. We did the upgrade on our infrastructure this afternoon. It was very easy and quick upgrade.

  • Download Virtualization-Manager-Appliance-Upgrade-ISO-5.1.0.zip
  • Extract the zip file
  • attached the iso file via the VMware VI Client

Continue reading