We were fortunate enough to get a bit of a scoop on the latest episode of GetScripting . Not only did we have chance to talk to Luc Dekens about recently becoming a PowerShell MVP, but he also gave us a bit of a scoop about his upcoming new book (due out in 2014), vSphere Performance Reporting with PowerCLI . Hopefully they’ll change the cover typo by the time it gets printed :-)
Lots of hard work is already being put into organising this year’s UKVMUG. One of the best attributes of these type of events is the community content - real world content from real people, i.e. not Vendor A, B or C telling you that their latest product will solve all of your problems. (Of course that’s there too if you want to hear about that kind of thing)
A critical aspect of community content is that you are always trying to bring new people through to bring content from different areas / backgrounds / experience.
I was surprised to discover that there were no native cmdlets for managing iSCSI VMKernel Port Binding in PowerCLI. So I made my own Get-VMHostiSCSIBinding and Set-VMHostiSCSIBinding functions and have shared them here in case anyone else finds them useful. Here’s a couple of examples of how they can be used:
Retrieve iSCSI Port Binding details Get-VMHost ESXi01,ESXi02 | Get-VMHostiSCSIBinding -HBA "vmhba32" | Format-Table PortGroup,Vmknic,IPv4,IPv4SubnetMask,MACAddress -AutoSize 2) Set iSCSI Port Binding details
Following a switch over from self-signed certificates for vCenter 5.1 to those signed by a internal CA, access to Update Manager via the vSphere Web Client (which seems fairly limited anyway in terms of Update Manager) no longer worked. It was failing with “There was an error connecting to VMware vSphere Update Manager.”
The Webclient log file vsphere_client_virgo.log contains the following error
ERROR [ERROR] http-bio-9443-exec-5 c.vmware.vum.client.adapters.updatemanager.aspects.LoggingAspect Exception caught in class ‘com.
I needed to migrate some Email Alarm Actions between two vCenters; the target at version 5.1 being a replacement for an existing 5.0 vCenter. The first task was to identify which Alarm Definitions had been configured with an email alert. To do that I used the following PowerCLI command to export them to a CSV file:
Get-AlarmDefinition | Select Name,@{N="EmailAction";E={$\_ | Get-AlarmAction | Where {$\_.ActionType -eq "SendEmail"}}} | Export-Csv AlarmActions.csv -NoTypeInformation I could then easily identify those which needed to be migrated across.
I needed to check the configuration of all hosts in an environment for their ESXi Dump Collector Settings and then ensure they were all set to the correct values. I was using the handy ESXi Dump Collector which ships as part of the vCenter 5.1 package.
There are no PowerCLI cmdlets for doing this (yet) so I made my own, Get-VMHostDumpCollector and Set-VMHostDumpCollector. Since you can get and set this item via esxcli I used the Get-ESXCli cmdlet for most of the work.
PowerCLI has shiped with cmdlets for managing the Syslog configuration of ESXi hosts for some time, Get-VMHostSysLogServer and Set-VMHostSysLogServer. Unfortunately, neither of these (yet) support the configurations mentioned in the below two posts for multiple Syslog servers or different protocols, such as SSL.
http://www.boche.net/blog/index.php/2011/07/23/configure-a-vcenter-5-0-integrated-syslog-server/
http://blogs.vmware.com/vsphere/2012/04/configuring-multiple-syslog-servers-for-esxi-5.html
So for the time being I have put together two functions, Get-VMHostSyslogConfig and Set-VMHostSyslogConfig, to supplement what you can currently do with the following additional options:
While I was removing some ESXi 5.0 hosts from a 5.1 vCenter I encountered the following issue with a couple of them:
General system error: Invalid Fault
In the vCenter vpxd log file this message was accompanied by
msg = “vim.fault.AdminNotDisabled”
It turned out to be a known fault where Lockdown Mode was out of sync between vCenter and the ESXi host. In vCenter it showed as enabled:
However, in the ESXi host it was showing as disabled.
The unbelievably successful vCheck script from Alan Renouf which can be used to provide a daily report on your vSphere (and other technologies) environment is now available on GitHub. This is a great move since it more easily enables further community input to develop this tool further by allowing you to submit contributions via a central repository.
If you’ve not used GitHub before then head over to the home page and create an account.
Having installed vCenter 5.1 U1a, it was time to replace certificates. Using the vCenter Certificate Automation Tool to replace self-signed SSL certificates with full certificates you will be taken through various menus to replace each certificate:
When the time comes to replace the vCenter Server certificate, you will firstly be in Menu 4 and then selecting Option 2, Update the vCenter Server SSL Certificate (starting to sound like a dreaded phone call to a utilities or government call centre yet?