vmware / PowerCLI-Example-Scripts

http://blogs.vmware.com/powercli
Other
765 stars 609 forks source link

need help about esxi-image-creator.ps1 #182

Open EthanLiang1980 opened 6 years ago

EthanLiang1980 commented 6 years ago

Hi All, I want to use esxi-image-creator.ps1 to build ESXi installer but I got erroe while I tried to create the esxi installer.

My command like this:

.\esxi-image-creator.ps1 -NewProfileName HP_55_OEM_550P6 -WriteZip -Files "VMware-ESXi-5.5.0-Update3-3568722-HPE-550.9.6.5.9-Dec2016-depot.zip","ESXi550-201512001.zip","BCM-NetXtremeII-11.0-2371150.zip","hpsa-5.5.0.84-2338296.zip","nx_nic-esx55-5.5.643-2719295.zip","scsi-iomemory-vsl-55L-3.2.15.1699-5351975.zip","VMW-ESX-5.5.0-qlnativefc-1.1.70.0-3659120.zip","VMW-ESX-5.5.0-qlnativefc-1.1.77.0-4679253.zip"

Error as below:

The following VIBs will not be included in HP_55_OEM_550P6: tools-light Custom image profile HP_55_OEM_550P6 not created. The command has stopped,because Preference variable "ErrorActionPreference" or Common Parameters set to Stop: VIB Intel_bootbank_intelcim-provider_0.5-1.8's acceptance level is accepted, which is not compliant with the ImageProfile acceptance level certified

I have checked $ErrorActionPerference is continue and tried to add the -ErrorAction continue at the trail of the script but still got error.

Would anyone can help? my email is owengo@qq.com

nickveldrin commented 6 years ago

I haven't tried to run your specific output, but i know from experience that you have to set your acceptance level of support when you build your image, and it's usually based on those drivers, whether they're signed by VMware, etc.

[string]$NewProfileName = "Custom Image $(Get-Date -Format "yyyyMMddhhmm")",
    [ValidateNotNullOrEmpty()]
    [ValidateSet('VMwareCertified','VMwareAccepted','PartnerSupported','CommunitySupported')]

^- there above is what i see in the code. However, here below is how it's used:

try {
    New-EsxImageProfile -NewProfile $NewProfileName -SoftwarePackage $pkgs `
     -Vendor Custom  -AcceptanceLevel $Acceptance -Description "Made with esxi-image-creator.ps1" `
     -ErrorAction Stop -ErrorVariable CreationError | Out-Null
}

So basically, this powershell file looks like it needs to have [ValidateSet('VMwareCertified','VMwareAccepted','PartnerSupported','CommunitySupported')][string]$Acceptance = "VMwareCertified"

^- that in place of what's there, so that you can set the -Acceptance as any one of those, and then you can set whatever your vib needs, ie: "VMwareAccepted".