Skip to content

Randomize mac address when cloning a VM #7035

Description

@mvysny

Describe the issue
I have one base Linux VM with basic things set up; I tend to clone it and rename it whenever I need to spin up an experimental VM, or a VM per project.

Recently I noticed that when I have a VM running and I start a new one, all TCP/IP connections on the first VM will stop working - they won't close but no data will be transmitted, and will appear frozen.

Just today I realized that all VMs are using shared networking and all have same mac address. When I changed the mac address to a random one, the problem disappeared.

I think the best solution would be: when a VM is cloned and it uses Shared Networking, change the mac address to a random one.

To reproduce:

  1. Create a Linux VM, with Shared networking
  2. Clone it two times, into VM1 and VM2. Observe that all three VMs have the same mac address.
  3. Start VM1 and ssh to some remote server
  4. Start VM2
  5. Observe that the ssh connection in VM1 is dead.

Configuration

  • UTM Version: 4.6.4 (107) from App Store
  • macOS Version: 15.3.1 (24D70)
  • Mac Chip (Intel, M1, ...): M3 Max

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions