bartekjan
Contributor
Contributor

Error retrieving file for VIB ... '_SharedFile' object has no attribute 'writing'

Jump to solution

Hi,

I would like to export depot to iso. So, I do "export-esximageprofile -imageprofile Community -exporttoiso -filepath 'ESXi-6.5-Custom_r8168_al.iso' -nosignaturecheck -Force". But I receive error like this:

export-esximageprofile : Error retrieving file for VIB 'VMW_bootbank_shim-vmklinux-9-2-3-0_6.5.0-0.0.4564106': ('vib20/shim-vmklinux-9-2-3-0/VMW_bootbank_shim-vmklinux-9-2-3-0_6.5.0-0.0.4564106.vib', "Unable to open VIB archive in streaming mode: '_SharedFile' object
has no attribute 'writing'").
At line:1 char:1
+ export-esximageprofile -imageprofile Community -exporttoiso -filepath ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Export-EsxImageProfile], FaultException
+ FullyQualifiedErrorId : System.ServiceModel.FaultException,VMware.ImageBuilder.Commands.ExportProfile

What is wrong? How can I resolve this problem?

0 Kudos
1 Solution

Accepted Solutions
carlos29
Contributor
Contributor

Hi everyone,

I solved this issue downgrading the VMware.ImageBuilder module. I realized that installing an older version of powercli kept the latest version of this module, which after all is the one that performs the exportation. So I installed an older version of the VMware.ImageBuilder module and simply remove the last version from the modules directory, then I tried the exportation again and it worked.

I hope this help.

View solution in original post

0 Kudos
12 Replies
lamw
Community Manager
Community Manager

This looks to be same issue as reported here https://communities.vmware.com/t5/ESXi-Discussions/Custom-ISO-fails-at-Export-ESXImageProfile-with-a... 

Are you also using PowerCLI 13 or earlier version?

0 Kudos
bartekjan
Contributor
Contributor

PowerCLI 13

0 Kudos
networkadmin4
Contributor
Contributor

Hello,

I have the same error. Is there some solution for this?

Thank you

0 Kudos
maksym007
Hot Shot
Hot Shot

I thought that Problem was in PowerCLI 13 but now looks somewhere deeper

0 Kudos
networkadmin4
Contributor
Contributor

Yes, error is not just when exporting image. Find the error on the picture below.

ew-EsxImageProfile : Cannot process argument transformation on parameter 'CloneProfile'. No image profile has a name
that matches 'ESXi-8.0-20513097-standard'. You may want to use the Get-EsxImageProfile cmdlet to search for an image
profile.
At line:1 char:35
+ ... ew-EsxImageProfile -CloneProfile "ESXi-8.0-20513097-standard" -Name " ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [New-EsxImageProfile], ParameterBindingArgumentTransformationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,VMware.ImageBuilder.Commands.NewImageProfile

0 Kudos
maksym007
Hot Shot
Hot Shot

I hope it will be fixed soon

0 Kudos
carlos29
Contributor
Contributor

Hi everyone,

I solved this issue downgrading the VMware.ImageBuilder module. I realized that installing an older version of powercli kept the latest version of this module, which after all is the one that performs the exportation. So I installed an older version of the VMware.ImageBuilder module and simply remove the last version from the modules directory, then I tried the exportation again and it worked.

I hope this help.

0 Kudos
garnt
Contributor
Contributor

Also hitting this issue. Would be good to get it fixed soon.....

0 Kudos
networkadmin4
Contributor
Contributor

Hello,

I solved it by installing PowerCLI version 12.7 and deleting powerCLI 13.0, but just for vmware 7. For vmware vsphere 8 it still doesnt work.

 

0 Kudos
bartekjan
Contributor
Contributor

Carlos29 -> Yes. It helped. Thank you.

0 Kudos
Bilal041987
Contributor
Contributor

1. For ESXi 8, you can export the image profile with -ExportToBundle switch then you will have to install vCenter 8 and go to Home --> Auto Deploy --> Enable Image Builder --> Software Depots.

Import the zip file that you created.

Click on export. Leave everything default and export the iso.

Secondly, if you want to export image profile using -ExportToISO switch then you must have Python version 3.7.9 instead of 3.7.0 once you installed python 3.7.9 then ImageBuilder will also export the iso as well.

nomanmiannoor
Contributor
Contributor

Good Job. Really Appreciated👏

0 Kudos