You are not logged in.

#1 2014-12-17 17:12:36

psyc
Member
Registered: 2014-12-17
Posts: 3

Cant connect to VM's

Im having a problem connecting to my VM's.

I have 2 vm's running and can ping the one from the other but i cant ping anyone of them from the host.
Any suggestions?

Offline

#2 2014-12-17 17:22:35

mrTwistedTruth
Member
Registered: 2012-02-26
Posts: 10

Re: Cant connect to VM's

You may need to set up bridged networking, or perhapse host only networking. I'm not entirely sure which one so try both.

Offline

#3 2014-12-17 17:27:05

psyc
Member
Registered: 2014-12-17
Posts: 3

Re: Cant connect to VM's

mrTwistedTruth wrote:

You may need to set up bridged networking, or perhapse host only networking. I'm not entirely sure which one so try both.

The networking on the vm's are NAT They are communicating just fine to each other and to the host. The problem is the host cnt communicate with them.

Using vagrant ssh I can access the vm but just trying to ping the vm fails the whole time.

Last edited by psyc (2014-12-17 17:28:32)

Offline

#4 2014-12-17 17:35:42

mrTwistedTruth
Member
Registered: 2012-02-26
Posts: 10

Re: Cant connect to VM's

You need to change your networking settings by the sound of it but I wouldn't know without more details. Perhapse it's just icmp packets that are blocked. This is a quote from an ebook I have.

Network Address Translation (NAT) is the simplest way of accessing an external network from
a virtual machine. Usually, it does not require any configuration on the host network and guest
system. For this reason, it is the default networking mode in VirtualBox.
A virtual machine with NAT enabled acts much like a real computer that connects to the
Internet through a router. The “router”, in this case, is the VirtualBox networking engine, which
maps traffic from and to the virtual machine transparently. In VirtualBox this router is placed
between each virtual machine and the host. This separation maximizes security since by default
virtual machines cannot talk to each other.
The disadvantage of NAT mode is that, much like a private network behind a router, the virtual
machine is invisible and unreachable from the outside internet; you cannot run a server this way
unless you set up port forwarding (described below).
The network frames sent out by the guest operating system are received by VirtualBox’s NAT
engine, which extracts the TCP/IP data and resends it using the host operating system. To an
application on the host, or to another computer on the same network as the host, it looks like
the data was sent by the VirtualBox application on the host, using an IP address belonging to the
host. VirtualBox listens for replies to the packages sent, and repacks and resends them to the
guest machine on its private network.
The virtual machine receives its network address and configuration on the private network
from a DHCP server integrated into VirtualBox. The IP address thus assigned to the virtual
machine is usually on a completely different network than the host. As more than one card of
a virtual machine can be set up to use NAT, the first card is connected to the private network
10.0.2.0, the second card to the network 10.0.3.0 and so on.

Last edited by mrTwistedTruth (2014-12-17 17:36:59)

Offline

Board footer

Powered by FluxBB