«

»

Jan 21 2014

ESXi host VMkernel.Boot.terminateVMOnPDL configuration using PowerCLI

I have already written a blog post about how you can configure the ESXi host  setting disk.terminateVMOnPDLDefault in vSphere version 5.1. You can find that blog post here.

I have received a couple of questions about how to configure the setting, called VMkernel.Boot.terminateVMOnPDL, in ESXi 5.5 so i decided to put together a blog post about it. The ESXi host configuration can be found in the advanced section and configured in the UI according to the below figures.
Screen Shot 2013-12-22 at 20.04.41

Change the No value to Yes if you want to do it manually.
Screen Shot 2013-12-22 at 20.03.55

This blog post will provide you with two options:

  • .ps1 file you can run which will take care of the configuration and send you an email report of the result.
  • Script you can copy and past directly in the PowerCLI window after you connect to your vCenter Server.

.PS1 PowerCLI script file

The software used when creating and testing the below scripts includes:

  • VMware vCenter Server 5.5 running on Windows Server 2008 R2
  • VMware ESXi 5.5
  • PowerCLI 5.5
  • PowerShell 2.0

This script will most likely not work when using PowerShell 3.0.

The below script will check if the VMkernel.Boot.terminateVMOnPDL parameter is set to True or not. If it is set to default value, False, the script will change it to True.
When the configuration is finished the script will send you an email report of what has been done.

Change the following parameters in the below script to match your environment:

  • $vcenter = “vc-demo01“
  • $vcenteruser = “vcdx56\magnus“
  • $vcenterpw = “notsecret“
  • $sendTo = “magnus@vcdx56.com“
  • $sendFrom = “vc-demo01@vcdx56.com“
  • $smtpserver = “smtp.vcdx56.local“

The script email report looks like this.
Screen Shot 2014-01-21 at 12.44.13

Script

If you decide to run this script by copy and paste the below PowerCLI code to your PowerCLI window you must understand that it will set the VMkernel.Boot.terminateVMOnPDL to true no matter if it is already set to true or not.

The software used when creating and testing the below scripts includes:

  • VMware vCenter Server 5.5 running on Windows Server 2008 R2
  • VMware ESXi 5.5
  • PowerCLI 5.5
  • PowerShell 2.0

This script will work when using PowerShell 3.0 as well.

The below figure shows the output from the script:
Screen Shot 2013-12-22 at 21.45.17

2 pings

  1. ESXi host disk.terminateVMOnPDLDefault configuration using PowerCLI | VCDX56

    […] Continue reading if you need to configured the ESXi host disk.terminateVMOnPDLDefault setting in a version prior to 5.5. If you need a configuration script for vSphere 5.5 i got a post here. […]

  2. Yet another blog post about vSphere HA and PDL » boche.net – VMware vEvangelist

    […] ESXi host VMkernel.Boot.terminateVMOnPDL configuration […]

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">