vsish(VMkernel Sys Info Shell)ユーティリティはESXiに含まれており、以下のように情報の取得や変更が可能。
・利用方法
[root@esxi:~] vsish />
vsishと入力するだけで、ユーティリティが起動される
・利用できるコマンド
/> help cd - change working directory ls - list nodes dir - list nodes pwd - print working directory get - perform GET operation cat - synonym for GET set - perform SET operation typeget - get type information typels - list type-level nodes loglevel - set debugging log level exit - quit shell quit - quit shell q - quit shell help - print help />
・設定値の取得方法
/> get /config/Misc/strOpts/HostName Vmkernel Config Option [string] { Default value:localhost valid characters:** Current value:esxi.env.lab hidden config option:1 Description:Host name Host specific config option:0 Option update requires reboot:0 Option update requires maintenance mode:0 } />
設定値一覧:Hidden VSISH Configurations Only - Generated on Mon Aug 23 21:53:13 PDT 2010
・設定変更方法
/> set /config/Misc/strOpts/HostName testHost.env.lab testHost.env.lab /> /> get /config/Misc/strOpts/HostName Vmkernel Config Option [string] { Default value:localhost valid characters:** Current value:testHost.env.lab hidden config option:1 Description:Host name Host specific config option:0 Option update requires reboot:0 Option update requires maintenance mode:0 } />
・ワンライナーでの実行
[root@testHost:/tmp] vsish -e get /config/Misc/strOpts/HostName Vmkernel Config Option [string] { Default value:localhost valid characters:** Current value:testHost.env.lab hidden config option:1 Description:Host name Host specific config option:0 Option update requires reboot:0 Option update requires maintenance mode:0 }
※参考