ネステッドESXi 用 VMware Tools 導入済みの ESXi 5.5 を作成してみました。(Image Builder PowerCLI)

ネステッドESXi 用 VMware Tools 導入済みの ESXi 5.5 を作成してみました。(Image Builder PowerCLI)

以前にネステッドESXi 用のVMware Tools を使ってみたところ
便利なのですが、毎回何台もインストールするのは大変に思えました。


そこで、Image Builder PowerCLI
VMware Tools for Nested ESXi 導入済みの ESXi インストール用ISOイメージ

を作成してみました。


ESXi および vCenter Server 5.5 のドキュメント
Image Builder の概要
http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.vsphere.install.doc/GUID-C84C5113-3111-4A27-9...


Image Builder のモジュールは、PowerCLI を起動すると自動的に読み込まれます。

※「Get-ImageBuilderCommand」でも同じ結果がみられます。

PowerCLI> Get-VICommand | where {$_.ModuleName -eq "VMware.ImageBuilder"} | Select Name

Name
----
Add-EsxSoftwareDepot
Add-EsxSoftwarePackage
Compare-EsxImageProfile
Export-EsxImageProfile
Get-EsxImageProfile
Get-EsxSoftwareDepot
Get-EsxSoftwarePackage
New-EsxImageProfile
Remove-EsxImageProfile
Remove-EsxSoftwareDepot
Remove-EsxSoftwarePackage
Set-EsxImageProfile


それぞれの説明は下記あたりを参照してください。

Image Builder PowerCLI の概要
http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.vsphere.install.doc/GUID-2D4D27BB-727F-4706-9...


Image Builder で ISOイメージを作成するための準備

★PowerCLI

今回は、PowerCLI 5.1 R2 を使用しました。Image Builder は PowerCLI に同梱されています。

PowerCLI> Get-PowerCLIVersion

PowerCLI Version
----------------
   VMware vSphere PowerCLI 5.1 Release 2 build 1012425
---------------
Snapin Versions
---------------
   VMWare AutoDeploy PowerCLI Component 5.1 build 768137
   VMWare ImageBuilder PowerCLI Component 5.1 build 768137
   VMware License PowerCLI Component 5.1 build 669840
   VMware VDS PowerCLI Component 5.1 build 1012428
   VMware vSphere PowerCLI Component 5.1 build 1012428

★ESXi の オフライン バンドル と VIBファイル

ESXi のオフライン バンドル(ZIP形式のESXiインストーラ)と、VIB ファイルを用意しておきます。

オフライン バンドルのかわりに、ESXi のパッチ(たとえば、ESXi510-201310001.zip といったファイル)でもOKです。

今回は、2つのファイルを C:\temp フォルダにおいて作業しました。

オフラインバンドル
MyVMware サイトなどからDLします。今回は

ESXi 5.5 (VMware-ESXi-5.5.0-1331820-depot.zip)を使用します。

VIB ファイル

下記を VMware LABS サイトからDL します。

VMware Tools for Nested ESXi
http://labs.vmware.com/flings/vmware-tools-for-nested-esxi

PowerCLI> ls

    ディレクトリ: C:\temp

Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---        2013/12/22     13:12    1863772 esx-tools-for-esxi-9.7.0-0.0.00000.i386.vib
-a---        2013/10/18     23:37  337919930 VMware-ESXi-5.5.0-1331820-depot.zip

Image Builder での ISOイメージの作成


Image Builder は、vCenter/ESXi に接続しないで作業できます。


1. ESXiのオフラインバンドルから、イメージ プロファイルを ソフトウェア デポ に登録します。
※ちなみに、この登録情報は PowerCLI の画面を一度終了すると消えます。

PowerCLI> Add-EsxSoftwareDepot VMware-ESXi-5.5.0-1331820-depot.zip

Depot Url
---------
zip:C:\temp\VMware-ESXi-5.5.0-1331820-depot.zip?index.xml


登録されたプロファイルを確認します。
VMware Tools あり(standard) / なし(no-tools)の2パターンが登録されています。

PowerCLI> Get-EsxImageProfile

