0

On Debian hosts I run VirtualBox VM mainly to run WinX software. Some of these VM shall join AD and as such need fixed IP and shall be reachable from the LAN, i.e. NAT is no option.

I considered bridged networking to do the trick, but it turned out that the VM uses the IP of the host instead of asking my DHCP server. (Or probably it does but uses the MAC of the host's NIC, instead of the MAC assigned for the machine. Since booting the machine with improper network is painfully slow, I try to keep experiments well targetted.)

What I would like is that the VM appears as it would be plugged into a switch with the host. Is this too exotic, or is there a canonical way to achieve this?

Lars Hanke
  • 281
  • 2
  • 15

1 Answers1

1

VirtualBox bridged networking is what you want.

Not currently running VirtualBox (trying out libvirt) but I have done exactly this in the past with Ubuntu.

It sounds to me like you may have the MAC hard-coded in /etc/network/interfaces. Check to see if there is a line starting with "hwaddress ether".

If that does not get it try to recreate a new VM (using the same vhd) with bridged networking from the start.

Eddie Dunn
  • 463
  • 2
  • 9
  • I actually don't know what happened before, but after switching back to NAT restarting the VM a couple of times and switching to bridged mode again, it worked as I expected. Thanks for assuring me. – Lars Hanke Sep 08 '15 at 23:51