I have following setup:
From my MacBook i'm able to ping my windows desktop's IP, but not the IP of the VirtualBox VM. On the Oracle VM's settings I have a bridget adapter configured.
Is there a way to connect from my MacBook to the Oracle VM hosted on my Windows desktop in the same network?
Thanks in advance!
It depends on what type of network adapter you defined to the VM. In order to access from other machines on your LAN, you will need a BRIDGED adapter. Further, you will need to configure it (in the guest OS) with a manually assigned IP address in the same subnet as your other machines. My guess is you just took defaults and have only a NAT adapter.
I've built scores of VM's under VBox, and always create two adapters. The first is a NAT adapter, which allows my vm to access the internet - critical for downloading and installing packages with 'yum'. The second adapter is either HOSTONLY or BRIDGED. I use HOSTONLY if I want the VM to be totally isolated from the LAN and only accessible by the host or other vm's on the host. I used BRIDGED if I want to access the vm from other machines on the LAN. Either way, the BRIDGED or HOSTONLY need to be configured with a manually assigned ipv4 address in the same subnet as the host os.
I always create the NAT as the first adapter, and the BRIDGED or HOSTONLY as the second. On the os, the first (NAT) shows up as 'enps03' and the second as 'enps08'. I then configure enps08 with the following:
First, run the command below to set up the IP address. (substitute your chosen IP, but keep the '/24')
$ nmcli con mod enp0s8 ipv4.addresses 192.168.0.200/24
Next, configure the default gateway as shown - again, the first three octets of your subnet.
$ nmcli con mod enp0s8 ipv4.gateway 192.168.0.1
Next , set the addressing to static.
$ nmcli con mod enp0s8 ipv4.method manual
Set to start on boot
$ nmcli con mod enp0s8 connection.autoconnect yes
To save the changes, run the command
$ nmcli con up enp0s8
Reboot and check with ‘ifconfig’.