Set-UnityVMwareLUN - Error description: Unprocessable Entity
Brantlab opened this issue · comments
Set-UnityVMwareLUN -ID sv_1 -Host host.example.com -append
Confirm
Are you sure you want to perform this action?
Performing the operation "Modify VMware LUN Example Datastore" on target "example Unity".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
The array sends an error message:
Error code: 422
Error description: Unprocessable Entity
Error details: {"error":{"errorCode":131149864,"httpStatusCode":422,"messages":[{"en-US":"Cannot find the specified host by id/name host.example.com. Please recheck if it exists. (Error Code:0x7d13028)"}],"created":"2019-03-13T17:17:32.088Z"}}
Invoke-WebRequest : The remote server returned an error: (422) Unprocessable Entity.
At line:33 char:15
+ ... $data = Invoke-WebRequest -Uri $URI -ContentType "application/jso ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
PS C:\> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.17763.316
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.316
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
PS C:\> get-module
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content...}
Manifest 3.0.0.0 Microsoft.PowerShell.Security {ConvertFrom-SecureString, ConvertTo-SecureString, Get-Acl, Get-AuthenticodeSi...
Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
Manifest 3.0.0.0 Microsoft.WSMan.Management {Connect-WSMan, Disable-WSManCredSSP, Disconnect-WSMan, Enable-WSManCredSSP...}
Script 2.0.0 PSReadline {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PSReadLineKeyHandler, ...
Script 0.16.1 Unity-Powershell {Connect-Unity, Disable-UnityFastCache, Disconnect-Unity, Enable-UnityFastCach...
Script 6.7.0.1... VMware.Vim
Script 11.2.0.... VMware.VimAutomation.Cis.Core {Connect-CisServer, Disconnect-CisServer, Get-CisService}
Script 11.2.0.... VMware.VimAutomation.Common
Script 11.2.0.... VMware.VimAutomation.Core {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAdapter, Add-VMHost, A...
Script 11.2.0.... VMware.VimAutomation.Sdk {Get-ErrorReport, Get-InstallPath, Get-PSVersion}
- [ x] Check that your Powershell version > 5.0 (Bonus point if you are using the latest version available)
- [x ] Check that you follow the instructions for installing the module
Also Unity 400F
4.4.1.1539309879
Hello @Brantlab,
I've published a new version of the module in the develop
branch. It's version 0.16.2. Do you have the possibility to test it ?
Regards
Still fails on my Unity 5.x system:
get-unityLun -name TestGabrie001
Id Name Pool IsThinEnabled TieringPolicy SizeTotal SizeAllocated Type
-- ---- ---- ------------- ------------- --------- ------------- ----
sv_385 TestGabrie001 @{id=pool_1} True Autotier_High 10737418240 0 Standalone
set-unitylun -id sv_385 -host vcdesx07006.virtualcenter.lan -append
The array sends an error message:
Error code: 422
Error description: Unprocessable Entity
Error details: {"error":{"errorCode":131149864,"httpStatusCode":422,"messages":[{"en-US":"Cannot find the specified host by id/name vcdesx07006.virtualcenter.lan. Please recheck if it exists. (Error Code:0x7d13028)"}],"created":"2019-10-17T11:30:59.018Z"}}
Invoke-WebRequest : The remote server returned an error: (422) Unprocessable Entity.
At line:33 char:15
+ ... $data = Invoke-WebRequest -Uri $URI -ContentType "application/jso ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
get-module
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 1.0.0.0 ISE {Get-IseSnippet, Import-IseSnippet, New-IseSnippet}
Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content...}
Manifest 3.0.0.0 Microsoft.PowerShell.Security {ConvertFrom-SecureString, ConvertTo-SecureString, Get-Acl, Get-AuthenticodeSignature...}
Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
Manifest 3.0.0.0 Microsoft.WSMan.Management {Connect-WSMan, Disable-WSManCredSSP, Disconnect-WSMan, Enable-WSManCredSSP...}
Binary 1.0.0.1 PackageManagement {Find-Package, Find-PackageProvider, Get-Package, Get-PackageProvider...}
Script 1.0.0.1 PowerShellGet {Find-Command, Find-DscResource, Find-Module, Find-RoleCapability...}
Script 0.16.2 Unity-Powershell {Connect-Unity, Disable-UnityFastCache, Disconnect-Unity, Enable-UnityFastCache...}
Binary 6.5.4.6... VMware.VimAutomation.Cis.Core {Connect-CisServer, Disconnect-CisServer, Get-CisService}
Manifest 6.5.4.6... VMware.VimAutomation.Common
Binary 6.5.2.6... VMware.VimAutomation.Core {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAdapter, Add-VMHost, Add-VMHostNtpServer...}
Manifest 1.0.0.5... VMware.VimAutomation.Sdk {Get-InstallPath, Get-PSVersion}
Same goes for a VMware LUN instead of Standalone LUN:
`Get-UnityVMwareLUN -name VMwareTestGabrie001
Id Name Pool IsThinEnabled TieringPolicy SizeTotal SizeAllocated Type
sv_387 VMwareTestGabrie001 @{id=pool_1} True Autotier_High 11811160064 0 VmWareISCSI
PS H:> set-unityvmwarelun -id sv_387 -host vcdesx07006.virtualcenter.lan -append
The array sends an error message:
Error code: 422
Error description: Unprocessable Entity
Error details: {"error":{"errorCode":131149864,"httpStatusCode":422,"messages":[{"en-US":"Cannot find the specified host by id/name vcdesx07006.virtualcenter.lan. Please recheck if it exists. (Error Code:0x7d13028)"}],"created":"2019-10-17T11:38:01.236Z"}}
Invoke-WebRequest : The remote server returned an error: (422) Unprocessable Entity.
At line:33 char:15
- ... $data = Invoke-WebRequest -Uri $URI -ContentType "application/jso ...
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
- FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand`
Are there any additional updates on this issue? I'm also experiencing this and would very much like to to use this cmdlet in my workflow for deploying new ESXi hosts.