"vSAN data-at-rest encryption alarm vCenter and all hosts are connected to Key Management Servers" Alarm Frequently Triggered in vCenter
search cancel

"vSAN data-at-rest encryption alarm vCenter and all hosts are connected to Key Management Servers" Alarm Frequently Triggered in vCenter

book

Article ID: 439901

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

The "vSAN data-at-rest encryption alarm vCenter and all hosts are connected to Key Management Servers" alarm may be frequently triggered in vCenter even if the KMS server is reporting Healthy status and Certificates are valid:

MMM DD xx:xx:xx vcenter.domain.com vpxd[6130]: Event [91653562] [1-1] [YYYY-MM-DDTxx:xx:xx.xxxxxxZ] [vim.event.AlarmStatusChangedEvent] [info] [] [Datacenter] [91653562] [Alarm 'vSAN data-at-rest encryption alarm 'vCenter and all hosts are connected to Key Management Servers'' on cluster changed from Green to Red]

Environment

vCenter Server 8.x

ESXi 8.x

VSAN

Cause

As of 8.0 U2, vCenter periodically checks if it and ESXi hosts can connect to the Key Management Server (KMS) and whether the encryption key and host encryption key stored in the KMIP KMS has expired or are going to expire soon.  Even if vCenter and ESXi hosts can successfully connect to the KMS server, the alarm may trigger if the KMS server returns an internal error:

/var/log/vmware/vpxd/vpxd.log:

YYYY-MM-DDT<time>Z error vpxd[1333242] [Originator@6876 sub=CryptoManagerKmipWrapper opID=593712b4-37] Failed to check key 6ee9a582-2bf6-4085-8729-6347d6a6aaa9 attribute of Deactivation_Date with reason Server Error:General Failure, Explanation:an internal error was encountered, please try again later
--> , attributes is not supported by KMS kmshostname.domain.com:9813, this will not impact VMcrypt functions.
YYYY-MM-DDT<time>Z error vpxd[1333242] [Originator@6876 sub=Default opID=593712b4-37] Failed to get attributes on key provider kms-kmip for key 6ee9a582-2bf6-4085-8729-6347d6a6aaa9, error 7:
--> Attributes: (string) [
-->    "Deactivation_Date"
--> ]

YYYY-MM-DDT<time>Z error vpxd[06494] [Originator@6876 sub=CryptoManagerKmipWrapper opID=769a2185-90] Get, Attributes, Id=%s, Names=State failed on key 6ee9a582-2bf6-4085-8729-6347d6a6aaa9 on KMS kmshostname.domain.com:9813 - Server Error:General Failure, Explanation:an internal error was encountered, please try again later
-->
YYYY-MM-DDT<time>Z warning vpxd[06494] [Originator@6876 sub=Default opID=769a2185-40] Failed to get key 6ee9a582-2bf6-4085-8729-6347d6a6aaa9 state on key provider kms-kmip, error 7:
--> Reason:
--> Failed to get key 6ee9a582-2bf6-4085-8729-6347d6a6aaa9 state on KMS  kmshostname.domain.com.com: QLC_ERR_GENERAL_ERROR

/var/log/vmware/vsan/vmware-vsan-health-service.log:

YYYY-MM-DDT<time>Z INFO vsan-mgmt[09752] [VsanVcObjectHelper::getResultFromCache opID=noOpId] The cache is timeout for GetKmipKeyAttributes, time: 1778029533.7924545, value: None
YYYY-MM-DDT<time>Z ERROR vsan-mgmt[09752] [VsanHealthEncUtil::GetKmipEncryptionKeyExpirationInfo opID=noOpId] GetKmipKeyAttributes failed with exception
Traceback (most recent call last):
  File "bora/vsan/health/esx/pyMo/VsanHealthEncUtil.py", line 645, in GetKmipEncryptionKeyExpirationInfo
  File "bora/vsan/objectservice/vpxd/pyMoVsan/VsanVcObjectHelper.py", line 643, in wrapper
Exception: Function GetKmipKeyAttributes is timeout.
YYYY-MM-DDT<time>Z INFO vsan-mgmt[09752] [VsanPyVmomiProfiler::log opID=noOpId] Profiler:
YYYY-MM-DDT<time>Z INFO vsan-mgmt[09752] [VsanPyVmomiProfiler::logProfile opID=noOpId]   VsanVcEncryption.GetKmipKeyAttributes: 15.00s
YYYY-MM-DDT<time>Z INFO vsan-mgmt[09752] [VsanVcObjectHelper::wrapper opID=noOpId] Ready to get single executor result for the key ['GetKmipKeyAttributes', '', 'keyId:6ee9a582-2bf6-4085-8729-6347d6a6aaa9;providerId:id:kms-kmip', 'Deactivation_Date'] in timeout 15
YYYY-MM-DDT<time>Z INFO vsan-mgmt[09752] [VsanVcObjectHelper::wrapper opID=noOpId] Ready to call original function for execution
YYYY-MM-DDT<time>Z INFO vsan-mgmt[337951] [VsanVcEncryption::GetKmipKeyAttributes opID=594712b4] Get Kmip key attributes: ['Deactivation_Date']
YYYY-MM-DDT<time>Z ERROR vsan-mgmt[14454] [VsanVcEncryption::GetKmipKeyAttributes opID=780c549c] Failed to get key attributes for key '(vim.encryption.CryptoKeyId) {
  keyId = '143438ad-532f-4574-85ff-3db4c01e4912',
  providerId = (vim.encryption.KeyProviderId) {
    id = 'kms-kmip'
  }
}'
YYYY-MM-DDT<time>ZERROR vsan-mgmt[14454] [VsanVcEncryption::GetKmipKeyAttributes opID=780c549c] Error reason: Server Error:General Failure, Explanation:an internal error was encountered, please try again later

 

Resolution

Review KMS server logs at timeframe of interest for specific errors.  Ensure that KMS server supports a implementation of the Key Management Interoperability Protocol (KMIP) later than v2.0.  Servers with older implementations of the KMIP may not have support for or error handling for when encountering certain unsupported operations.

 

Additional Information

vSAN Health Service - Data-at-rest encryption Health - VMware vCenter and all hosts are connected to Key Management Servers

Key Management Interoperability Protocol Specification Version 2.0