I have a virtualbox setup with both the host and VM OS as Windows 7. The host and the VM are both connected to the network but have different network IPs.
ipconfig on host (including only those adapters that show as connected):
Wireless LAN adapter Wireless Network Connection:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::5019:de7c:51c0:f4f3%11
IPv4 Address. . . . . . . . . . . : 192.168.43.121
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.43.1
Ethernet adapter VirtualBox Host-Only Network:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::cab:cd07:1f1b:79c3%17
IPv4 Address. . . . . . . . . . . : 192.168.56.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
On the VM:
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::b941:4a97:86ff:b28c%11
IPv4 Address. . . . . . . . . . . : 10.0.2.15
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.0.2.2
I would have expected a VirtualBox NAT adapter on the host but there isn't one and that the network on both to be the same but they are completely different. How can I connect to the Virtual Machine from the host?
Edit: It seems there was a gap in my understanding, NAT adapter cannot be accessed from the host to guest, it is internal to virtualbox(however I am not sure of this). I added a host only adapter and now I can access the guest from the host but not from the guest to host. How do I make that work?