vSphere 7.0 の GA に併せて、PowerCLI や OVFTool 等の周辺ツール系の Update もリリースされました。
その中で、PowerCLI 12 のリリースノートより。
VMware PowerCLI Components In VMware PowerCLI 12.0.0, the following modules have been updated: [略] VMware.ImageBuilder: Provides cmdlets for managing depots, image profiles, and VIBs.
お、VMware.ImageBuilder の Update 来てる?
これはひょっとして PowerShell Core でも動くようになってない?ということで Try。
VMware.ImageBuilder の現状
マルチプラットフォーム対応した PowerShell Core に追従して、PowerCLI も v10 から PowerShell Core に対応し、Mac や Linux 上でも動作するようになりました。
…が
全てのモジュールが対応したわけではなく、一部モジュールは PowerShell Core 非対応のままで、Win 環境のみでの動作となっています。
Version Name Repository Description ------- ---- ---------- ----------- 6.7.0.1... VMware.DeployAutomation PSGallery This Windows PowerShell module contains PowerCLI... 6.7.0.1... VMware.ImageBuilder PSGallery This Windows PowerShell module contains PowerCLI... 11.2.0.... VMware.PowerCLI PSGallery This Windows PowerShell module contains VMware.P... 6.7.0.1... VMware.Vim PSGallery This Windows PowerShell module contains PowerCLI... 11.2.0.... VMware.VimAutomation.Cis.Core PSGallery This Windows PowerShell module contains PowerCLI... 11.0.0.... VMware.VimAutomation.Cloud PSGallery This Windows PowerShell module contains PowerCLI... 11.2.0.... VMware.VimAutomation.Common PSGallery This Windows PowerShell module contains function... 11.2.0.... VMware.VimAutomation.Core PSGallery This Windows PowerShell module contains Windows ... 【略】
(上は PowerCLI 11 ですが)
最新のPowerCLI インストール後、Get-InstalledModule
叩くと出てくる VMware モジュールで、Version が 10 以上となっているものは PowerShell Core 対応で、6.x 系のまま残っている物は PowerShell Core 非対応で Win環境のみの動作と思われる。
PowerCLI 12 を試す
というわけで、適当な Ubuntu 18.04 LTS に最新 Version の PowerShell / PowerCLI をインストールしてみる。
$ wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb $ sudo dpkg -i packages-microsoft-prod.deb $ sudo apt-get update $ sudo apt-get install -y powershell $ pwsh PS /home/mirie > Install-Module VMware.PowerCLI
これでインストール完了。Version を見てみる。
PS /home/mirie > Get-InstalledModule -Name VMware.* Version Name Repository Description 【一部略】 7.0.0.15902843 VMware.ImageBuilder PSGallery This Windows PowerShell module contains PowerCLI I… 12.0.0.15939652 VMware.VimAutomation.Common PSGallery This Windows PowerShell module contains functional… 12.0.0.15939657 VMware.VimAutomation.Cis.Core PSGallery This Windows PowerShell module contains PowerCLI C… 7.0.0.15902843 VMware.DeployAutomation PSGallery This Windows PowerShell module contains PowerCLI A… 7.12.0.15718406 VMware.VimAutomation.HorizonView PSGallery This Windows PowerShell module contains Connect/Di… 12.0.0.15940185 VMware.VimAutomation.Vds PSGallery This Windows PowerShell module contains PowerCLI V… 12.0.0.15947288 VMware.VimAutomation.WorkloadManag… PSGallery PowerShell commands for automation of workloads re… 12.0.0.15947287 VMware.VimAutomation.Vmc PSGallery This Windows PowerShell module contains PowerCLI V… 12.0.0.15939672 VMware.VimAutomation.Security PSGallery This Windows PowerShell module contains PowerCLI s… 12.0.0.15940184 VMware.VimAutomation.vROps PSGallery This Windows PowerShell module contains PowerCLI v… 12.0.0.15939655 VMware.VimAutomation.Core PSGallery This Windows PowerShell module contains Windows Po… 12.0.0.15947286 VMware.PowerCLI PSGallery This Windows PowerShell module contains VMware.Pow… 12.0.0.15939671 VMware.VimAutomation.Nsxt PSGallery This Windows PowerShell module contains PowerCLI N…
7.0.0.15902843 VMware.ImageBuilder
7.0.0…不穏…一応イメージビルドを試してみる。
PS /home/mirie > > Add-EsxSoftwareDepot ./ESXi670-NE1000-32543355-offline_bundle-15486963.zip Add-EsxSoftwareDepot: The 'Add-EsxSoftwareDepot' command was found in the module 'VMware.ImageBuilder', but the module could not be loaded. For more information, run 'Import-Module VMware.ImageBuilder'.
VMware.ImageBuilder が Load できていない…
手動 Import を試す。
PS /home/mirie> Import-Module VMware.ImageBuilder Exception: The VMware.ImageBuilder module is not currently supported on the Core edition of PowerShell.
オワタ…orz
結論
PowerCLI 12 でも VMware.ImageBuilder は PowerShell Core未対応、
Windows 以外動作しないということで…
考えてみればリリースノートにもそれっぽいことは書いてないわけで。
(と未対応で言っても Update の記述あったらちょっと期待しますよねぇ…)
サーバは Linux、クライアントは Mac みたいな環境もかなり増えてきているので、VMware.ImageBuilder も PowerShell Core 対応してくれないとシンドい所が多いのでは…