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

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

Raiders of the Lost VMX

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 Continue reading Raiders of the Lost VMX

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

PowerCLI and the SDK – Part 1

In the Developer forum there was an interesting post called Resources for folks new to the vSphere Web Services SDK. Now unfortunately the Hello World guide was (again) only aimed at Java programmers.

Although PowerCLI is nearing perfection, you sometimes will have to go to the SDK methods and properties to make your script go that extra mile. Since I know, from first-hand experience, that the first steps in the SDK are not that simple for PowerShell programmers/scripters I decided to start a series to make the SDK more accessible for the PS people.
Continue reading PowerCLI and the SDK – Part 1

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

Scripts for Yellow Bricks’ advise: Thin Provisioning alarm & eagerZeroedThick

On the Yellow Bricks blog there was today a very interesting entry called Performance : Thin Provisioning. Besides the link to the excellent VMware document called Performance Study of VMware vStorage Thin Provisioning, Duncan also included some tips and tricks.

Since I’m in favour of automating as much as possible in my vSphere environment, I decided to have a look how all this could be scripted.

Continue reading Scripts for Yellow Bricks’ advise: Thin Provisioning alarm & eagerZeroedThick

CreateAlarm not (always) compatible with the vSphere client

In a recent PowerCLI Community thread someone asked how he could create Alarms with the current PowerCLI build. Since there is no PowerCLI cmdlet (yet) to create Alarms I had to fall back on the CreateAlarm method from the SDK.

The procedure as described in the vSphere Web Services SDK Programming Guide, chapter 15, is quite simple. The script I wrote created the alarm, but to my amazement I couldn’t use the Edit Settings option in the vSphere client. The option was grayed out.

alarm-edit-settingsFirst I doubted the correctness of my script but after some tests I could confirm that the alarm worked correctly. Continue reading CreateAlarm not (always) compatible with the vSphere client

Thick to Thin with PowerCLI and the SDK

One of the interesting new features in vSPhere is vStorage Thin Provisioning. I’m not going to explain what Thin Provisioning is all about. For that you can consult several knowledgeable blogs (for example this entry on Virtual Geek) and/or books (for example Scott Lowe’s excellent Mastering VMware vSphere 4.0).

The problem I have with Thin Provisioning, is that there are a lot of existing guests and templates out there that were created with Thick VMDKs in the past. The only documented way I could find to convert these Thick VMDKs to Thin VMDKs was to use svMotion from the vSphere client.

Now that is not a solution I want to (or can) use in an automated environment. Continue reading Thick to Thin with PowerCLI and the SDK