Search This Blog

Understand Three Important Files in vSphere HA

This post is the note I take as I am reading the vSphere 6.x HA Deepdive book, plus my understanding of the materials.

Here we focuse on the files stored on the shared datastore, aka. remote files. Each host also restores some configuration files in a directly accessible datastore, aka. local files)

  • Protectedlist file
    • Naming: protectedlist
    • Owner: The master locks this protectedlist file
    • The master uses this file to claim the “ownership” of the datastores stored the VM configuration file. When a host is isolated, if the host can access the datastore, then it will validate whether a master owns the datastores. If no master owns the datastores, the isolation response will not be triggered and restarts will not be initiated. (see page 29 & 30 of the book about isolation response).
    • The master uses this protectedlist file to track the VMs protected by HA and the states of the VMs (powered on / off)
    • The master distributes this protectedlist file to all datastores in use by the VMs in the cluster
  • "poweron" file
    • Naming: host-<number>-poweron
    • Owner: per-host (master & slaves)
    • The host uses this "poweron" file to track the powered on virtual machines on a host
    • The slaves use this "poweron" file to inform the master that it is isolated from the management network
      • No datastore heartbeat: the master determines a host has failed
      • The top line of "poweron" file is 1 (means isolated); if 0 means not-isolated
  • Heartbeat file
    • Naming: host-<number>-hb
    • Owner: per-host
    • Each host creates a heartbeat file on the designed heartbeating datastores
      • On VMFS datastore, "heartbeat region" is used to check the heartbeat update
      • On NFS database, the time-stamp of the file is check (each host writes to its heartbeat file once every 5 seconds)

Disable Mac Startup Sound

A way to disable the Mac startup sound is to mute the speaker before shutting down the computer. But you have to remember to do that every time you unmute the speaker.

When I search on the web, some third party utilities are mentioned, e.g. StartupSound.prefPane or Psst or StartNinja or use sudo nvram SystemAudioVolume=%80. All these utilities are for the older version of Mac; and the nvram command doesn’t work my OS X El Capitan (version 10.11.3).

Finally, I find a way to mute the speaker automatically when log off. See this post for the full detail. I only set up the mute.sh, and don’t even bother the unmute.sh.

  1. create a mute.sh script with the following lines
    • #!/bin/bash
    • osascript -e ‘set volume with output muted’
  2. sudo chmod u+x ~/Documents/mute.sh
  3. sudo mv ~/Document/mute.sh /Library/Scripts/
  4. sudo defaults write com.apple.loginwindow LogoutHook /Library/Scripts/mute.sh

To restore the startup sound

  • sudo defaults delete com.apple.loginwindow LogoutHook

VMware vFlash Read Cache (VFRC) Notes

  • Available in vSphere 5.5 and 6.0 for basic caching solution
    • VMware introduces vSphere APIs for IO Filtering (VAIO) in vSphere 6.0 U1 as a new API framework for third party’s innovation
    • VAIO is not a feature or product.
    • It seems that VMware has no plan to create new caching product based on VAIO
    • VAIO can be used not only caching but also for replication
  • Some third party product can provide more advanced caching solution (both read and write-back cache, e.g. PernixData FVP)
  • Require Enterprise Plus License
  • Use local SSDs (must be on the HCL) to form a new file system called VFFS (Virtual Flash File System) to provide two types of write through (read only) caching
    • Per-VMDK cache
    • Host Swap cache
  • VFRC limitation (KB2057206)
    • Default VRFC maximum size is 200GB. Can be set to 400GB
  • Configuration
    1. Set up VFRC resouce on a host
      • vSphere Web Client, host, Manage, Settings, Virtual Flash Read Cache Resource Management, Add capacity
    2. Allocate VFRC to a VM’s VMDK
      • vSphere Web Client, VM,  Edit Settings, select and expand the hard disk,and enter the amount of VFRC
      • The block size can impact performance, but it’s not easy to determine (see this post for detail)
    3. Set up Host Swap Cache
      • vSphere Web Client, host, Manage, Settings, under Virtual Flash, edit Virtual Flash Host Swap Cache Configuration, Enable virtual flash host swap cache and enter the amount

Use Dig to Troubleshoot DNS Issue on Windows

Get dig.exe on Windows

  • Download and extract the BIND binary zip file to a folder from ISC.
  • Open a command prompt and navigate to the folder
  • Enter dig, no installation is required.

Basic syntax

  • dig @dns-server name type
  • dig @dns-server -q name -t type

Simplify the output

  • dig +nocmd +noall +answer @dns-server name
  • dig +nocmd +noall +answer +multiline @dns-server name any

Windows Page File Purposes and Sizing

Consider the following for page file sizing

  • System crash dump: the page file must exist and be larger than the physical memory (RAM)
  • Peak system committed memory:
    • system committed memory = physical memory + all page files combined size
    • page.file.01page.file.02
    • The system with 8GB RAM + 1.3GB page file = 9.2GB committed RAM
  • Infrequently accessed pages: Infrequently accessed modified pages are removed from physical memory and stored in the page files. The “\Memory\Modified Page List Bytes” performance counter measures, in part, the number of infrequently accessed modified pages that are destined for the hard disk.

Extend or add a page file if all the following performance counters are true:

  • \Memory\Available MBytes is low (more available phyiscal memory is in use): less than 4 MB 
  • \Memory\Modified Page List Bytes is high 
  • \Paging Files(_Total)\%Usage is high: more than 70%

General recommendation

  • Windows Server DC and DFS replication, certificate, and LDS servers are not supported without a configured page file
  • Exchange Server requires a page file
  • Set a static page file size rather than dymantically managed by Windows
  • For Windows Server 2012 or R2 Hyper-V, the page file of the management OS (the host OS) should be left at the default of setting of “System Managed”
  • For 64-bit SQL Server, enable “Lock Page in Memory” for the SQL Server service account
  • For 64-bit SQL Server, set Page File to be a static 6 GB

Source:

Use \\?\UNC\ on A UNC Name to Work Around Windows 260 Characters File Name Limit

Prefixing the file name with “\\?\” can work around the Windows 260 characters (up to 32,000 characters) file name limit in some command line utilities. For example, for local file, dir \\?\c:\longfilename.txt.

However, the syntax is different on a UNC name, it needs to be \\?\UNC\servername\share\longfilename.txt. For example, dir \\?\UNC\fileserver\dept\it\longfilename.txt.

Not all the command line utilities support this syntax.

  • Icacls - support
  • PowerShell (get-acl) - not support, because of .NET

For more info see

Long Paths in .NET, Part 1 of 3

Remove OneDrive from File Explorer Side Panel in Windows 10

On my work PC, I use OneDrive for Business instead of OneDrive. By default Windows 10 includes an OneDrive shortcut in File Explorer side panel.

OneDrive.01OneDrive.02

Change the following registry key to remove it.

  • {HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}
  • In the subkey System.IsPinnedToNameSpaceTree change the DWORD from 1 to 0
  • No reboot required.

Source: Microsoft TechNet Forums

Use WinSCP to Transfer Files in vCSA 6.7

This is a quick update on my previous post “ Use WinSCP to Transfer Files in vCSA 6.5 ”. When I try the same SFTP server setting in vCSA 6.7...