VMware Cloud Community
billdossett
Hot Shot
Hot Shot
Jump to solution

listing non-stateless VIBs in an imageprofile

I have honestly never felt so helpless... I have an image profile, it has non stateless VIBs in it, I want to take them out of it...

can I fiure out how to list them??? no.  If anyone could please tell me the syntax of how to do this I would really appreciate it..

The VMware documentation glibly states:

Use Image Builder PowerCLI cmdlets to view the VIBs in the image profile

Remove any VIBs that are not stateless-ready.

Rerun the Auto Deploy PowerCLI cmdlet.

I can remove VIBs, but I don't know how to examine if they are stateless or not..  I have examined the esximageprofile obj members and methods and don't see anything there, or don't understand it anyway.

many thanks if anyone can tell me how to do this...  I have googled but so far haven't found it which surprises me as well.

Bill

Bill Dossett
Reply
0 Kudos
1 Solution

Accepted Solutions
aaronwsmith
Enthusiast
Enthusiast
Jump to solution

This command will show you all packages within your Image Profile that are not Stateless Ready:

Get-EsxSoftwarePackage | ? { $_.StatelessReady -eq $False }

Add/Removing packages from a custom image profile requires you to create a variable referencing that profile.  Let me know if you need more specifics.  For now I'll assume $customProfile points to your image profile and now you want to remove the non-Auto Deploy friendly packages from it:

Get-EsxSoftwarePackage | ? { $_.StatelessReady -eq $False } | Remove-EsxSoftwarePackage -ImageProfile $customProfile

On the flipside, if you're building a fresh image profile and don't want to add any packages that are not StatelessReady:

Get-EsxSoftwarePackage | ? { $_.StatelessReady } | Add-EsxSoftwarePackage -ImageProfile $customProfile

Hope this helps.  I am in the process of creating our PowerCLI scripts for handling our Image Profile building process to create custom ESXi 5.1 images.

View solution in original post

Reply
0 Kudos
4 Replies
spravtek
Expert
Expert
Jump to solution

Hi ...

I'm not exactly sure on the correct command to get all the not stateless-ready vibs ...

And I can't test at the moment...

I know though, that this command lists if a certain vib is stateless-ready:

PowerCLI C:\> Get-‐EsxSoftwarePackage <name--vib> | Select StatelessReady

Maybe you can test/try to see if it helps you along ...

billdossett
Hot Shot
Hot Shot
Jump to solution

yes, I found that, trying to write a script to make use of it now, but I am a complete noob at powershell 😞 but I can program in about 20 other languages, so just a matter of time!

Bill Dossett
Reply
0 Kudos
aaronwsmith
Enthusiast
Enthusiast
Jump to solution

This command will show you all packages within your Image Profile that are not Stateless Ready:

Get-EsxSoftwarePackage | ? { $_.StatelessReady -eq $False }

Add/Removing packages from a custom image profile requires you to create a variable referencing that profile.  Let me know if you need more specifics.  For now I'll assume $customProfile points to your image profile and now you want to remove the non-Auto Deploy friendly packages from it:

Get-EsxSoftwarePackage | ? { $_.StatelessReady -eq $False } | Remove-EsxSoftwarePackage -ImageProfile $customProfile

On the flipside, if you're building a fresh image profile and don't want to add any packages that are not StatelessReady:

Get-EsxSoftwarePackage | ? { $_.StatelessReady } | Add-EsxSoftwarePackage -ImageProfile $customProfile

Hope this helps.  I am in the process of creating our PowerCLI scripts for handling our Image Profile building process to create custom ESXi 5.1 images.

Reply
0 Kudos
billdossett
Hot Shot
Hot Shot
Jump to solution

thankyou, it certainly looks like that will do the trick.  I haven't had a chance to try it yet, but thanks so much for the feedback, I will hopefully get to give it a try tomorrow!

Bill Dossett
Reply
0 Kudos