Name                           Vendor          Last Modified   Acceptance Level
----                           ------          -------------   ----------------
ESXi-5.5.0-1331820-standard    VMware, Inc.    2013/09/19 6... PartnerSupported
ESXi-5.5.0-1331820-no-tools    VMware, Inc.    2013/09/19 6... PartnerSupported


2. イメージプロファイルの作成


VMware Tools あり(~Standard) のプロファイルをクローンして、
VIB を追加するためのプロファイルを作成します。

  • プロファイルの名前は「ESXi-5.5.0-1331820-with-esxitools」にしました。
  • Vendor は適当に入力します。
    カスタムイメージなので "VMware, Inc." ではない文字列にしておくとわかりやすいと思います。
  • AcceptanceLevel(承認レベル) は「CommunitySupported」にしました。

※承認レベルについては、下記を参照してください。

vSphere のインストールとセットアップ ガイド
承認レベル
http://pubs.vmware.com/vsphere-55/topic/com.vmware.vsphere.install.doc/GUID-0410FAFA-A007-4BD5-A0CC-...

PowerCLI> New-EsxImageProfile -CloneProfile ESXi-5.5.0-1331820-standard -Name ESXi-5.5.0-1331820-with-esxitools -Vendor "gowatana" -AcceptanceLevel CommunitySupported

Name                           Vendor          Last Modified   Acceptance Level
----                           ------          -------------   ----------------
ESXi-5.5.0-1331820-with-esx... gowatana        2013/09/19 6... CommunitySupported

3. VIBファイルを ソフトウェア デポ に追加します。

ISOイメージに追加したいVIB ファイルを、ソフトウェア デポに追加します。

この時のコマンドラインの結果で、VIBのパッケージ名がわかります。
(今回追加したVIBだと esx-tools-for-esxi です。)

PowerCLI> Get-EsxSoftwarePackage -PackageUrl esx-tools-for-esxi-9.7.0-0.0.00000.i386.vib

Name                     Version                        Vendor     Creation Date
----                     -------                        ------     -------------
esx-tools-for-esxi       9.7.0-0.0.00000                VMware     2013/11/08 19...


4. ソフトウェアデポに追加したVIBをイメージプロファイルに追加します。

「-SoftwarePackage」 には、ひとつ前の手順でわかる VIBのパッケージ名を指定します。

PowerCLI> Add-EsxSoftwarePackage -ImageProfile ESXi-5.5.0-1331820-with-esxitools -SoftwarePackage esx-tools-for-esxi

Name                           Vendor          Last Modified   Acceptance Level
----                           ------          -------------   ----------------
ESXi-5.5.0-1331820-with-esx... gowatana        2013/12/29 9... CommunitySupported

5. イメージプロファイルから、ISOファイルを作成します。

「Export-EsxImageProfile」 に「-ExportToIso」を指定することで、

イメージプロファイルから ISOファイルを作成することができます。

PowerCLI> Export-EsxImageProfile -ExportToIso -NoSignatureCheck -ImageProfile ESXi-5.5.0-1331820-with-esxitools -FilePath VMware-ESXi-5.5.0-1331820-with-esxitools.iso

下記のように署名エラーとなるため、「Export-EsxImageProfile」には「-NoSignatureCheck」を指定しています。

(失敗例)

PowerCLI C:\temp> Export-EsxImageProfile -ExportToIso -ImageProfile ESXi-5.5.0-1331820-with-esxitools -FilePath VMware-ESXi-5.5.0-1331820-with-esxitools.iso
Export-EsxImageProfile : Could not find a trusted signer.
発生場所 行:1 文字:23
+ Export-EsxImageProfile <<<<  -ExportToIso -ImageProfile ESXi-5.5.0-1331820-with-esxitools -FilePath VMware-ESXi-5.5.0-1331820-with-esxitools.iso
    + CategoryInfo          : NotSpecified: (:) [Export-EsxImageProfile]、SoapException
    + FullyQualifiedErrorId : System.Web.Services.Protocols.SoapException,VMware.ImageBuilder.Commands.ExportProfile

イメージ プロファイルから、オフライン バンドル(.zip 形式)も作成できます。

その場合は、「Export-EsxImageProfile」 に「-ExportToBundle」を指定します。

