VMware Cloud Community
kedarjk
Enthusiast
Enthusiast

Getting error as 'Single sign-on failed' while running set-spbmentityconfiguration command.

I am getting error as below when trying to change the storage policy of a VM.

Set-SpbmEntityConfiguration vSphere single sign-on failed for connection '<VC-6.7 server>/sts/STSService/vsphere.local'.
Future operations which require single sign-on on this connection will fail.
The underlying cause was: Failed to create RSA key: The system cannot find the file specified.

Set-SpbmEntityConfiguration $vm -StoragePolicy replicatio ...
+ CategoryInfo : NotSpecified: (:) [Set-SpbmEntityConfiguration],
CisException
+ FullyQualifiedErrorId : VMware.VimAutomation.ViCore.Impl.V1.Service.Tagging.Cis.TaggingServiceCisImpl.GetTag.Error,VMware.VimAutomation.Storage.Commands.Cmdlets.Spbm.SetSpbmEntityConfiguration

Basically I am running a powershell command via regular windows cmd and the complete command is like this.

I already tried using both administrator@vsphere.local and some_user@vsphere.local users for the below command, but output is the same.


$username = 'username';$password = ConvertTo-SecureString 'password' -AsPlainText -Force;$vcCred = New-Object System.Management.Automation.PSCredential -ArgumentList ($username, $password);Connect-VIServer -server 'VC_server_FQDN' -Credential $vcCred;$vm = get-vm -name <vm_display_name>;Set-SpbmEntityConfiguration $vm -StoragePolicy <policy_name>;$vm_hds = $vm | Get-HardDisk;Set-SpbmEntityConfiguration $vm_hds -StoragePolicy <policy_name>;$vm_hds | Get-SpbmEntityConfiguration;$vm | Get-SpbmEntityConfiguration;Disconnect-VIServer -Confirm:$false

PowerCLI version is :

PS C:\Users\testadm> Get-Module

ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...
Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
Binary 1.0.0.1 PackageManagement {Find-Package, Find-PackageProvider, Get-Package, Get-Pack...
Script 1.0.0.1 PowerShellGet {Find-Command, Find-DscResource, Find-Module, Find-RoleCap...
Script 1.2 PSReadline {Get-PSReadlineKeyHandler, Get-PSReadlineOption, Remove-PS...
Script 7.0.1.1... VMware.Vim
Script 12.1.0.... VMware.VimAutomation.Cis.Core {Connect-CisServer, Disconnect-CisServer, Get-CisService}
Script 12.1.0.... VMware.VimAutomation.Common {Get-Task, New-OAuthSecurityContext, Stop-Task, Wait-Task}
Script 12.1.0.... VMware.VimAutomation.Core {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAd...
Script 12.1.0.... VMware.VimAutomation.Sdk {Get-ErrorReport, Get-InstallPath, Get-PSVersion}

 

0 Kudos
1 Reply
LucD
Leadership
Leadership

This might be something similar to what Rudi described in Issues with Get-Spbm* PowerCLI cmdlets and vCenter 6.5


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos