Hi,
On a Windows 2016 server running PowerShell 5.1, I get the following error when calling Get-VIEvent:
get-vievent : 8/23/2017 5:15:07 PM Get-VIEvent Error in deserializing body of reply message for operation 'RetrieveProperties'.
At line:1 char:1
+ get-vievent
+ ~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-VIEvent], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetEvent
It works fine on a server running Windows 2012 r2 and PowerShell 5.
Thanks,
Joel
I should modify this - this also fails for me on Server 2012 r2 / PS 5 / PowerCLI 6.5
Works for me.
Against which vCenter version are you running this?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
vCenter Server 6.5 Update 1.
Thanks.
Never saw that one before, and I can't reproduce.
Did you have a closer look at the exception?
Do the following after the error
$error[0] | Format-Custom -Depth 3
Perhaps that might give some more clues.
Btw, accessing Events through the Web Client works without an issue?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks, LucD. Unfortunately, executing '$error[0] | Format-Custom -Depth 3' shows the exact same error message as I originally posted - no change.
Bummer!
I suggest you open a SR, this looks like a "feature" :smileygrin:
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I'm seeing similar issue from Windows 10 (Powershell 5) w/ vCenter 6.5U1 as well.
Not sure if there is a connection, but I experienced the same at some point.
A restart of my VCSA seems to have fixed it at that time.
But still looks like a "feature" to me.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
After some more testing, it seems very specific to PowerCLI 6.5. I was able to reproduce issue on a Windows 7 box running Powershell 5.1 w/ PowerCLI 6.5.x (MSI or PSGallery version). The issue does not show itself when I was running powerCLI 6.0R3 MSI install.
kmruddyVMW
I'm not 100% sure it is PowerCLI related, my Get-VIEventPlus function, which uses the API method, had the problem as well.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I have a similar function to your get-vieventplus that errors out in the same way. I was thinking it might be a powershell version problem, but I tested from powershell 4.0-5.1 w/ PowerCLI 6.0R3 w/o any issues. The minute I installed 6.5 (either via MSI or PSGallery) those serialization errors began to appear.
It could of course be something in the vSphere framework that comes with PowerCLI.
Testing the API in the framework of another language could potentially confirm that.
Or perhaps calling the method via the MOB is already sufficient proof?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I definitely feel like it's something in PowerCLI 6.5, but it's very inconsistent. Like if I grabbed events for a vm object, it would return fine. If I grabbed all my $vmhosts and did a get-vievent, 1 or more may error out w/ deserialization errors. when I try to hit individually, some will work some won't.
The one consistent thing is that 6.0R3 doesn't exhibit these issues at all.
(I've been using a Fusion Windows 7 VM and keep snapping back to 6.0R3)
Hi All,
Did anyone get to the bottom of this?
I am getting this message too...
It is intermittent and time dependent, from the testing I have done using start and end dates/times and or maxsamples looks like there is an event type that could affect it.
Are any of you running something like Zerto or similar?
I have opened an SR but have been pushed towards "VMware Knowledge Base " SDK Support, but as this is a base command issue I don't see it falling there.
If there is an update I will update this ticket.
Cheers
Mark
No, no Zert in my environment, and I get the intermittent error as well.
The SR for PowerCLI should be handled, see PowerCLI Support Breakdown
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD Thank you for the reply..
I will refer that back to VMware support..
I have tested and found you can do a maxsamples 100 one minutes the next it fails, but you can run it consistently with start / end times so for that seems to indicate that the issue is a type of event. The reason I asked re Zerto is that zerto also puts events in the event log and VMware have not confirmed back to me that they can reproduce this or not so I was wondering if it was something outside of their eco system.
Thanks again
Kind regards
Mark
No Zerto or any 3rd parties in my environment either.
I'm seeing this as well, but my error is this:
PS C:\Users\anpa> get-view -ViewType VirtualMachine
get-view : 2017-11-22 09:08:24 Get-View Error in deserializing body of reply message for operation 'RetrieveProperties'.
At line:1 char:1
+ get-view -ViewType VirtualMachine
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-View], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.DotNetInterop.GetVIView
Running against vCenter 6.0 U3 on my Windows 10 machine.
PS C:\Users\anpa> Get-PSVersion
Major Minor Build Revision
----- ----- ----- --------
5 1 15063 726
PS C:\Users\anpa> get-module | Select Name,Version
Name Version
---- -------
Microsoft.PowerShell.Management 3.1.0.0
Microsoft.PowerShell.Utility 3.1.0.0
PSReadline 1.2
VMware.VimAutomation.Cis.Core 6.5.1.5374323
VMware.VimAutomation.Common 6.5.1.5335010
VMware.VimAutomation.Core 6.5.1.5374329
VMware.VimAutomation.Sdk 1.0.0.5334677
Did you get to the bottom of this? Same issue here.
PowerCLI Get-View error - deserializing body of reply message...