5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ESXiのhostnameを変更する方法

Posted at

#1. はじめに
BM for VPCのESXiは、ここにも記載した通り、プロビジョニング時にはhostnameが設定されないため、localhostのままになっている。
ここでは、VMware社のKB1010821に従ってhostnameを変更してみる。

#2. 変更方法

バージョン確認
[root@localhost:~] vmware -vl
VMware ESXi 7.0.2 build-17867351
VMware ESXi 7.0 Update 2
設定変更前
[root@localhost:~] hostname -s
localhost

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

[root@localhost:~] hostname -i
127.0.0.1

[root@esx-001:~] cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1	localhost.localdomain localhost
::1		localhost.localdomain localhost
設定変更後
[root@localhost:~] esxcli system hostname set --host=esx-001
[root@esx-001:~] esxcli system hostname set --fqdn=esx-001.vmware.ibmcloud.local
設定確認
[root@esx-001:~] hostname -s
esx-001

[root@esx-001:~] hostname -f
esx-001.vmware.ibmcloud.local

[root@esx-001:~] hostname -i
10.18.0.11

[root@esx-001:~] cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1	localhost.localdomain localhost
::1		localhost.localdomain localhost
10.18.0.11	esx-001.vmware.ibmcloud.local esx-001
5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?