PowerCLI

vSphere 6.0 - How to use ESXCLI Commands 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.

get-esxcli

Read More »vSphere 6.0 - How to use ESXCLI Commands in PowerCLI

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 »Permanently disable ESXi 5.5 coredump file

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 »VM Export/Import PowerCLI Script

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.

get-esxcli

Read More »Howto use ESXCLI in 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"