My host machine is a dedicated windows server. I installed Oracle VirtualBox with VM running Ubuntu 24.04.1 LTS.
I have internet access using NAT. But the problem is I need the Ubuntu VM to have a static IP (can be the same as the Windows Server).
My end goal is to turn the VM into a self hosted Ubuntu GitHub action runner with a static IP to get through a firewall.
I have spent about 6+ hours trying to get the network connection working with no luck. I switched the connection to bridged, but no matter how I configure it I can't access the internet on the VM.
Not sure if this is relevant, but my host machine's ethernet adapter has 'DHCP Enabled: false'. From my understanding, if I am using a static IP I will not be using DHCP. Any help is appreciated.
Firstly treat your VM and your computer as separate entities. On the network you cannot have the same IP or it'll break everything.
Secondly, you have a GUI. Use Network Manager to edit the LAN settings to set a static IP in the IPv4 tab. Make sure that tab is a different IP address than your host computer, but in the same subnet.
Thirdly, make sure your VM is in Bridged Adapter mode so it shows independent on your home network.
This will permit your settings to properly work.