VMware Cloud Community
AustinPowers
Enthusiast
Enthusiast
Jump to solution

How to Edit Hosts File?

If it has been previously asked, thanks to whoever links me to it. Otherwise, thanks to anyone who can answer.

If there will not be a DNS server available to my ESXi 4.1 hosts (by design), how do I add entries to the hosts file on the VMware servers?  I need them to navigate to and from my Backup server (separate physical box) so Backup Exec can use the SAN to move packets.

Thanks

0 Kudos
1 Solution

Accepted Solutions
Dave_Mishchenko
Immortal
Immortal
Jump to solution

There's a few ways to do it.  If you're using the vCLI the hosts file is exposed for editing, so you can download it to your management PC, update the file, and then upload it to your host - http://www.vm-help.com/esx/esx3i/esx_3i_rcli/vifs.php.  You could also enable Tech Support Mode (either local or for SSH access) and edit the file /etc/hosts directly.

View solution in original post

0 Kudos
3 Replies
Dave_Mishchenko
Immortal
Immortal
Jump to solution

There's a few ways to do it.  If you're using the vCLI the hosts file is exposed for editing, so you can download it to your management PC, update the file, and then upload it to your host - http://www.vm-help.com/esx/esx3i/esx_3i_rcli/vifs.php.  You could also enable Tech Support Mode (either local or for SSH access) and edit the file /etc/hosts directly.

0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

you can edit the /etc/hosts file on all your ESXi Hosts.  Each hosts file should contain the IP address FQDN and Shortname of each ESXi Host.  You should also add an entry for your vCenter Host as well.

0 Kudos
bulletprooffool
Champion
Champion
Jump to solution

As Troy says, /etc/hosts needs editing.

You can use any number of methods for the actual edit

1) You can open the console direct on the host and use vi (cheat sheet here: http://www.lagmonster.org/docs/vi.html)

2) You can SSH the host and again use VI or similar (i use Putty for SSH connections)

3) You could use a tool like WinSCP - that will allow you to opena file in your favourite text editor, then save it (http://winscp.net/eng/download.php)

good luck

One day I will virtualise myself . . .