Here is a very simple linux bash script to shut down all VMs of a ESXi host and the host itself, for example when a power failure occurs, this script can be used in UPS software. Some time ago a posted how to use such script in an HPE UPS environment. You can find the post here.
When you connect your storage device to your ESXi hosts, a Path Selection Policy (PSP) will selected based on defined rule set. To help the host to select the right policy for your device, you have a few options. I personally prefer to create a device specific rule based on Vendor and Model. I will describe for ways to get the information about your device you need.
Here is a short PowerCLI script to copy vSwitch PortGroups from a source host to a target host. Security policies will be copied too. The switch at the target host has to be created already. The script takes inheritance into account. This means just setting, changed at PortGroup-level are copied. All other settings are inherited.
There are a few CLI methods to configure advanced settings in ESXi Hosts. It depends on where you are (vMA/Linux, Windows Client, Console) and what you want to do (configure all hosts or just a specific host, …) which option fits best. Here I describe the options: native PowerCLI, esxcli (console), esxcli (get-esxcli), esxcli (get-esxcli -v2) to:
- All settings
- All settings in a specific Tree or Folder (eg.
- A specific option
- All settings that differ from default settings (Delta)
With November 2015 public CAs do not issue new certificates that uses internal names or reserved IP addresses in
subjectAltName or in
commonName. Furthermore such certificates will be revoked on October 1st, 2016.
Internal names are hostnames that do not end with an Top Level Domain ending (.com, .de, …). For example: .local, .internal. Also NetBIOS names without any domain extension are affected.
To configure a HP iLO board you can use a web browser of course. But how to access iLO when you did not set a correct IP address or Administrator password in BIOS using F8 key? Of course you can reboot and enter F8 at boot. But to restart a ESXi host just to enter a iLO IP address is not very elegant. Here I will explain how to configure iLO in ESXi shell.
This blog post describes how to update respectively install VIBs on hosts without using VMware Update Manager (VUM). Instead of VUM we will use
esxcli software is a really powerful framework which you can use to keep your hosts up-to-date, install and remove bundles. The commands below are using real repositories and vSphere Installation Bundles (VIBs). These examples should work fine for ESXi 5.x. Do not forget to set maintenance mode before updating a host.
- First, enable http-Client in local firewall to allow access to internet resources
esxcli network firewall ruleset set -e true -r httpClient
- If you are unsure, if the ruleset is enabled or not, run the this command and remember the result to switch back at the end
esxcli network firewall ruleset list -r httpClient
- Query installed VIBs on the local host
esxcli software vib list
- List VIBs that can be updated out of the default VMware repository
esxcli software sources vib list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml |grep -i update
- or list VIBs that belong to a specific build-number
esxcli software sources vib list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml |grep 2143827
- Update the base-image
esxcli software vib update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml --vibname esx-base
- Update vmware tools package
esxcli software vib update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml --vibname tools-light
- Do these steps for the VIBs you want to install. After the installation you see the previous version (removed) and the just installed version. You can also see if you have to reboot the host.
- Looking for still available VIBs for installation e.g.:
esxcli software sources vib list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml |grep -i update |grep 550
- You can also check a whole profile. A profile is more or less just a set of VIBs. In this example looking for 5.5-profiles
esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml |grep 5.5
- Check the content of a profile. Unfortunately these images are named after dates instead of built-numbers.
esxcli software sources profile get -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.5.0-20141004001-standard
- To compare installed versions to a profile
esxcli software profile validate -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.5.0-20141004001-standard
- To install a whole profile
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.5.0-20141004001-standard
- To check Update process, check the log-file:
- Finally, do not forget to disable http-Client in local firewall, if it was enabled at the beginning.
esxcli network firewall ruleset set -e false -r httpClient
Some words for HP VIBs
These days there are strange behavours when updating HP VIBs. So I could not update the VIB for HP-AMS using the command to update all HP VIBs on the host:
esxcli software vib update -d http://vibsdepot.hp.com/index.xml
I got an [VibDownloadError]-error. Coping the vib locally and running the command to install VIBs, previous copied to local disk
esxcli software vib update --viburl /tmp/hp-vib/hp-ams-5184.108.40.206-07.1198610.vib
works fine. After this,
esxcli software vib update -d http://vibsdepot.hp.com/index.xml works without any problems.