There are 2 VMs running on VMWare on a remote server. For instance: devops-01 and devops-02. Both of them have SSH access enabled.
To access to the first one I do: ssh dev@devops-01. For the other one: ssh dev@192.168.80.y (y sometimes changes).

Normally I only used devops-01 and rarely the other one. Today, it all changed. Ideally I would like to access both VMs like this: ssh dev@devops-<ID>. But, I'm sure that involves calling the server guy and he's on vacations. So, I thought in "switching" my VMs settings.

I copied all the settings from System Preferes > Network > Ethernet from the devops-01 and pasted them to the devops-02 corresponding settings. (IP, Subnet Mask, Router, DNS Server, Search Domains are the same).
I also went to System Preferences > Sharing and edited the computer name on devops-02. (So now, it says devops-01).
Then, I stoped the old devops-01 VM. And now, I have the old devops-02 VM running, supplanting devops-01. BUT ping devops-01says that there is no route to it. Of course it works fine using the ip. But, that's not my intention.

What am I doing wrong?

  • One way this can happen is that the VM got a different IP-address (from DHCP?) than is stated in DNS. If you do a nslookup devops-01. Do you get the same IP as the IP for the VM? – Joachim Bratteli Nov 8 '15 at 20:28
  • @JoachimBratteli, nope. nslookup devops-01 ;; Got SERVFAIL reply from, trying next server Server: Address: ** server can't find devops-01: SERVFAIL – subzero Nov 9 '15 at 19:37
  • Seems like the IP of devops-01 is not resolved by your DNS-server. Either your IP configuration is pointing at the wrong DNS-server or you need to fix the setup of your DNS-server. – Joachim Bratteli Nov 10 '15 at 12:33

Correct me if I'm wrong here, but you'd like a hostname to direct you to a specific IP address of your choice. If so, edit the hosts file located in /etc/hosts by adding a line like this below the localhost entry: devops-01

Again, correct me if I'm misunderstanding you.

  • Yes. I want a hostname to direct to a specific IP. But, doing what you suggest only works in my current computer. If I go to other computer, I'll need to do it again. - Before messing up with my changes, I was able to access it without modifying /etc/hosts. – subzero Nov 7 '15 at 3:59
  • But you said it only worked for one of them (devops-1), or did you mean both? – Jack of all Spades Nov 7 '15 at 4:02
  • Yes. I was able to access devops-01 from all the computers in my network. But that was not the case for devops-02. The latter one was a test machine, but now... it should replace the first one. – subzero Nov 7 '15 at 4:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .