Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set-VsanEncryptionKms does not appear to work with vCenter 8 #635

Open
smoonen opened this issue Sep 24, 2024 · 0 comments
Open

Set-VsanEncryptionKms does not appear to work with vCenter 8 #635

smoonen opened this issue Sep 24, 2024 · 0 comments
Labels

Comments

@smoonen
Copy link

smoonen commented Sep 24, 2024

Describe the bug

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

  1. Import the VMware.VMEncryption and VMware.VsanEncryption modules
  2. Connect to vCenter
  3. 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

Additional context

No response

@smoonen smoonen added the bug label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant