VMware Cloud Community
spiffstr
Contributor
Contributor

12.6 upgrade breaks export-vdswitch, export-vdportgroup

It looks like VMware.VimAutomation.Vds uses ICSharpCode.SharpZipLib, which is located in VMware.VimAutomation.Common\<version> folder.

In 12.5, VMware.VimAutomation.Vds calls for ICSharpCode.SharpZipLib, Version=1.1.0.145, which is/was located in the VMware.VimAutomation.Common\12.5.0.19093563 folder. 

The VMware.VimAutomation.Common-12.6.0.19600917 includes an updated version.  The 12.6 upgrade didn't upgrade the VMware.VimAutomation.Vds and it's still looking for the old dll, which no longer exists.

 

Win 10, PS 5.1.19041.1645

>>>

PS C:\...> Export-VDSwitch -vdswitch vds1
Export-VDSwitch : 4/15/2022 13:01:26 Export-VDSwitch Could not load file or assembly 'ICSharpCode.SharpZipLib, Version=1.1.0.145,
Culture=neutral, PublicKeyToken=1b03e6acf1164f73' or one of its dependencies. The system cannot find the file specified.
At line:1 char:1
+ Export-VDSwitch -vdswitch vds1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Export-VDSwitch], ViError
+ FullyQualifiedErrorId : Vds_Impl_VDSwitchServiceImpl_ExportVDSwitch_Error,VMware.VimAutomation.Vds.Commands.ExportVDSwitch

>>>

Reply
0 Kudos
7 Replies
LucD
Leadership
Leadership

I suggest opening an SR.

If GSS says you need a Developer Support contract point them to the Help and Support for VMware PowerCLI chapter


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

Reply
0 Kudos
spiffstr
Contributor
Contributor

thanks. will do.

Reply
0 Kudos
knikolov
VMware Employee
VMware Employee

Thanks for reporting this. We'll take a look at and check what options we have for a workaround or fix.

Reply
0 Kudos
mkfm
Enthusiast
Enthusiast

as a workaround I copied ICSharpCode.SharpZipLib.dll from 12.5 folder to 12.6.0.19600917 folder, overwriting the new one, and for now it looks like everything is working

spiffstr
Contributor
Contributor

cool, that worked. i thought i had tried that but remembered just now that you have to have powershell window closed since that file is held open during a session.  I closed the window and then got sidetracked and never finished that experiment. 

i'm just going to wait for the fix to apply it to all the other VMs but this will get my backup script working before I tear apart these DVSs I'm working on.

thanks.

 

Reply
0 Kudos
knikolov
VMware Employee
VMware Employee

Yes, this workaround will work unless you're doing any OVA related operations (Import/Export VMs), since those require the new version of the library. Another workaround is to use PowerShell 7, instead of 5.1. The dependency there is not version specific and it will work with the new version of the dll. We have already fixed the issue and we'll release the fix with the next PowerCLI version.

mkfmevntm
Contributor
Contributor

PowerCLI 12.7 was released and Export-VDSwitch works again! New Release - PowerCLI 12.7 - VMware PowerCLI Blog

Reply
0 Kudos