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:
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.
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 ...
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!
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.
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!