PowerCLI> Export-EsxImageProfile -ExportToBundle -NoSignatureCheck -ImageProfile ESXi-5.5.0-1331820-with-esxitools -FilePath VMware-ESXi-5.5.0-1331820-with-esxitools.zip


ISOファイルが作成されました。

PowerCLI> ls


    ディレクトリ: C:\temp


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---        2013/12/22     13:12    1863772 esx-tools-for-esxi-9.7.0-0.0.00000.i386.vib
-a---        2013/10/18     23:37  337919930 VMware-ESXi-5.5.0-1331820-depot.zip
-a---        2013/12/29      9:20  343238656 VMware-ESXi-5.5.0-1331820-with-esxitools.iso
-a---        2013/12/29      9:24  332993548 VMware-ESXi-5.5.0-1331820-with-esxitools.zip


作成したISOファイルで ESXi をインストールしてみました。

ISOファイルでブートしたときのOSイメージ選択画面に、

今回作成したイメージプロファイルの名前が表示されています。

※今回は VMware Workstation 9 にネステッドESXi しています。

esxi_imgprof1.png


ESXi をインストールすると、esx-tools-for-esxi もインストールされています。
イメージ プロファイルの承認レベルは「CommunitySupported」にしましたが、
この VIB 単体には「VMwareCertified」が指定されていたみたいです。

~ # esxcli software vib get -n esx-tools-for-esxi
VMware_bootbank_esx-tools-for-esxi_9.7.0-0.0.00000
   Name: esx-tools-for-esxi
   Version: 9.7.0-0.0.00000
   Type: bootbank
   Vendor: VMware
   Acceptance Level: VMwareCertified
   Summary: VMware Tools for ESXi as a guest.
   Description: VMware Tools for ESXi as a guest.
   ReferenceURLs:
   Creation Date: 2013-11-08
   Depends: esx-base >= 5.0
   Conflicts:
   Replaces:
   Provides: tools-for-esxi = 9.7.0
   Maintenance Mode Required: True
   Hardware Platforms Required:
   Live Install Allowed: False
   Live Remove Allowed: False
   Stateless Ready: True
   Overlay: True
   Tags:
   Payloads: esx-tool


作成したイメージプロファイルのISOでインストールされていることがわかります。

~ # esxcli software profile get
ESXi-5.5.0-1331820-with-esxitools
   Name: ESXi-5.5.0-1331820-with-esxitools
   Vendor: gowatana
   Creation Time: 2013-12-29T09:47:01
   Modification Time: 2013-12-29T09:56:08
   Stateless Ready: True
   Description:

      The general availability release of VMware ESXi Server 5.5.0
      brings whole new levels of virtualization performance to
      datacenters and enterprises.

   VIBs: ata-pata-amd 0.3.10-3vmw.550.0.0.1331820, ata-pata-atiixp 0.4.6-4vmw.550.0.0.1331820, ata-pata-cmd64x 0.2.5-3vmw.550.0.0.1331820, ata-pata-hpt3x2n 0.3.4-3vmw.550.0.0.1331820, ata-pata-pdc2027x 1.0-3vmw.550.0.0.1331820, ata-pata-serverworks 0.4.3-3vmw.550.0.0.1331820, ata-pata-sil680 0.4.8-3vmw.550.0.0.1331820, ata-pata-via 0.3.3-2vmw.550.0.0.1331820, block-cciss 3.6.14-10vmw.550.0.0.1331820, ehci-ehci-hcd 1.0-3vmw.550.0.0.1331820, elxnet 10.0.100.0v-1vmw.550.0.0.1331820, esx-base 5.5.0-0.0.1331820, esx-dvfilter-generic-fastpath 5.5.0-0.0.1331820, esx-tboot 5.5.0-0.0.1331820, esx-tools-for-esxi 9.7.0-0.0.00000, esx-xlibs 5.5.0-0.0.1331820, esx-xserver 5.5.0-0.0.1331820, ima-qla4xxx 2.01.31-1vmw.550.0.0.1331820, ipmi-ipmi-devintf 39.1-4vmw.550.0.0.1331820, ipmi-ipmi-msghandler 39.1-4vmw.550.0.0.1331820, ipmi-ipmi-si-drv 39.1-4vmw.550.0.0.1331820, lpfc 10.0.100.1-1vmw.550.0.0.1331820, lsi-mr3 0.255.03.01-1vmw.550.0.0.1331820, lsi-msgpt3 00.255.03.03-1vmw.550.0.0.1331820, misc-cnic-register 1.72.1.v50.1i-1vmw.550.0.0.1331820, misc-drivers 5.5.0-0.0.1331820, mtip32xx-native 3.3.4-1vmw.550.0.0.1331820, net-be2net 4.6.100.0v-1vmw.550.0.0.1331820, net-bnx2 2.2.3d.v55.2-1vmw.550.0.0.1331820, net-bnx2x 1.72.56.v55.2-1vmw.550.0.0.1331820, net-cnic 1.72.52.v55.1-1vmw.550.0.0.1331820, net-e1000 8.0.3.1-3vmw.550.0.0.1331820, net-e1000e 1.1.2-4vmw.550.0.0.1331820, net-enic 1.4.2.15a-1vmw.550.0.0.1331820, net-forcedeth 0.61-2vmw.550.0.0.1331820, net-igb 2.1.11.1-4vmw.550.0.0.1331820, net-ixgbe 3.7.13.7.14iov-11vmw.550.0.0.1331820, net-mlx4-core 1.9.7.0-1vmw.550.0.0.1331820, net-mlx4-en 1.9.7.0-1vmw.550.0.0.1331820, net-nx-nic 5.0.621-1vmw.550.0.0.1331820, net-tg3 3.123c.v55.5-1vmw.550.0.0.1331820, net-vmxnet3 1.1.3.0-3vmw.550.0.0.1331820, ohci-usb-ohci 1.0-3vmw.550.0.0.1331820, qlnativefc 1.0.12.0-1vmw.550.0.0.1331820, rste 2.0.2.0088-4vmw.550.0.0.1331820, sata-ahci 3.0-17vmw.550.0.0.1331820, sata-ata-piix 2.12-9vmw.550.0.0.1331820, sata-sata-nv 3.5-4vmw.550.0.0.1331820, sata-sata-promise 2.12-3vmw.550.0.0.1331820, sata-sata-sil 2.3-4vmw.550.0.0.1331820, sata-sata-sil24 1.1-1vmw.550.0.0.1331820, sata-sata-svw 2.3-3vmw.550.0.0.1331820, scsi-aacraid 1.1.5.1-9vmw.550.0.0.1331820, scsi-adp94xx 1.0.8.12-6vmw.550.0.0.1331820, scsi-aic79xx 3.1-5vmw.550.0.0.1331820, scsi-bnx2fc 1.72.53.v55.1-1vmw.550.0.0.1331820, scsi-bnx2i 2.72.11.v55.4-1vmw.550.0.0.1331820, scsi-fnic 1.5.0.4-1vmw.550.0.0.1331820, scsi-hpsa 5.5.0-44vmw.550.0.0.1331820, scsi-ips 7.12.05-4vmw.550.0.0.1331820, scsi-lpfc820 8.2.3.1-129vmw.550.0.0.1331820, scsi-megaraid-mbox 2.20.5.1-6vmw.550.0.0.1331820, scsi-megaraid-sas 5.34-9vmw.550.0.0.1331820, scsi-megaraid2 2.00.4-9vmw.550.0.0.1331820, scsi-mpt2sas 14.00.00.00-3vmw.550.0.0.1331820, scsi-mptsas 4.23.01.00-9vmw.550.0.0.1331820, scsi-mptspi 4.23.01.00-9vmw.550.0.0.1331820, scsi-qla2xxx 902.k1.1-9vmw.550.0.0.1331820, scsi-qla4xxx 5.01.03.2-6vmw.550.0.0.1331820, tools-light 5.5.0-0.0.1331820, uhci-usb-uhci 1.0-3vmw.550.0.0.1331820


イメージプロファイルに指定した 承認レベル「CommunitySupported」 も反映されています。

~ # esxcli software acceptance get
CommunitySupported


以上です。Image Builder で VMware Tools for Nested ESXi 導入済み ESXi 5.5 を作成してみる話でした。

Version history
Revision #:
1 of 1
Last update:
‎12-29-2013 04:41 AM
Updated by: