ESXi にドライバインストール済のカスタマイズインストールディスクの作成

新しいメディアサーバを作っているときついでにVMWare ESXiサーバを作っちゃる。
インストールしていると、RAIDドライブが見つからない。

先日の記事でも書きましたが、Adaptec RAID 6405Eを使うときにもちょっと悩んでいました。これって事ね。
VMWare ESXiでAdaptec RAID 6405Eをインストールする話(2016/09/29)
てっきりLinux , Windows とかと同じようにDriverをインストールするタイミングがあるのかな?なんて思ってたわけです。

調べると、PowerShellを使ってドライバー包括したディスクを作ればOKってことらしい。
↓ 参考に作業を実施します
ESXi のカスタムディスクを作る (6.x系) | すらりん日記

Adaptecのドライバをc:\esxi60にコピペしておきます(esxi60ディスク直下すべて zipとvibファイル)

ESXi-Customizer-PSをダウンロードします。
VMware Front Experience: ESXi-Customizer-PS | VMWare
ESXi-Customizer-PS-v2.4.ps1が取れましたっと

んで、PowerShellを起動して実行…

PS C:¥Users¥wataru¥Downloads> ./ESXi-Customizer-PS-v2.4.ps1
./ESXi-Customizer-PS-v2.4.ps1 : このシステムではスクリプトの実行が無効になっているため、ファイル C:¥Users¥wataru¥Downlo
ads¥ESXi-Customizer-PS-v2.4.ps1 を読み込むことができません。詳細については、「about_Execution_Policies」(http://go.micr
osoft.com/fwlink/?LinkID=135170) を参照してください。
発生場所 行:1 文字:1
+ ./ESXi-Customizer-PS-v2.4.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : セキュリティ エラー: (: ) []、PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

はい?引数忘れたけど…
セキュリティエラー??

実行が無効って事はPolicyが変なんだろうな。
WindowsでPowerShellスクリプトの実行セキュリティポリシーを変更する | @IT

PS C:¥Users¥wataru¥Downloads> Get-ExecutionPolicy
Restricted

実行できないね。

なのでポリシーを変更させます。

PS C:¥Users¥wataru¥Downloads> Set-ExecutionPolicy Unrestricted
実行ポリシーの変更
実行ポリシーは、信頼されていないスクリプトからの保護に役立ちます。実行ポリシーを変更すると、about_Execution_Policies
のヘルプ トピック (http://go.microsoft.com/fwlink/?LinkID=135170)
で説明されているセキュリティ上の危険にさらされる可能性があります。実行ポリシーを変更しますか?
[Y] はい(Y)  [A] すべて続行(A)  [N] いいえ(N)  [L] すべて無視(L)  [S] 中断(S)  [?] ヘルプ (既定値は "N"): y
PS C:¥Users¥wataru¥Downloads> Get-ExecutionPolicy
Unrestricted

これで実行します。

PS C:¥Users¥wataru¥Downloads> .¥ESXi-Customizer-PS-v2.4.ps1 -pkgdir c:¥esxi60

Script to build a customized ESXi installation ISO or Offline bundle using the VMware PowerCLI ImageBuilder snapin
(Call with -help for instructions)

Logging to C:¥Users¥wataru¥AppData¥Local¥Temp¥ESXi-Customizer-PS.log ...

Running with PowerShell version 5.1 and VMware vSphere PowerCLI 5.5 Release 1 build 1295336

Connecting the VMware ESXi Online depot ... [OK]

Getting Imageprofiles, please wait ... [OK]

Using Imageprofile ESXi-6.0.0-20160804001-standard ...
(dated 07/30/2016 01:48:09, AcceptanceLevel: PartnerSupported,
For more information, see http://kb.vmware.com/kb/2145667.)

Loading Offline bundles and VIB files from c:¥esxi60 ...
   Loading C:¥esxi60¥aacraid-esxi6.0-1.2.1.41024.zip ... [OK]
      Add VIB scsi-aacraid 6.0.6.2.1.41024-1OEM.600.0.0.2494585 [OK, replaced 1.1.5.1-9vmw.600.0.0.2494585]
   Loading C:¥esxi60¥vmware-esxi-drivers-scsi-aacraid-600.6.2.1.41024.-1.0.6.2494585.x86_64.vib ... [OK]
      Add VIB scsi-aacraid 6.0.6.2.1.41024-1OEM.600.0.0.2494585 [IGNORED, already added]

Exporting the Imageprofile to 'C:¥Users¥wataru¥Downloads¥ESXi-6.0.0-20160804001-standard-customized.iso'. Please be pati
ent ...


All done.

ESXi-6.0.0-20160804001-standard-customized.isoが無事作成されました。
これをCDに焼いてインストール作業が続けられました。