分页: 1 / 1

VMware ESX/ESXi主机重命名

发表于 : 2012年 8月 20日 15:20 星期一
MUDBOY
如果只是用hostname命令更改的话,不会保存,重启后会变回原来的hostname
[root@server root]# hostname newname

http://kb.vmware.com/kb/1010821
To rename a VMware ESX host:

If the ESX host is part of a Cluster, remove it from the cluster.
If the ESX host is managed by VirtualCenter/vCenter, disconnect and remove the ESX host from the vCenter.
Make the modifications in your DNS environment to reflect the correct name and IP association for the new name.
Log in as root to the console of ESX host.
Using a text editor, change the name and domain name, if applicable, of the host in these files:

/etc/hosts
ChangeESXhostname_hosts.jpg
ChangeESXhostname_hosts_2.jpg
/etc/sysconfig/network
ChangeESXhostname_vi_config.jpg
ChangeESXhostname_network.jpg
Execute this command where hostname is the new FQDN hostname for the ESX host:
ChangeESXhostname_command.jpg
esxcfg-advcfg -s hostname /Misc/HostName
Reboot the ESX host.
Join the ESX host to VirtualCenter / vCenter and clusters.

To rename a VMware ESXi host:

If the ESXi host is part of a Cluster, remove it from the cluster by Entering Maintenance mode first.
If the ESXi host is managed by VirtualCenter/vCenter Server, disconnect and remove the ESXi host from the cluster.
Connect to the host directly with a vSphere Client.
Click on the ESXi host.
Click on the Configuration tab.
Click on DNS and Routing.
Click on Properties.
Edit the Name: field in the DNS Configuration tab. Change anything else that is necessary in your environment.
Click OK.
Join the ESX host to VirtualCenter/vCenter and clusters.
另有一个KB关于IP地址和网关的
http://kb.vmware.com/kb/4309499