Skip to content

[Request]: Add --mac-address flag to set custom MAC addresses for containers #752

@DSS3113

Description

@DSS3113

Feature or enhancement request details

Problem

Currently, there is no way to specify a custom MAC address for a container's network interface and the MAC address is auto-generated by the system.

Proposed Solution

Add a --mac-address flag to container run and container create commands:

container run --mac-address AA:BB:CC:DD:EE:FF ubuntu
container create --mac-address AA:BB:CC:DD:EE:FF --name mycontainer ubuntu

The flag would:

  • Accept standard MAC address format: XX:XX:XX:XX:XX:XX (with : or - separators)
  • Validate the MAC address format before creating the container
  • Apply to the first network interface
  • Be optional (current auto-generation behavior preserved when not specified)

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    networkIssues and features associated with networking and DNS.nextItems in scope for the next few milestones

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions