Skip to content

Script

Script to add vSphere 6.5 VMCA Root Certificate to Trusted Certs Store

When running vSphere 6.5 deployments in default (recommended) mode, VMware Certificate Authority is its own root certificate authority. Everything fine and secure with this configuration, but your browser displays a warning because the root certificate is not trusted.
there-is-a-problem-with-this-security-certificate

I made a little script (VBS) that pulls the CA certificate from a vCenter Server or Platform Services Controller and adds it to the local trusted root certificates store. When the root CA is trusted, browser warnings are gone.

Read More »Script to add vSphere 6.5 VMCA Root Certificate to Trusted Certs Store

How to properly initialize PowerCLI 6.x in PowerShell ISE

With the release of vSphere 6.0 VMware has started to transform their distribution model of PowerCLI cmdlets from PSSnapins into modules. This is a good thing because modules are the preferred method of adding cmdlets to PowerShell. Unfortunately the changed behavior breaks plenty instructions on how to load VMware PowerCLI in ISE, including my own. The old method works for core cmdlets, but functions related to Distributed Switches or Storage Policies for example are missing.

If you have the latest version of PowerCLI installed but cmdlets are missing in PowerShell ISE, maybe you are using the old method to load cmdlets.

Get-VDSwitch : The term 'Get-VDSwitch' is not recognized as the name of a cmdlet, function, script file, or operable program.

Read More »How to properly initialize PowerCLI 6.x in PowerShell ISE

Product End Of Support Matrix now available as JSON (incl. Script)

The database used at my VMware Product End Of Support Countdown is now available in JSON. The database is based on VMware Lifecycle Product Matrix and allows you to use the information in scripts or for automation purposes.

vmware-product-lifecycle-json

I’ve also written a small script to demonstrate what this information can be used for.

Read More »Product End Of Support Matrix now available as JSON (incl. Script)

Script to add vSphere 6 VMCA Root Certificate to Trusted Certs Store

When running vSphere 6 deployments in default (recommended) mode, VMware Certificate Authority is its own root certificate authority. Everything fine and secure with this configuration, but your browser displays a warning because the root certificate is not trusted.
there-is-a-problem-with-this-security-certificate

I've written a little script (VBS) that pulls the CA certificate from a vCenter Server and adds it to the local trusted root certificates store. When the root CA is trusted, browser warnings are gone.
script-vmca-certificate

Read More »Script to add vSphere 6 VMCA Root Certificate to Trusted Certs Store

How to Create a Cron Job on vMA

The vMA (vSphere Management Assistant) is a virtual appliance provided by VMware that allows to manage vCenter Server or ESX Hosts and run scripts. You can also use it to run script periodically with cron. It is a small linux appliance delivered with all necessary tools out of the box. I usually deploy a vMA on each platform. This post describes how to prepare scripts to be used with cron and how to create cronjobs. The process is very similar on all vMA versions from vSphere 4.0 to vSphere 5.5.

Read More »How to Create a Cron Job on vMA

HP Proliant Gen8 Agentless Management floods ESXi and vCenter Logs

Hewlett-Packard introduced a new component called HP Agentless Management within their Gen8 Series. This feature is extensible though an agent running inside the operating system, in that case the ESXi Host. The package (hp-ams) is included in all customized VMware images provided by HP and the HP ESXi Offline Bundles. Unfortunately this package create some issues caused by excessive local logins. This might pointlessly blow up the database and logfiles. You can check that problem by opening the Event-Log provided by the ESXi Host which is flooded with the following messages:

User root@127.0.0.1 logged in as
User root@ logged out (login time: , number of API invocations: , user agent: )
User root@127.0.0.1 logged in as
User root@ logged out (login time: , number of API invocations: , user agent: )

hp-ams

In this post i am going to show how to workaround this issue and remove the hp-ams from you ESXi Host, and how to build a new image without that package.

Read More »HP Proliant Gen8 Agentless Management floods ESXi and vCenter Logs

Run Scripts in Linux Guests by using VMware Tools

Running commands inside a virtual machine without accessing it can be helpful in some cases. For example when you want to change an IP address from a Linux virtual machine that is not reachable through ssh. VMware provides the VIX (Virtual Infrastructure eXtension) API that helps you to write scripts to automate virtual machine operations and run programs within guest operating systems. I am going to show some basic VIX implementations using PowerCLI.

Read More »Run Scripts in Linux Guests by using VMware Tools

Migrate E1000 Adapter to vmxnet3 with Linux Virtual Machines

When you select Debian or Ubuntu as Operating System during the creation of virtual machines the wizard automatically selects E1000 as virtual network adapter. To get better network performance it is a best practice to change this to vmxnet3. But what if the virtual machine is already installed and running? The Adapter Type is grayed out, even when the virtual machine is powered off. How to change the Adapter Type later?Read More »Migrate E1000 Adapter to vmxnet3 with Linux Virtual Machines