In this case I'd recommend you setup a DC with a DNS server to have a "real life" environment. Take a look at e.g. Building the Ultimate vSphere Lab for a great example.
You either need to use a DNS server for name resolution or add the hosts as well as vCenter Server to the hosts file. On the ESXi hosts this is /etc/hosts, on vCenter Server it's C:\Windows\system32\drivers\etc\hosts.
Sample:
192.168.1.10 vCenter vCenter.yourdomain.local
192.168.1.11 esx1 esx1.yourdomain.local
192.168.1.12 esx2 esx2.yourdomain.local
André