The function Set-VsanEncryptionKms seems to no longer work with vCenter 8. The KMS cluster object no longer appears to have a Name attribute which results in the function blowing up.
Reproduction steps
Import the VMware.VMEncryption and VMware.VsanEncryption modules
Connect to vCenter
Run Set-VsanEncryptionKms, for example: Set-VsanEncryptionKms -Cluster cluster1 -KMSCluster kmip1
Expected behavior
Expected to reconfigure vSAN key provider if valid. Instead, an exception occurs:
You cannot call a method on a null-valued expression.
At C:\Users\Administrator\Downloads\PowerCLI-Example-Scripts-master\PowerCLI-Example-Scripts-master\Modules\VMware.VsanEncryption\VMware.VsanEncryption.psm1:136 char:13
+ If ($KmsClusterList.Name.Contains($KmsCluster)) {
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Changing the KMS Profile to on Cluster cluster1
Exception calling "VsanClusterReconfig" with "2" argument(s): "General vSAN error."
At C:\Users\Administrator\Downloads\PowerCLI-Example-Scripts-master\PowerCLI-Example-Scripts-master\Modules\VMware.VsanEncryption\VMware.VsanEncryption.psm1:191 char:13
+ $ChangeKmsTask = $VsanVcClusterConfig.VsanClusterReconfig ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : FaultException
Describe the bug
The function
Set-VsanEncryptionKms
seems to no longer work with vCenter 8. The KMS cluster object no longer appears to have aName
attribute which results in the function blowing up.Reproduction steps
Set-VsanEncryptionKms
, for example:Set-VsanEncryptionKms -Cluster cluster1 -KMSCluster kmip1
Expected behavior
Expected to reconfigure vSAN key provider if valid. Instead, an exception occurs:
Additional context
No response