PowerCLI

vSphere 5.5 - Managing Tags with PowerCLI

With the new release of vSphere PowerCLI 5.5 VMware made the tagging Feature (introduced in vSphere 5.1) scriptable. The new cmdlets are working with vCenter 5.1 and vCenter 5.5. They allow you to assign tags to objects and to search for objects based on their tags. Unfortunately there is no cmdlet to create tags at the moment. The feature is still not available within the API.

New Tag related cmdlets in vSphere 5.5:

  • Get-Tag - retrieves the tag assignments of objects.
  • New-TagAssignment - assigns a tag to the specified object.
  • Remove-TagAssignment - removes a tag from the specified object.

Read More »vSphere 5.5 - Managing Tags with PowerCLI

ESXi 5.x Installation on Intel NUC fails with "No Network Adapters"

When you try to install ESXi 5.x on an Intel Next Unit of Computing (NUC) system, the installation fails with the following error message:

No Network Adapters

No network adapters were detected. Either no network adapters are physically connected to the system, or a suitable driver could not be located. A third party driver may be required.

Ensure that there is at least one network adapter physically connected to the system before attempting installation. If the problem persists, consult the VMware Knowledge Base.

3rd Generation Intel NUC Models:

  • Intel NUC DC53427HYE
  • Intel NUC DC3217IYE
  • Intel NUC DC3217BY

4th Generation Intel NUC Models:

  • Intel NUC D54250WYK
  • Intel NUC D34010WYK
  • Intel NUC D54250WYKH
  • Intel NUC D34010WYKH

5th Generation Intel NUC Models:

  • Intel NUC5i7RYH
  • Intel NUC5i5RYH
  • Intel NUC5i5MYHE
  • Intel NUC5i5RYK
  • Intel NUC5i3RYH
  • Intel NUC5i3MYHE
  • Intel NUC5i3RYK

This message is caused by missing Gigabit Ethernet Controller drivers that are not included in the ESXi Base Image. To fix that, you have to create an customized ESXi Image and add the proper drivers.

Tested with:

  • VMware ESXi 5.0
  • VMware ESXi 5.1
  • VMware ESXi 5.5

Read More »ESXi 5.x Installation on Intel NUC fails with "No Network Adapters"

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

Special Characters in dvSwitch Port Groups and PowerCLI

Do you use special characters in Port Groups or dvSwitch names? Then you might have problems with Scripts, Host Profiles or PowerCLI. Of course, usage of special characters like (&/"%) was always a bad idea, but sometimes you want to have nice-looking objects, as you might assume that names are nonfunctional labels. Unfortunately there are some issues with PowerCLI. And even worse, it is inconsistent. This post shows up a workaround when using special characters in Port Groups.

Read More »Special Characters in dvSwitch Port Groups and PowerCLI

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

StackOverflowException with Update Manager PowerCLI and WMF v3

While doing some patchmanagement I faced an issue with the current Windows Management Framework 3.0 (WMF) and the VMware vSphere Update Manager PowerCLI 5.1. Everytime when i invoked one of the VMware.VumAutomation cmdlets the PowerShell crashed with an StackOverflowException:

Process is terminated due to StackOverflowException.

I couldn't locate the root cause, so i started to narrow down the problem with different operating system. After testing various systems i noticed that the problem only appears on Windows 7 Systems with WMF3 installed manually and Windows 8 Systems where WMF3 is installed by default.Read More »StackOverflowException with Update Manager PowerCLI and WMF v3

Getting Started with PowerCLI 5.1 and PowerShell 3.0

In this post i am going to give a quick startup guide to the new version of PowerCLI 5.1 with the Windows Management Framework 3.0, which is available with Windows 8. Both are recently published releases of the great PowerShell scripting engine that every VMware admin should know. First i am going to give a quick guide how to set up and configure your environment. Later i am going to show the new features of PowerCLI 5.1 and PowerShell 3.0.Read More »Getting Started with PowerCLI 5.1 and PowerShell 3.0

Datastore cluster permissions lost - Script Workaround

Placing the datastore clusters inside a folder in some cases is not an option, so i decided to write a PowerCLI script which creates the permisson after vCenter service restart. As you might know, all permissons set at datastore cluster level are gone after vCenter restarts. This workaround referred to VMware KB: 2008326.

First you have to find affected permissons. This applies to permissons which are set directly to datastore clusters. A datastore cluster is referred as "StoragePod", so this is the keyword:

Read More »Datastore cluster permissions lost - Script Workaround