Archive

Archive for December, 2009

PowerCLI & vSphere statistics – Part 1 – The basics

December 30th, 2009 12 comments

Another popular subject in the VMTN PowerCLI community are statistics. Quite often it’s not entirely clear to the user what is available, how the data can be extracted and how PowerShell/PowerCLI can be used to convert the raw metrics into usable reports.

Before you can fully use all that is available, there are a few key concepts that you should understand.

In this series I will try to explain some common questions.
Read more…

PowerCLI and the SDK – Part 2 – Prepare the trip

December 23rd, 2009 3 comments

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 !
Read more…

Categories: PowerCLI, PowerShell, SDK Tags: , ,

Events – Part 4 : Who started that VM ?

December 20th, 2009 5 comments

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.

Read more…

Events – Part 3 : Auditing VM device changes

December 18th, 2009 13 comments

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.

Read more…

RDM & vMotion: inaccessible direct-access LUN

December 16th, 2009 15 comments

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 ?

Read more…

Categories: PowerCLI, PowerShell, RDM, SDK, vSphere Tags: , , ,

Dutch VMUG event 2009 – The (nearly) lost tapes

December 12th, 2009 4 comments

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.

Read more…

Dutch VMUG event 2009 – handy scripts

December 11th, 2009 4 comments

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.

Read more…

Switching to the Paravirtual SCSI Controller

December 8th, 2009 14 comments

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.

Read more…

Raiders of the Lost VMX

December 2nd, 2009 57 comments

One of the more popular post in the VMTN PowerCLI community is this one HowTo search for all VMX files in all datastores and register them into VC ?

The original script that I provided in the thread is now more than one year old and there seem to be some issues with clusters in a vSphere environment.

Time to re-write the script and make it a bit more userfriendly.

Update 1: there was an issue when scanning empty datastores

Update 2: added the option to find and register Templates

Update 3 – April 29th 2010: added the option to ignore specific folders

Update 4 – April 30th 2010: fixed parent datacenter lookup problem + added -checkNFS and -whatif option

Update 5 – May 2nd 2010: fixed a bug with nested folders and the -ignore parameter

Update 6 – August 6th 2010: minor changes to the parameter testing and the Get-Usage function

Update 7 – August 17th 2010: fixed a bug with the -dsNames option. Thanks to goonzie for reporting the bug

Indiana-hat Read more…

Categories: PowerCLI, PowerShell Tags: , , , ,