ESXi 7.0 esxcliコマンドでhostnameを変更する方法

環境
vmware ESXi 7.0 Update 3

操作方法
1.バージョン確認

[root@localhost:~] vmware -vl
VMware ESXi 7.0.3 build-19193900
VMware ESXi 7.0 Update 3

2.設定変更前の確認

[root@localhost:~] hostname -s
localhost
[root@localhost:~]
[root@localhost:~] hostname -f
localhost.localdomain
[root@localhost:~] hostname -i
127.0.0.1

hosts一覧確認

[root@localhost:~] cat /etc/hosts
# Do not modify this file directly, please use esxcli.
127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost

3.ホスト名を変更する

[root@localhost:~] esxcli system hostname set --host=arkgame
[root@arkgame:~] esxcli system hostname set --fqdn=ark.local

4.ホスト名変更後確認

[root@ark:~] cat /etc/hosts
# Do not modify this file directly, please use esxcli.
127.0.0.1       localhost.localdomain localhost
::1             localhost.localdomain localhost
192.168.229.140 ark.local ark
[root@ark:~] hostname -i
192.168.229.140
[root@ark:~] hostname -f
ark.local

 

Vmware

Posted by arkgame