Score:0

Changing the IP address in a VM and pinging it from another VM?

in flag

I have 2 machines in a VM, I want to change the IP address in one machine and ping it with the other. I changed the IP address through wired connections in settings for both the machine (10.0.2.20 and 10.0.2.21).
When I try to ping it gives me this error

ping 10.0.2.20
PING 10.0.2.20 (10.0.2.20) 56(84) bytes of data.
From 10.0.2.15 icmp_seq=1 Destination Host Unreachable
From 10.0.2.15 icmp_seq=2 Destination Host Unreachable
From 10.0.2.15 icmp_seq=3 Destination Host Unreachable
From 10.0.2.15 icmp_seq=4 Destination Host Unreachable
From 10.0.2.15 icmp_seq=5 Destination Host Unreachable
From 10.0.2.15 icmp_seq=6 Destination Host Unreachable
From 10.0.2.15 icmp_seq=7 Destination Host Unreachable
From 10.0.2.15 icmp_seq=8 Destination Host Unreachable
From 10.0.2.15 icmp_seq=9 Destination Host Unreachable

What did I do wrong? Do I have to change the IP address in netplan folder?
I know giving random IP will disconnect you from the internet but both are in the same network right?

in flag
I tried several times and somehow it worked without any changes with Bridge network as network adapter. But my friend now is facing the same problem and I tried what you mentioned and it didn't work. Could there be something else that would work?
Score:0
uz flag

There multiple options to configure a vm's network.
E.g.

  • "host-only"
  • NAT
  • bridged

I guess most of virtualisation softwares use these three options or maybe have some more. Maybe you're using host-only or similar options. Please have a look into your vm settings (both vms) and make shure that you're using for example NAT.
Generally, and I've seen that you had done so, you can compare your host's IP subnet with your vm's IP range. A good sign is when they differ only in the last number, e.g. 10.10.10.22 and 10.10.10.23.
If this is the case, try to ping both vms from yout host system.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.