HPE PDU Powershell module

As a follow-up of my exploration of the HPE PDU REST API I wanted to create a Powershell module as a wrapper for the API.

I’ve previously written a post on how to create a Powershell module as a wrapper for an API here. The PDU module will be built in the same way where there will be a private function that handles the actual API requests.

This time I also wanted to go a bit further and split out the functions into individual script files that the module root file will load.
With individual files the maintenance of the functions as well as the split between private and public functions would be easier.… continue reading

Automating two-node vSAN cluster setup

In a previous post I described how we are setting up remote offices for a customer with two-node vSAN clusters. I meant to get this post out right after that previous one, but things happened… Anyways, here’s how we automated those two-node vSAN clusters.

Currently we have 7 of these racks ready with more to come. As these will be installed at distant locations we are extra keen on knowing that they are all configured as they should, and that the configuration is the same cross these multiple locations.

Of course, this calls for automation. And with our favorite automation tool PowerCLI we have put together a script to do the vSAN configuration for us.… continue reading

Slides and script from VMUG session in December

I had the pleasure of giving a talk about how to do monitoring of the vCenter Server during the VMUG Oslo meeting in December. The session was an extension of what I presented during the VMUG meetings in May and the vBrownbag session during VMworld Europe.

The demos showed how we can get health status and metrics from a vCenter Server Appliance utilizing the new REST APIs shipped in 6.5 and 6.7. During the session I built out a Grafana dashboard with version and uptime information about the vCenter, the health status, vCenter service status, disk utilization and CPU/Memory utilization.

Detailed information about how I’ve built out these dashboards can be found here.… continue reading

vSphere Performance – vCenter Server Appliance (VCSA) monitoring

This post is a (late) follow-up on a previous post I did about exploring the monitoring endpoints of the vCenter Server Appliance (VCSA), and an addition to the vSphere Performance blog series.

Now we will add performance metrics and health status of the VCSA to our monitoring solution. We’ll utilize the REST APIs in vCenter and feed the data into our Influx database and visualize it in Grafana.

In vCenter we have the Appliance Management page also refered to as the VAMI. We will use this as a blueprint of what we want to visualize, but we’ll try to fit the important parts into a single Grafana dashboard.… continue reading

Exploring monitoring endpoints in the vCenter Server Appliance (VCSA) REST API

For a long time, actually since we migrated to the VCSA in 6.5 last year, I’ve wanted to utilize the REST API in the appliance to have some monitoring of them.

For several reasons I’ve had to put that on hold, one of them being that there seems to be something wrong with the back-end authentication calls. I get authentication errors on certain calls no matter which user I am logged in with (also the vsphere.local admin account).

 

After deciding to check it more closely I eventually found a few errors in the VCSA logs which in turn led me to this article by Ryan Harris.… continue reading

Automating disk limits in vSphere

Following up on my last post on Limiting disk i/o in vSphere we will now see how to automate this.

First off we need some way to identify what limit a specific disk should have.

You can do this in multiple ways, you could use an external source, you can use Tags or as we’ve done, Storage Policies.

All our VMs and VMDKs have a Storage Policy to control the Storage it will be compliant with. We have named our policies so we can identify what kind of limit it should have.
We can now use this to set the limit corresponding to the policy.… continue reading

Working with disk limits in PowerCLI

This will be a post following on the previous one on how to control disk i/o in vSphere

That post showed how you set IOPS limits either through the UI or with PowerCLI.

Even though you set the limit on individual disks you need to work through the VM. And when you retrieve the disk limits for a VM you’ll get back limits on disks identified by the device key and not the label.

To make this a bit easier to work with I’ve created some Powershell functions that wraps the *-VMResourceConfiguration cmdlets and one that gives you the label of the disks when you query the limits for a VM.… continue reading

vSphere Performance data – Monitoring VMware vSAN performance

In my blog series on building a solution for monitoring vSphere Performance we have scripts for pulling VM and Host performance. I did some changes to those recently, mainly by adding some more metrics for instance for VDI hosts.

This post will be about how we included our VSAN environments to the performance monitoring. This has gotten a great deal easier after the Get-VSANStat cmdlet came along in recent versions of PowerCLI.

We will build with the same components as before, a PowerCLI script pulling data and pushing it to an InfluxDB time-series database and finally visualizing it in some Grafana dashboards.… continue reading

Automating iLO config and OneView setup for HPE servers

We have quite a few Blade Enclosures with BL460c server blades in them and have been happy with those. For managing these we are primarly using HPE OneView and in some cases the Onboard Administrator (OA).

Our latest batch of new hardware however was DL360 and DL380 rack servers. These will also be managed by OneView primarly, but initially we need to do some iLO config on each server which in the case of blades are done by the OA. They will also have to be added to OneView manually while the blades would be brought in automatically from the chassis.… continue reading

Import-SpbmStoragePolicy error – Object reference not set to an instance of an object

In a previous post I’ve talked about issues in the StoragePolicy and Tag cmdlets in PowerCLI. I found a workaround by ignoring certificate warnings and setting my date format to en-US.

Today I tried to replicate some Storage Policies from one vCenter to another and I found that I got new errors…

I can export the policies without issues, but when I try to Import the policy to the new vCenter I get the following error: “Object reference not set to an instance of an object”. Update 2018-04-06: VMware has confirmed the issue and stated it will be fixed in PowerCLI 10.1

I double-checked my workaround found in the mentioned blog post, but that was in place.… continue reading