The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,861 other subscribers

Archive for the ‘Virtualization’ Category

Some links on Chrome not prompting to save passwords (when Firefox and Safari do)

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 »

ESXi: getting and setting the host name, domain and fqdn

Posted by jpluimers on 2022/01/19

A few links and notes:

  1. [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
  2. [Wayback] ESX Host appears as localhost.localdomain in VMware Infrastructure/vSphere client (2009720)

    Cause

    The name resolution parameters were not properly configured during the installation of the ESX host.
  3. [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 »

ESXi: persistent files you can edit to apply settings during boot

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 »

ESXi ash/dash/busybox shell getting current timestamp in UTC ISO8601 format without colons or dashes

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).

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 »

Patching ESXi so you can boot a MacOS virtual machine from it

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 »

On my research list: “ESXi” “Secure Boot” – Google Search

Posted by jpluimers on 2022/01/12

On my research list: [Wayback] “ESXi” “Secure Boot” – Google Search.

Some links about it:

–jeroen

Posted in ESXi6, ESXi6.5, ESXi6.7, ESXi7, Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »

VMware ESXi and vSphere: vmNIC speeds are limited by your CPU and RAM speeds, only in part by the vNIC drivers

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 »

Some notes on ESXi and SMART information from HDD/SSD devices

Posted by jpluimers on 2022/01/10

For my link archive:

  1. [WayBack] VMware ESXi S.M.A.R.T Health Monitoring | ESX Virtualization based on the built-in tooling, showing how /usr/lib/vmware/vm-support/bin/smartinfo works (contrary to the article, this is a binary, not a smartinfo.sh script, at least in ESXi 6.0 and higher). Note this does not list all SMART parameters, so can give you a false sense of being on the safe side.
  2. [WayBack] Determine TBW from SSDs with S.M.A.R.T Values in ESXi (smartctl) | Virten.net which is based on smartctl from [WayBack] smartmontools and provides a link to the [WayBack] smartctl-6.6-4321.x86_64.vib.
    1. Download smartctl-6.6-4321.x86_64.vib
    2. Copy the VIB to the /tmp/ directory of an ESXi host
    3. SSH to the ESXi host
    4. Set the VIB acceptance level to CommunitySupported
      # esxcli software acceptance set --level=CommunitySupported
    5. Install the package (Maintenance Mode or Reboot is not required)
      #esxcli software vib install -v /tmp/smartctl-6.6-4321.x86_64.vib

    The tool is located at /opt/smartmontools/smartctl and works just like the Linux version.
    Locate physical disks with ls -l /dev/disks/

    /opt/smartmontools/smartctl -d [Device Type] –all /dev/disks/[DISK]

  3. [WayBack/Archive.is] ESXi S.M.A.R.T. health monitoring for hard drives (2040405) describing the internal tools from an ESXi 5.x perspective

The first two links are via [WayBack/Archive.is] esxi 6 monitor sata temperature – Google Search; the last links via [WayBack/Archive.is] esxi 6 view smart – Google Search.

–jeroen

Posted in Power User, Virtualization, VMware, VMware ESXi | 2 Comments »

Some links and graphs on ESXi capping/throtteling disk speeds

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:

  1. One rsync operation:
    1 rsync from 860 EVO SSD to 960 PRO NVMe

    1 rsync from 860 EVO SSD to 960 PRO NVMe

  2. Two rsync operations:
    2 rsync from 860 EVO SSD to 960 PRO NVMe

    2 rsync from 860 EVO SSD to 960 PRO NVM

  3. Resume actions were about 10 times faster than the single rsync read speeds:
    Resume action

    Resume action

  4. Suspend actions were between 4 and 6 times faster than rsync write speeds:
    Start of suspend action

    Start of suspend action

     

    Finish 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 »

“Solution” on ESXi 6.7 `smartinfo` throwing `error Cannot open device`

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.

    The following inbox Native Drivers are included in default installation of ESXi 5.5: – See more at: http://www.virtuallyghetto.com/2013/11/esxi-55-introduces-new-native-device.html
  • [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:

  1. Suspend all virtual machines
  2. Bring the ESXi box into maintenance mode, for instance by running esxcli system maintenanceMode set --enable true
  3. On the console or terminal, run this:
    # esxcli system module set --enabled=false --module=vmw_ahci
    # reboot
  4. After booting, get the ESXi box out of maintenance mode, for instance by running esxcli system maintenanceMode set --enable false
  5. Power on all suspended virtual machines

To re-enable the native vmware_ahci driver (in case not all your SATA devices are recognised):

  1. Suspend all virtual machines
  2. Bring the ESXi box into maintenance mode, for instance by running esxcli system maintenanceMode set --enable true
  3. On the console or terminal, run this:
    # esxcli system module set --enabled=true --module=vmw_ahci
    # reboot
  4. After booting, get the ESXi box out of maintenance mode, for instance by running esxcli system maintenanceMode set --enable false
  5. 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

Storage adapters with vmw_ahci enabled

With legacy ahci, the storage adapters are these:

Storage adapters with vmw_ahci disabled

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

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

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.

–jeroen

Posted in ESXi6, ESXi6.5, ESXi6.7, ESXi7, Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »