Tag Archives: PowerCLI - Page 2

Permanently disable ESXi 5.5 coredump file

The new coredump file feature in vSphere ESXi 5.5 creates a file to extend the coredump partition. This usually happens when you upgrade from a previous version to ESXi 5.5, or you install ESXi to a USB drive or SD card. This coredump file is created on a random VMFS datastoore by using a smart selection algorithm. This random placement causes different kind of problems, for example when you want to delete a datastore. Another problem might occur in an EMC VPLEX deployment where you want to failover VMs to the secondary site in a PDL situation (VMkernel.Boot.terminateVMOnPDL=1 / Disk.AutoremoveOnPDL=0). Datastores that had a coredump file configured can't get mounted back when the volume leaves the PDL state after a site failure has been fixed.

To workaround this issue you might want to permanently disable the coredump file. You can't just disable it, as it gets created automatically after a reboot.

Read more »

VM Export/Import PowerCLI Script

I wrote this little script snippet to export and import virtual machines from one vCenter to another. This might help for migrations where you have to add virtual machines from a datastore manually to the vCenter inventory. This script does not export any virtual machine disks or configuration files. It's only supposed as replacement for adding virtual machines from an existing datastore the the inventory.

Read more »

Howto use ESXCLI in PowerCLI

PowerCLI, a set of PowerShell extensions for vSphere, is a great tool for automating VMware configuration and management tasks. It allows you to change a lot of ESXi host and vCenter settings. One powerful cmdlet is Get-EsxCli which allows you to run ESXCLI tasks from your PowerCLI console. ESXCLI is the main configuration command on an ESXi host. This post explains how to use the Get-EsxCli cmdlet.


Read more »

ESXi 5.5 Performance Metrics

Shot post on performance metrics to be used for performance analysis with esxcfg-perf.pl for example.

Read more »

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 »

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 »

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@ logged in as
User root@ logged out (login time: , number of API invocations: , user agent: )
User root@ logged in as
User root@ logged out (login time: , number of API invocations: , user agent: )


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 »

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 »

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 »

Add multiple ESXi Hosts to vCenter with PowerCLI

When you want to add many VMware ESXi Hypervisors to your vCenter inventory, a small one-liner might save you a lot of time. You can add hosts based on consistent host numbering, IP-Addresses or use a textfile for input.

Read more »