UTM icon indicating copy to clipboard operation
UTM copied to clipboard

Bridge network guest receiving same ip address from external dhcp server

Open mvgijssel opened this issue 11 months ago • 7 comments

BEFORE SUBMITTING YOUR ISSUE, PLEASE LOOK AT THE PINNED ISSUES AND USE THE SEARCH FUNCTION TO MAKE SURE IT IS NOT ALREADY REPORTED. ALWAYS COMMENT ON AN EXISTING ISSUE INSTEAD OF MAKING A NEW ONE.

Describe the issue
When I configure

  • Two guests with bridge networking
  • Both guests have cloud-init installed and dhcp on the first interface

When booting both machines, both receive the same IP address from the dhcp server! 😅 The MAC address of the network cards is different inside of UTM.

Configuration

  • UTM Version: 4.6.4
  • macOS Version: 15.2
  • Mac Chip (Intel, M1, ...): M2 Pro

mvgijssel avatar Jan 20 '25 14:01 mvgijssel

From the Omada logs

Image

Yeah pretty strange 😆

mvgijssel avatar Jan 20 '25 14:01 mvgijssel

Could be related to me using the WiFi adapter instead of the ethernet adapter as mentioned here https://superuser.com/questions/1269435/vm-guest-getting-assigned-same-ip-as-host-when-using-bridge-adapter.

mvgijssel avatar Jan 20 '25 15:01 mvgijssel

Changing from WiFi to the host adapter for the bridge interface (and rotating the MAC addresses) didn't help unfortunately. Both still get the same IP 🤔

mvgijssel avatar Jan 20 '25 15:01 mvgijssel

I'm also running into this trying to run two Ubuntu VMs on macOS. Each has a unique MAC address and is configured to bridge from the Mac's Ethernet card.

cdzombak avatar Jul 05 '25 18:07 cdzombak

Same issue on Ubuntu 24.04 guests.

berkant avatar Nov 24 '25 16:11 berkant

Well, it turns out to be caused by conflicting /etc/machine-id in case of cloned VMs. Edit the last digit of your clone's machine-id, and DHCP works.

berkant avatar Nov 24 '25 17:11 berkant

When creating bento vagrant boxes we have to cleanup the machine-id on ubuntu before ending the image creation otherwise cloning the image to multiple vm's will create dhcp IP issues. https://github.com/chef/bento/blob/main/packer_templates/scripts/ubuntu/cleanup_ubuntu.sh#L92

Stromweld avatar Nov 24 '25 17:11 Stromweld