Archive for the ‘ESXi6.5’ Category
Posted by jpluimers on 2022/01/25
In Determining the ESXi installation type (2014558) | VMware KB, I also showed how to backup the configuration and download it.
Sometimes you want an ISO 8601 time-stamped local tarball just in case you want to revert to it at a later stage.
First a small recap on how to get the tarball, download location and temporary location in the first place (it will be automatically deleted from the temporary location):
# vim-cmd hostsvc/firmware/sync_config
# vim-cmd hostsvc/firmware/backup_config
Bundle can be downloaded at : http://*/downloads/52aa233b-5db4-2298-5e1b-f510b2cd149f/configBundle-ESXi-X10SRH-CF.tgz
# find /scratch/downloads/ -name *.tgz
/scratch/downloads/52aa233b-5db4-2298-5e1b-f510b2cd149f/configBundle-ESXi-X10SRH-CF.tgz
Goal is to get the download filename and save it to a different folder and embed the ISO 8601 timestamp in the filename.
Like many scripts, sed and regular expressions come to the rescue once more, just like in ESXi ash/dash/busybox shell getting current timestamp in UTC ISO8601 format without colons or dashes (which we will need anyway because of the ISO 8601 time stamp, and a bit of fiddling at regex101.com/r/NyrzKF
# SCRATCH_CONFIG_BUNDLE_NAME=$(vim-cmd hostsvc/firmware/backup_config | sed -n -E -e "s/^(Bundle can be downloaded at : http://*)(/downloads/[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}/configBundle-.+?)(.tgz)$//scratch23/p")
# echo "SCRATCH_CONFIG_BUNDLE_NAME: '${SCRATCH_CONFIG_BUNDLE_NAME}'"
SCRATCH_CONFIG_BUNDLE_NAME: '/scratch/downloads/5271677d-97db-30dc-673d-b99e61bed251/configBundle-ESXi-X10SRH-CF.tgz'
# date --utc -I'seconds' --reference "${SCRATCH_CONFIG_BUNDLE_NAME}"
2021-05-09T17:44:42UTC
Note:
Not few people have bumped into this, the only other I could find through [Wayback] “vim.fault.TooManyWrites” “syncConfiguration” – Google Search is [Archive.is] mal wieder purple Screen – VMware-Forum.
Figuring out the various parts of the SCRATCH_CONFIG_BUNDLE_NAME: '/scratch/downloads/5271677d-97db-30dc-673d-b99e61bed251/configBundle-ESXi-X10SRH-CF.tgz' is like at regex101.com/r/J4yU72, regex101.com/r/uID9xs and regex101.com/r/o8a4Am:
CONFIG_BUNDLE_DIRECTORY_NAME=$(echo "${SCRATCH_CONFIG_BUNDLE_NAME}" | sed -n -E -e "s/(\/scratch\/downloads\/[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}\/)(configBundle-.+?)(.tgz)$/\1/p")
CONFIG_BUNDLE_FILE_NAME=$( echo "${SCRATCH_CONFIG_BUNDLE_NAME}" | sed -n -E -e "s/(\/scratch\/downloads\/[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}\/)(configBundle-.+?)(.tgz)$/\2/p")
CONFIG_BUNDLE_DOT_EXTENSION=$( echo "${SCRATCH_CONFIG_BUNDLE_NAME}" | sed -n -E -e "s/(\/scratch\/downloads\/[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}\/)(configBundle-.+?)(.tgz)$/\3/p")
echo "CONFIG_BUNDLE_DIRECTORY_NAME: '${CONFIG_BUNDLE_DIRECTORY_NAME}'"
echo "CONFIG_BUNDLE_FILE_NAME: '${CONFIG_BUNDLE_FILE_NAME}'"
echo "CONFIG_BUNDLE_DOT_EXTENSION: '${CONFIG_BUNDLE_DOT_EXTENSION}'"
Output is like this:
SCRATCH_CONFIG_BUNDLE_NAME: '/scratch/downloads/528f9f5a-0123-f022-2b4d-a5c2e595c51a/configBundle-ESXi-X10SRH-CF.tgz'
CONFIG_BUNDLE_DIRECTORY_NAME: '/scratch/downloads/528f9f5a-0123-f022-2b4d-a5c2e595c51a/'
CONFIG_BUNDLE_FILE_NAME: 'configBundle-ESXi-X10SRH-CF'
CONFIG_BUNDLE_DOT_EXTENSION: '.tgz'
Full backup-config-to-ESXi_configuration_backup-directory.sh script:
Read the rest of this entry »
Posted in *nix, *nix-tools, ash/dash, ash/dash development, cron/crontab, Development, ESXi6, ESXi6.5, ESXi6.7, ESXi7, Power User, Scripting, Software Development, Virtualization, VMware, VMware ESXi | Leave a Comment »
Posted by jpluimers on 2022/01/20
For quite some time now, Chrome (think years) refuses to prompt for saving passwords whereas Firefox and Safari do prompt and save them, even for site types that it used to save passwords for in the past.
It has been annoying enough for too long now that I tried to do better than the Google searches I used back when I saw this happen first.
Below are some links based on new searches (starting with [Wayback] adding a password in chrome settings – Google Search); hopefully I can try them after I made a list of sites that Chrome does not show the password save prompt for.
Solutions I tried that failed (but maybe useful for others):
Solutions still to try:
Read the rest of this entry »
Posted in Chrome, Chrome, Communications Development, Development, Encryption, ESXi6, ESXi6.5, ESXi6.7, Firefox, Fritz!, Fritz!Box, Fritz!WLAN, Google, https, HTTPS/TLS security, Internet, Internet protocol suite, Let's Encrypt (letsencrypt/certbot), Power User, routers, Safari, Security, TCP, TLS, Virtualization, VMware, VMware ESXi, Web Browsers, Web Development | Leave a Comment »
Posted by jpluimers on 2022/01/19
A few links and notes:
- [Wayback] Changing the hostname of an ESX or ESXi host (1010821)
Run these commands to change the hostname in ESXi 5.x, ESXi 6.x,ESXi 7.x, using the command line:
- esxcli system hostname set –host=hostname
- esxcli system hostname set –fqdn=fqdn
- [Wayback] ESX Host appears as localhost.localdomain in VMware Infrastructure/vSphere client (2009720)
The name resolution parameters were not properly configured during the installation of the ESX host.
- [Wayback] Domain repoint for embedded vCenter Server fails with error: “domain_consolidator Failed to set machine id” (71020)
This issue is caused by a mismatch between the FQDN that was configured as the PNID during the vCenter Server deployment and the hostname that is currently configured.
I had a mismatch happen because of the second entry: a host configured in a different domain than it was deployed to.
Here are the commands to list and change the hosts name, domain and fqdn:
Read the rest of this entry »
Posted in *nix, *nix-tools, ash/dash, ash/dash development, Development, ESXi6, ESXi6.5, ESXi6.7, ESXi7, Power User, Scripting, Software Development, Virtualization, VMware, VMware ESXi | Leave a Comment »
Posted by jpluimers on 2022/01/18
Since ESXi boots from RAM, most files in /etc are not persisted after modification.
The files that are persisted, are only persisted once every hour by auto-backup.sh, so better run auto-backup.sh by hand if you want to reboot after changing them.
The auto-backup.sh script is ran every hour at 1 minute past the hour as per below crontab.
Default ESXi crontab in /var/spool/cron/crontabs/root:
#min hour day mon dow command
1 1 * * * /sbin/tmpwatch.py
1 * * * * /sbin/auto-backup.sh
0 * * * * /usr/lib/vmware/vmksummary/log-heartbeat.py
*/5 * * * * /bin/hostd-probe.sh ++group=host/vim/vmvisor/hostd-probe/stats/sh
00 1 * * * localcli storage core device purge
Schedules deciphered via [Wayback] Crontab.guru – The cron schedule expression editor:
- [Wayback] Every day at
01:01: “This module removes stale temporary files”
1 1 * * * /sbin/tmpwatch.py
- [Wayback] Every hour at
*:01: saves backup to /bootbank/state.tgz.
1 * * * * /sbin/auto-backup.sh
- [Wayback] Every hour at
*:00 logs heartbeat messages to /var/log/vmksummary.log like 2021-02-23T19:00:02Z heartbeat: up 577d2h37m16s, 9 VMs; [[2802426 vmx 4194304kB] [6176344 vmx 4194304kB] [68997 vmx 8388608kB]] [[2802426 vmx 0%max] [6176344 vmx 0%max] [68997 vmx 0%max]]
0 * * * * /usr/lib/vmware/vmksummary/log-heartbeat.py
- [Wayback] Every
5th minute logs to /var/log/hostd-probe.log.
*/5 * * * * /bin/hostd-probe.sh ++group=host/vim/vmvisor/hostd-probe/stats/sh
- [Wayback] Every day at
01:00: Removes storage devices which have not been seen in some time interval.
00 1 * * * localcli storage core device purge
Note that localcli commands are the same as esxcli; for esxcli, a running hostd is required; localcli can run without hostd. See:
–jeroen
Posted in *nix, *nix-tools, ash/dash, ash/dash development, Development, ESXi6, ESXi6.5, ESXi6.7, ESXi7, Power User, Scripting, Software Development, Virtualization, VMware | Leave a Comment »
Posted by jpluimers on 2022/01/17
On VMware ESXi, with the Busybox ash/dash shell, I wanted to get the current UTC timestamp in ISO 8601 format without dashes (-) or especially colons (:) and plus-signs (+) you have to back-slash escape colons or double quote parameters, which is often can be a pain).
- [Wayback] How to Manipulate Filenames Having Spaces and Special Characters in Linux describes the pain handling special characters:
In this article, we will see how to create, copy, move and delete filenames that starts with spaces and special characters (say #, *, &, =, etc.) in Linux.
- [Wayback] filenames – What characters are safe in cross-platform file names for Linux, Windows and OS-X – Super User
…
[]()^ #%&!@:+={}'~ and [`] all have special meanings in many shells, and are annoying to work around, and so should be avoided. They also tend to look horrible in URLs.
…
This is why we can’t have good things: Getting the UTC 8610 timestamp was far less easy than I hoped for.
First of all, Busybox only allows for a precision of seconds, not milliseconds, and the specification format needs better documentation as per [Wayback] embedded linux – How to get ISO8601 seconds format from “date” in busybox? – Stack Overflow:
Read the rest of this entry »
Posted in *nix, *nix-tools, ash/dash, ash/dash development, Development, ESXi6, ESXi6.5, ESXi6.7, ESXi7, Power User, Scripting, sed, sed script, Software Development, Virtualization, VMware, VMware ESXi | Leave a Comment »
Posted by jpluimers on 2022/01/13
This is totally opposite to yesterday’s Secure Boot post: [Wayback/Archive.is] shanyungyang/esxi-unlocker: VMware ESXi macOS
macOS Unlocker V3.0.2 for VMware ESXi
=====================================
1. Introduction
---------------
Unlocker 3 for ESXi is designed for VMware ESXi 6.5, 6.7 and 7.0
The patch code carries out the following modifications dependent on the product
being patched:
* Fix vmware-vmx to allow macOS to boot
* Fix libvmkctl to allow vSphere to control the guest
The code is written in Python as it makes the Unlocker easier to run and
maintain on ESXi.
+-----------------------------------------------------------------------------+
| IMPORTANT: |
| ========== |
| |
| Always uninstall the previous version of the Unlocker before using a new |
| version. Failure to do this could render VMware unusable. |
| |
+-----------------------------------------------------------------------------+
2. Installation
---------------
Copy the distribution file to the ESXi host datastore using scp or some other
data transfer system. If you want to use the source version (i.e. from GIT) see
"5. Building" fist.
Decompress the file from the ESXi console or via SSH:
tar xzvf esxi-unlocker-xxx.tgz
(xxx - will be the version number, for example, 300)
Run the command from the terminal:
./esxi-install.sh
Finally reboot the server.
3. Uninstallation
-----------------
Open the ESXi console or login via SSH and change to the folder where the files were extracted.
Run the command from the terminal:
./esxi-uninstall.sh
Finally reboot the server.
4. Notes
--------
A. There is a command added called esxi-smctest.sh which can show if the patch is successful. It must be run from a
terminal or SSH session. The output should be:
/bin/vmx
smcPresent = true
custom.vgz false 32486592 B
Note: The uncompressed size reported for custom.vgz will vary depending on the ESXi version.
B. The unlocker can be temporarily disabled during boot by editing the boot options and adding "nounlocker".
5. Building
-----------
If you want to use a version which is not availbale as a distribution (e.g. the code from "master" branch)
you need to first build the package.
Checkout the repository:
git clone https://github.com/shanyungyang/esxi-unlocker.git
(if you don't have git installed you can download ZIP archive from GitHub instead)
Enter the directory and build:
cd esxi-unlocker
./esxi-build.py
If everything went correctly the ouput should be:
ESXi-Build for macOS
Timestamping files...
Creating unlocker.tgz...
etc/
etc/rc.local.d/
etc/rc.local.d/unlocker.py
Creating esxi-unlocker-301.tgz...
unlocker.tgz
esxi-install.sh
esxi-uninstall.sh
esxi-smctest.sh
readme.txt
The package you need to copy in the example above is esxi-unlocker-301.tgz (NOT unlocker.tgz!).
6. Thanks
---------
Thanks to Zenith432 for originally building the C++ unlocker and Mac Son of Knife
(MSoK) for all the testing and support.
Thanks also to Sam B for finding the solution for ESXi 6 and helping me with
debugging expertise. Sam also wrote the code for patching ESXi ELF files and
modified the unlocker code to run on Python 3 in the ESXi 6.5 environment.
History
-------
26/09/18 3.0.0 - First release
01/05/20 3.0.1 - Fix for ESXi 7.0
10/18/20 3.0.1 - Fix for ESXi 7.0 U1 (7.0.1)
(c) 2011-2018 Dave Parsons
–jeroen
Posted in Apple, ESXi6, ESXi6.5, ESXi6.7, ESXi7, Mac OS X / OS X / MacOS, Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »
Posted by jpluimers on 2022/01/12
On my research list: [Wayback] “ESXi” “Secure Boot” – Google Search.
Some links about it:
- [Wayback] Using ESXi Kickstart %firstboot with Secure Boot
- [Wayback] ESXi 6.7 – Secure Boot and startup script – VMware Technology Network VMTN
- [Archive.is] Secure Boot for ESXi 6.5 – Hypervisor Assurance – VMware vSphere Blog
- [Archive.is] Prepping an ESXi 6.7 host for Secure Boot – VMware vSphere Blog
- [Wayback] virtualization – ESXi 7.X file permissions – how to buypass new security measures – Server Fault
Even in ESXi 7.0 some files can still be edited, e.g. /etc/rc.local.d/local.sh. This script will be executed by /etc/rc.local, so you can add your commands there.
You just need to be aware that this script will not be executed if you have UEFI Secure boot enabled on your host.
- [Wayback UEFI Secure Boot for ESXi Hosts
Secure boot is part of the UEFI firmware standard. With secure boot enabled, a machine refuses to load any UEFI driver or app unless the operating system bootloader is cryptographically signed. Starting with vSphere 6.5, ESXi supports secure boot if it is enabled in the hardware.
…
UEFI Secure Boot Troubleshooting
If secure boot does not succeed at any level of the boot sequence, an error results.
The error message depends on the hardware vendor and on the level at which verification did not succeed.
- If you attempt to boot with a bootloader that is unsigned or has been tampered with, an error during the boot sequence results. The exact message depends on the hardware vendor. It might look like the following error, but might look different.
UEFI0073: Unable to boot PXE Device…because of the Secure Boot policy
- If the kernel has been tampered with, an error like the following results.
Fatal error: 39 (Secure Boot Failed)
- If a package (VIB or driver) has been tampered with, a purple screen with the following message appears.
UEFI Secure Boot failed: Failed to verify signatures of the following vibs (XX)
To resolve issues with secure boot, follow these steps.
- Reboot the host with secure boot disabled.
- Run the secure boot verification script (see Run the Secure Boot Validation Script on an Upgraded ESXi Host).
- Examine the information in the /var/log/esxupdate.log file.
- Run the Secure Boot Validation Script on an Upgraded ESXi Host
After you upgrade an ESXi host from an older version of ESXi that did not support UEFI secure boot, you might be able to enable secure boot. Whether you can enable secure boot depends on how you performed the upgrade and whether the upgrade replaced all the existing VIBs or left some VIBs unchanged. You can run a validation script after you perform the upgrade to determine whether the upgraded installation supports secure boot. [Read more]
–jeroen
Posted in ESXi6, ESXi6.5, ESXi6.7, ESXi7, Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »
Posted by jpluimers on 2022/01/11
Still a lot of people think that network speed depends on the vNIC driver and vNIC speed settings.
This is not true: it mainly depends on CPU and RAM speeds as that is where the bottleneck of virtual network processing is.
What does matter is the VM/host overhead is far less when drivers use paravirtualisation (i.e. shortcutting calls from the guest OS to the hypervisor) like PVSCSI for disk or VMXNET3 for networking. This means that VMXNET3 has even more performance than E1000.
Read the rest of this entry »
Posted in ESXi5, ESXi5.1, ESXi5.5, ESXi6, ESXi6.5, ESXi6.7, ESXi7, Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »
Posted by jpluimers on 2022/01/06
As promised in “Solution” on ESXi 6.7 smartinfo throwing error Cannot open device, here are a few links in capping throttling disk speeds by ESXi followed by a few graphs of my own:
My own observations on ESXi 6.7 update 3:
- One rsync operation:

1 rsync from 860 EVO SSD to 960 PRO NVMe
- Two rsync operations:

2 rsync from 860 EVO SSD to 960 PRO NVM
- Resume actions were about 10 times faster than the single rsync read speeds:

Resume action
- Suspend actions were between 4 and 6 times faster than rsync write speeds:

Start of suspend action

Finish of suspend action
For each rsync operation, I had a separate SSH session going, and the speed doubled.
The resume action of all Virtual Machines was almost a flat speed curve.
The suspend action of all Virtual Machines started fast (when all machines were suspending) and finished slower (when only the largest virtual machines were still suspending)
–jeroen
Posted in ESXi5, ESXi5.1, ESXi5.5, ESXi6, ESXi6.5, ESXi6.7, ESXi7, Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »
Posted by jpluimers on 2022/01/05
After writing Some notes on ESXi smartinfo throwing error Cannot open device, I bit the bullet and experimented with disabling the vmw_ahci driver (shown as ahci in the storage adapters view), which forces the sata_ahci driver to be used (shown as ahci in the storage adapters view).
Poof! All problems were gone.
All? Not all: on the console and terminal, there seems to be some throttling going on, as I observed the read or write speed limit to be capped somewhere close to 60 MB/s. More on that in a future post.
Basically, the smartinfo trouble tripped me into thinking the device was bad, where I should have understood that the latency warnings in the vmkernel.log file indicated the vmw_ahci driver was the culprit. Oh well: never too old to learn.
References
I’m not alone on this; these posts also discuss latency issued:
This is different from the transfer speed issues that were part of ESXi 4, though I have a gut feeling there is some correlation:
On AHCI: Advanced Host Controller Interface – Wikipedia
On native drivers versus legacy drivers:
- [Wayback] Troubleshooting native drivers in ESXi 5.5 or later
A new native driver model feature is introduced in VMware ESXi 5.5 that replaces an older model that employs a Linux compatibility layer.
In this article:
- Drivers using the new model are referred to as native drivers
- Drivers using the old model are referred to as legacy VMKLinux drivers
This article provides troubleshooting information for the native driver model.
- [Wayback] ESXi 5.5 introduces a new Native Device Driver Architecture Part 2
…
A new concept of driver priority loading is introduced with the Native Device Driver model and the diagram below provides the current ordering of how device drivers are loaded.
As you can see OEM drivers will have the highest priority and by default Native Drivers will be loaded before “legacy” vmklinux drivers. On a clean installation of ESXi 5.5 you should see at least two of these directories: /etc/vmware/default.map.d/ and /etc/vmware/driver.map.d/ which contains driver map files pertaining to Native Device and “legacy” vmklinux drivers.
…
Steps
This is how you disable the native vmware_ahci driver:
- Suspend all virtual machines
- Bring the ESXi box into maintenance mode, for instance by running
esxcli system maintenanceMode set --enable true
- On the console or terminal, run this:
# esxcli system module set --enabled=false --module=vmw_ahci
# reboot
- After booting, get the ESXi box out of maintenance mode, for instance by running
esxcli system maintenanceMode set --enable false
- Power on all suspended virtual machines
To re-enable the native vmware_ahci driver (in case not all your SATA devices are recognised):
- Suspend all virtual machines
- Bring the ESXi box into maintenance mode, for instance by running
esxcli system maintenanceMode set --enable true
- On the console or terminal, run this:
# esxcli system module set --enabled=true --module=vmw_ahci
# reboot
- After booting, get the ESXi box out of maintenance mode, for instance by running
esxcli system maintenanceMode set --enable false
- Power on all suspended virtual machines
Suspending and unsuspending all virtual machines can be done on the console/terminal, see Source: VMware ESXi console: viewing all VMs, suspending and waking them up: part 5 how.
Results: storage adapters
With native vmware_ahci, the storage adapters are these:

Storage adapters with vmw_ahci enabled
With legacy ahci, the storage adapters are these:

Storage adapters with vmw_ahci disabled
What you see is that the Patsburg 6 Port SATA AHCI Controller has been split from a single vmw_ahci adapter in six separate ahci adapters.
Results: read/write speeds and latency when suspending/unsuspending all virtual machines
With vmware_ahci, the storage adapters are these:

Latency issues after resume/suspend cycle of all virtual machines: the latency stays up in the 15 millisecond region
With ahci, the storage adapters are these:

Latency after resume/suspend cycle of all virtual machines: the latency goes down to the 2 millisecond region
For both cases, the read and write rates are roughly the same (and OK for an EVO 860 SATA device). The latency drops a lot (and with prolonged vmw_ahci use goes up to like 15+ seconds, that is 15000+ milliseconds):
[Wayback] SSD 860 EVO 2.5″ SATA III 500GB Memory & Storage – MZ-76E500B/AM | Samsung US
Speeds are consistent, even under heavy workloads and multi-tasking allowing for faster file transfer. The 860 EVO performs at sequential read speeds up to 550 MB/s* with Intelligent TurboWrite technology, and sequential write speeds up to 520 MB/s. The TurboWrite buffer size* is upgraded from 12 GB to 78 GB.
* Performance may vary based on SSD’s firmware version and system hardware & configuration. Sequential write performance measurements are based on Intelligent TurboWrite technology. Sequential performance measurements based on CrystalDiskMark v.5.0.2 and I0meter 1.1.0.
The sequential write performances are Intelligent TurboWrite region are 300 MB/s for 250/500 GB and 500 MB/s for 1 TB.
* Test system configuration: Intel Core i5-3550 CPU @ 3.3 GHz, 4 GB, OS – Windows 7 Ultimate x64, Chipset: ASUS P8H77-V .
* The TurboWrite buffer size varies based on the capacity of the SSD; 12 GB model, 22 GB for 500 GB model, 42 GB for 1 TB model and 2/4 TB for 78 GB. For more information on the TurboWrite, please visit
http://www.samsungssd.com.
–jeroen
Posted in ESXi6, ESXi6.5, ESXi6.7, ESXi7, Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »