PowerCLI and the SDK – Part 2 – Prepare the trip

When I publish scripts that use SDK properties or methods, one of the questions that comes back regularly is “Where do you find what to use ?“.
Let me assure you, there are no tricks, optical illusions or black magic involved. I’m simply using the numerous resources that are made available in the VMware Developer community.
Diving into the SDK is like making a big trip, you have to start prepared !
Continue reading PowerCLI and the SDK – Part 2 – Prepare the trip

Events – Part 4 : Who started that VM ?

In a comment on my Events – Part 3 : Auditing VM device changes post, Ian asked if it was possible to report who started a VM.

To take away the suspense, yes that can be done by using the information from two of my earlier post.

Poweredon-report

Since I considered it a bit too long to give the solution in a comment, this post.

Continue reading Events – Part 4 : Who started that VM ?

Events – Part 3 : Auditing VM device changes

In a comment on my Events, Dear Boy, Events – Part 2 post, Sham was wondering if it was possible to find out which device was actually changed on a guest.

Sham was able to find out who did a change, at what time and on which machine, but he also wanted to know what exactly was changed.

Since this is the kind of audit information that I would like to have as well I had a closer look. And luckily the VmReconfiguredEvent object had all the required information in the configSpec property.

Continue reading Events – Part 3 : Auditing VM device changes

RDM & vMotion: inaccessible direct-access LUN

When you try to migrate a guest, that is using one or more RDM disks, you might see this message.

compatibility

The reason this is most probably because the LUN IDs are different on the source and the destination ESX server.

One solution is:

  • stop the guest
  • write down the Physical LUN ID
  • remove the RDM disk(s)
  • vMotion the guest
  • add the RDM disk(s) to the guest based on the Physical LUN ID
  • start the guest

But why do this the hard (manual) way when we have PowerCLI ?

Continue reading RDM & vMotion: inaccessible direct-access LUN

Dutch VMUG event 2009 – The (nearly) lost tapes

During my Dutch VMUG event 2009 presentation there was a technical problem with some of the demo videos I prepared. Luckily an audience member came to the rescue by downloading the excellent VLC Video Player via his cell phone. Thanks again for the assistance 🙂

To make up for this technical mishap, the demo videos with a short explanation.

Continue reading Dutch VMUG event 2009 – The (nearly) lost tapes

Dutch VMUG event 2009 – handy scripts

Today the Dutch VMUG event 2009 took place. It was my first visit but this truly is an amazing event. Lots of knowledgeable and interested visitors.

During my session I showed some small, handy scripts that I use on a regular base. In fact they are stored in my profile.

As promised, here are the scripts.

Continue reading Dutch VMUG event 2009 – handy scripts

Switching to the Paravirtual SCSI Controller

Since ESX 4u1 you have a new SCSI controller type available for your guests, the VMware Paravirtual SCSI Controller.
From several sources we learn that the performance of this controller is better.

See for example the New !! Open unofficial storage performance thread where Lars gave some interesting performance figures.

And in the PowerCLI Community there is a recent thread, called Change SCSI adapter to paravirtual with PowerCLI, where the user asks how he can change his disk adapters.

Reason enough to look how I could use PowerCLI to migrate guests to the VMware Paravirtual SCSI Controller.

Continue reading Switching to the Paravirtual SCSI Controller

Alarm expressions – Part 2 : Event alarms

In the previous part of this series (Alarm expressions – Part 1 : Metric alarms) I showed how you could create alarms that are triggered when a metric crosses a watermark.

zenIn this part I will show you how to create alarms when one or more specific events occur in your vSphere environment. More specifically I will show you how to create an alarm that will fire when someone adds or removes a license from your vCenter.

Continue reading Alarm expressions – Part 2 : Event alarms

Alarm expressions – Part 1 : Metric alarms

In a previous entry (Scripts for Yellow Bricks’ advise: Thin Provisioning alarm & eagerZeroedThick) I showed how you could use performance metrics to fire an alarm. The MetricAlarmExpression in that script requires a PerfMetricId to specify which performance metric the alarm should monitor. The counterId in that object is an integer and it is perhaps not too obvious which value corresponds with which metric.

metric-alarm

This blog entry shows how you can quickly get a list of permitted counterIds (and instances) for a specific entity. And it will show how to create some “impossible” alarms !

Continue reading Alarm expressions – Part 1 : Metric alarms

Events, Dear Boy, Events – Part 2

In a previous entry (see Events: a great source of information – Part 1) I showed how to use the VmCreatedEvent event to find out which guests were created longer than 30 days ago.

In the vSphere SDK documentation there are currently 432 events listed. That makes it sometimes hard to decide which event(s) to use for your reporting/auditing needs.

But luckily there are some tricks to make it easier on you.

Continue reading Events, Dear Boy, Events – Part 2