I have a dedicated server, I just ordered a second IP address and don't know the proper way to tie it to a VM that's running on the server. All the documentation and threads that I find are about routing via the same IP but I want to essentially let the guest have it's own reign of the second IP address so it doesn't conflict with anything running on the host machine.
Everything I've tried so far hasn't been working and any help with this would be appreciated.. Thank you.
Oh so i got this slightly wrong. You'll need to have a virtual Ethernet interface for the VM in a mode that lets it talk straight to the network bypassing the host (i forget which it is, bridged maybe?). and then setup the IP on the guest as you would normally.
But what is it supposed to be bridging? I can't have a bridged interface without it actually bridging anything (two other interfaces) or the networking service will fail to start. (I'm probably misunderstanding you)
So do I create an interface with an arbitrary name and then do..say... "bridge_ports eth0 virbr0" in the interfaces config? And then just point VirtualBox to virbr0 as it's interface?
or do I use br0 as the bridge and then do "bridge_ports eth0 (arbitrary interface)" and let the additional interface just happen on it's own?
I'm not really understanding what you mean, as soon as I try to make a virtual interface and bridge two interfaces with it it just prevents the networking service from starting.
If you're using virtualbox, you can set the VM to bridge mode in the config for that VM. You shouldn't need to manually configure Ethernet bridging, the virtualbox stack should handle it.
Okay. With bridge mode, the guest would be presented to the same network as the host machine. If you're looking to get a static IP onto that, you'd need to manually configure that on the guest.
Is this a hosted server, or something you have physical access to?
I tried pointing VirtualBox to eth0 and configuring that within the guest and that hasn't been working but I'll double check everything once everything boots back up.
edit: So I add the additional ip as before to the host machine via eth0:0 and then I point VirtualBox to eth0. And then I manually configure the IP in the guest?
okay, I'll submit a ticket and see if they get back to me.
Actually they have an article in their knowledge base about this but it literally just says "run this command: ip route add [ip address] dev br0". So I'm kind of expecting them to just send me a link to that, but maybe.
Okay so I found a bunch of other problems with the networking and dealt with those before I came back to dealing with the VM. I also updated to VirtualBox 5.1x just in case.
It turns out that I had to request a separate mac address from my host to allow the VM to connect to the network. But now bridging works as expected.