有償ライセンスでは、以下の様に作業すればいいはずだが、無償ライセンスでは動作しない。
PowerCLI vis:¥> Stop-VM -Verbose -Confirm:$false -VM (Get-VM | where PowerState -eq 'PoweredOn')
詳細: 対象 "VM 'centos01'" に対して操作 "Stop-VM" を実行しています。
Stop-VM : 2014/05/21 23:55:14 Stop-VM Current license or ESXi version prohibits execution of the requested operation.
発生場所 行:1 文字:1
+ Stop-VM -Verbose -Confirm:$false -VM (Get-VM | where PowerState -eq 'PoweredOn')
+ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
+ CategoryInfo : NotSpecified: (:) [Stop-VM], RestrictedVersion
+ FullyQualifiedErrorId : Client20_VMServiceImpl_StopVM_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.StopVM
<<略>>
詳細: 2014/05/21 23:55:14 Stop-VM Finished execution
PowerCLI vis:¥>
無償ライセンス利用時のゲスト機の停止は、現状ではGUIを利用する方がよい。
が、強制停止相当で構わなければ、次の様に作業することもできる。
PowerCLI vis:¥> $esxcli.vm.process.list() | Select-Object DisplayName,WorldID | % { $_; $esxcli.vm.process.kill('soft',$_.WorldID) }
DisplayName WorldID
----------- -------
centos01 4039
true
centos02 11830424
true
<<略>>
PowerCLI vis:¥>『その0・概要』
『その1・ダウンロード』
『その2・ESXCLIオブジェクト』
『その3・ゲスト機の停止』
『その4・メンテナンスモードへの移行』
『その5・更新』
『その6・再起動』
『その7・メンテナンスモードの解除』
0 件のコメント:
コメントを投稿