• Fixing “Keyset Does Not Exist” When Adding a Node to a Windows Server Failover Cluster

    Recently, I ran into a strange issue while trying to add newly built Windows Server 2022 hosts to an existing Microsoft Failover Cluster. Every attempt to add a node failed with the following error message:

    The server ‘host.zhengwu.org’ could not be added to the cluster.
    An error occurred while adding node ‘host.zhengwu.org’ to cluster ‘cluster.zhengwu.org’.

    Keyset does not exist

    At first glance, this error didn’t provide much direction. However, after some investigation, I discovered that the problem was caused by a mismatch in the node status between Microsoft Failover Cluster Manager and System Center Virtual Machine Manager (SCVMM).

    Root Cause: Node Status Out of Sync Between SCVMM and Failover Cluster

    One of the existing cluster nodes was still marked as Maintenance Mode in SCVMM, even though Failover Cluster Manager showed it as Online.

    This mismatch caused several issues:

    • The node appeared online in Failover Cluster Manager
    • Virtual machines were running on it normally
    • But SCVMM showed no VMs on the host
    • And SCVMM treated the host as if it were not fully operational

    Because SCVMM maintains cluster metadata and permissions, the inconsistent state led to the “Keyset does not exist” error when adding a new node.

    The following Windows Event log is also observed in Microsoft-Windows-FailoverClustering-Client/Diagnostic:

    AddClusterNodeEx (4570): Exception – error -2146893802 while adding node xxxx: Failed to Get Cluster Secret via CPrep Server on node xxxx

    Solution: Rejoin the Problematic Cluster Node to the Cluster

    To resolve the issue, I simply shut down the problematic cluster node.

    1. Go to the Failover Cluster Manager.
    2. Go to Nodes.
    3. Select the problematic node.
    4. Click More Actions in the right-side panel.
    5. Select Evict.
    6. I suggest reboot the node after evicting.
    7. Add the node back to the cluster after rebooting.

  • Visual Studio Code Could Not Resolve Python Interpreter Path

    The following warning appears when Visual Studio Code (VS Code) connects to a Python project on a remote server, and the virtual environment does not launch automatically:

    Default interpreter path /opt/homebrew/bin/python3 could not be resolved: Could not resolve interpreter path /opt/homebrew/bin/python3

    This problem can occur when Homebrew installs VS Code in a way that misconfigures the default interpreter path.

    What the error means

    VS Code is trying to use a Python interpreter path that it cannot resolve on the remote machine. This often happens because the path points to a local‑only Homebrew location (such as /opt/homebrew/bin/python3) that does not exist or is not accessible on the remote server.

    How to fix it

    1. Open Settings in VS Code (use Cmd + , on macOS or Ctrl + , on Windows/Linux).
    2. Select the Remote tab (or search for “remote” settings).
    3. Search for python.defaultInterpreterPath and remove its value.
    4. Search for python-envs.defaultEnvManager and remove its value.
    5. Close and reopen the VS Code window connected to the remote server.

    After reopening, VS Code should no longer show the “could not resolve interpreter path” warning and will rely on the correct Python interpreter or virtual environment available on the remote machine.


  • How to Fix “PowerCLI Command Found but Module Could Not Be Loaded” in PowerShell

    How to Fix PowerShell VMware Errors: Assertion Failure and Connect-VIServer Module Issues

    When working with VMware PowerCLI in PowerShell, you may encounter error messages that prevent you from connecting to a vCenter Server or ESXi host. Two common errors include:

    • “An assertion failure has occurred.”
    • “The ‘Connect-VIServer’ command was found in the module ‘VMware.VimAutomation.Core’, but the module could not be loaded.”

    These errors usually indicate issues with PowerShell module permissions, blocked files, or Group Policy restrictions. Below are the most common causes and their proven solutions.


    Common Causes and Solutions

    A. VMware PowerCLI Module Files Are Set to Read-Only

    If PowerCLI module files or folders are marked as read-only, PowerShell may fail to load them correctly.

    How to fix:

    1. Navigate to your PowerShell Modules directory (for example:
      C:\Program Files\WindowsPowerShell\Modules)
    2. Select all VMware-related folders starting with vmware*.
    3. Right‑click and choose Properties.
    4. Enable Read-only, apply the setting to all subfolders and files, and click OK.
    5. Reopen Properties, uncheck Read-only, and apply again.

    This reset helps clear inconsistent file attribute states.


    B. VMware PowerCLI Module Files Are Blocked by Windows

    Files downloaded from the internet or copied from another machine may be blocked by Windows for security reasons, preventing PowerShell from loading the module.

    How to fix:

    Run the following command in an elevated PowerShell session:

      Get-ChildItem "Module Path" -Recurse | Unblock-File
      PowerShell

      Replace "Module Path" with the actual path where the VMware PowerCLI modules are installed.

      This command removes the “blocked” flag from all files in the module directory.


      C. Group Policy Restricts Script Execution

      In some corporate environments, Group Policy (GPO) allows only signed PowerShell scripts to execute.

      This can block PowerCLI modules from loading.

      How to fix:

      • Verify the current execution policy: PowerShellGet-ExecutionPolicy -List
      • Work with your IT security team to figure out a solution.

      Aligning PowerShell execution policy with security standards is essential in enterprise environments.


    1. Headset Mute Button is Not Sync with Microsoft Teams

      The hardware mute button on my Poly headset has not worked with the New Microsoft Teams for a while. I eventually figured out that there is an option Sync device buttons in the newer release of Microsoft Teams.

      Credit to Recent update to Teams causes beeping in headset when on mute – Microsoft Q&A


    2. How to Configure WINRM for Windows Servers in Home Labs

      Windows Servers rely on the WINRM protocol to be managed remotely. The following procedure helps to enable the protocol in home labs. A Windows 2025 server has WINRM enabled by default as long as it is joined to a domain that applied the following settings in GPO.

      1. Go to Computer Configuration -> Administrative Templates -> Windows Components -> Windows Remote Management -> WinRM Service

      1.1 Enable everything except “Specify channel binding token hardening level” and “Specify channel binding token hardening level“.

      2. Go to Computer Configuration -> Preferences -> Windows Settings -> Registry -> Create a new Registry Item with the following settings.

      Action: Create

      Hive: HKEY_LOCAL_MACHINE

      Key Path: SOFTWARE\Microsoft\Windows\CurrentVersion\WSMAN\Client

      Value name: maxEnvelopeSize

      Value type: REG_DWORD

      Value data: 1048576

      Run the command winrm get winrm/config in a terminal. The value of the second line in the output should be the same one that is configured in the GPO.

      Config
          MaxEnvelopeSizekb = 1048576
          MaxTimeoutms = 60000

      Credit to the answer in powershell – Can you get the MaxEnvelopeSizeKb without needing to be an admin? – Stack Overflow

      Please refer details to [MS-WSMAN]: wsman:MaxEnvelopeSize | Microsoft Learn

      Some posts say that the key name is MaxEnvelopeSizekb. I think this is incorrect.


    3. VMM does not have appropriate permissions to access the resource C:\windows\system32\qmgr.dll on the xxx server

      The possible errors on System Center Virtual Machine Manager 2022 could be either of the following:

      VMM does not have appropriate permissions to access the resource C:\windows\system32\qmgr.dll on the xxx server

      VMM does not have appropriate permissions to access the resource " on the xxx server

      VMM could not enumerate instances of class Msvm_VirtualSystemManagementService on the server xxx. Failed with error HRESULT 0x80070005 Access is denied

      And you may also face other errors that related to access deny.

      One possible cause is the service account format that you are using. It looks like there is a bug on System Center Virtual Machine Manager 2022. VMM tries to perform tasks with “localhost\[email protected]” if you entered service account with format “[email protected]”.

      Change it to “zhengwu\xxxxxx” will fix that.


    4. Error finding windbg.exe: The system cannot find the file specified.

      You may see the error message while executing livekd.exe. Or Error finding kd.exe.

      1. Install the Debugging Tools in Windows SDK. https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/
      2. Copy livekd.exe to one subfolder of the path C:\Program Files (x86)\Windows Kits\10\Debuggers\.
      3. Run livekd.exe in the new path again.

    5. Homebrew Installed Jenkins on MacOS Sequoia Cannot be Accessed From External

      I recently installed Jenkins 2.479.2 on MacOS Sequoia (15.1). The service is working fine on http://localhost:8080, but it can not be accessed from any other devices at my home.

      This post provided solutions to fix that issue. Here is a summary:

      1. Make sure the MacOS firewall is disabled, or the port is enabled on the firewall.
      2. Replace 127.0.0.1 with 0.0.0.0 in the file /opt/homebrew/opt/jenkins-lts/homebrew.mxcl.jenkins-lts.plist.
      3. Restart the Jenkins service with brew services restart jenkins-lts.
        • You can use the command to restart other brew installed services. Use brew services info --all to list all available services.


    6. What is the time format in Bitbucket API?

      I was trying to retrieve a report in a Bitbucket instance. The return from the API contains event dates. However, the value looks strange. It is something like 1680143775227.

      The format looks like Unix Epoch Timestamp. But it was converted to a far future time in any online converters.

      The .Net action [System.DateTime]::UnixEpoch.AddSeconds() threw an error:

      MethodInvocationException: Exception calling "AddSeconds" with "1" argument(s): "Value to add was out of range. (Parameter 'value')"

      The solution is using [System.DateTime]::UnixEpoch.AddMilliSeconds() to convert the time.

      Such format calls Epoch Milliseconds or Unix Time in Milliseconds.


    7. Fixing Motor Unresponsiveness on Raspberry Pi Due to Grounding

      The last time I wrote about Raspberry Pi was Connect to New Provisioned Raspberry Pi Less than $3, about six years ago. Time flies! Today, I will talk about a grounding issue.

      Background and Troubleshooting

      I recently purchased a powerful motor driver board. It supports two DC motors with encoders and other features. During the initial testing, I experienced weird behavior. As a cloud engineer, I find it interesting to learn about the physical world.

      (more…)