Headless remote webserver - Bridged networking prob.
Posted: 12. Jun 2009, 11:49
I have a headless remote CentOS 5.2 (AMD64) webserver on which I have installed ./VirtualBox-2.2.4-47978-Linux_amd64.run with the aim of having a second separate (virtual) webserver on its own IP address. The server is remote so I'm doing everything from the command line.
I have created a VM running Debian 5.0.1 (32 bit). Using default NAT networking the Debian VM can communicate with the world.
On the host OS I have two IP addresses, let's say 12.34.56.78 and 12.34.56.79 as eth0 and eth0:1. I want to bind the second IP address to the VM.
In order to run Apache on the VM I believe I need to change to bridged networking. If I try this:
VBoxManage modifyvm "Debian501" --nic1 bridged --bridgeadapter1 eth0:1
then I get an error message when I try to start the VM: "Failed to open/create the
internal network 'HostInterfaceNetworking-eth0:1' (VERR_INTNET_FLT_IF_NOT_FOUND)."
With this:
VBoxManage modifyvm "Debian501" --nic1 bridged --bridgeadapter1 eth0
the VM boots, but there is no sign of any networking on the VM. "ifconfig eth0" on the VM doesn't have an IP address.
On the guest, /etc/network/interfaces contains "iface eth0 inet dhcp". I've also tried a static IP using the values obtained when I was running it as a NATed machine. In any case I don't see how this would work - I want to bind the host's eth0:1 to my VM, not the main interface. But all the guides say "select the interface you want and it just works".
"lsmod" on the host shows "vboxnetflt" as installed.
I have read the manual, the FAQ, and many many pages and I can't see how to get this working. Most posts refer to old versions of VB where you had to configure TAPs and so on, and more recent posts tend to refer to the GUI, not the command line.
I have created a VM running Debian 5.0.1 (32 bit). Using default NAT networking the Debian VM can communicate with the world.
On the host OS I have two IP addresses, let's say 12.34.56.78 and 12.34.56.79 as eth0 and eth0:1. I want to bind the second IP address to the VM.
In order to run Apache on the VM I believe I need to change to bridged networking. If I try this:
VBoxManage modifyvm "Debian501" --nic1 bridged --bridgeadapter1 eth0:1
then I get an error message when I try to start the VM: "Failed to open/create the
internal network 'HostInterfaceNetworking-eth0:1' (VERR_INTNET_FLT_IF_NOT_FOUND)."
With this:
VBoxManage modifyvm "Debian501" --nic1 bridged --bridgeadapter1 eth0
the VM boots, but there is no sign of any networking on the VM. "ifconfig eth0" on the VM doesn't have an IP address.
On the guest, /etc/network/interfaces contains "iface eth0 inet dhcp". I've also tried a static IP using the values obtained when I was running it as a NATed machine. In any case I don't see how this would work - I want to bind the host's eth0:1 to my VM, not the main interface. But all the guides say "select the interface you want and it just works".
"lsmod" on the host shows "vboxnetflt" as installed.
I have read the manual, the FAQ, and many many pages and I can't see how to get this working. Most posts refer to old versions of VB where you had to configure TAPs and so on, and more recent posts tend to refer to the GUI, not the command line.