Project

General

Profile

Feature #1501

ability to set MAC address of guests

Added by Adrian Bridgett over 6 years ago. Updated 3 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Compute resources
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

I'd love to be able to set the MAC address of VM guests (we control the DHCP server manually (if I get lots of spare time maybe I'll write a new dhcp smart proxy module)).

However the GUI hides the mac address in the "New -> Host -> Network" page, sadly it's not as simple as just commenting out "unless @hypervisor" from ./app/views/hosts/_unattended.html.erb.

./lib/foreman/controller/host_details.rb seems to be responsible somehow for displaying/hiding this item but my Rails development knowledge is non-existant.

Currently we have to create the VM (which fails to boot), then edit the libvirt config, stop the build, edit mac address, start the build.

It'd be great if you could optionally specify the MAC address to use (and to generate one if it's blank as it currently does).

Foreman: v0.4.1


Related issues

Has duplicate Foreman - Feature #13089: Support specifying interface MAC address during VM creationDuplicate2016-01-08

History

#1 Updated by Ohad Levy over 6 years ago

I'm not sure i follow of why :)

1. why not using the smart proxy? :)
2. the mac needs to be within a certain range, not ideal for foreman to validate it.
3. why not use the mac address which is generated via libvirt?

#2 Updated by Adrian Bridgett over 6 years ago

All fair points :-)

1) we actually have a non-trivial setup - multiple subnets, I'm not sure the smart-proxy is sufficiently smart. There are also cases where you might not have direct access to DHCP daemon.
2) I'm not sure I follow - surely it can still perform some validation and reject it (and hey, if it lets a bad one through that's my fault anyway for putting a broken value in)
3) see 1) :-)

I certainly agree that it's nice not to have to type a MAC address in, I suppose what I'm after is a small change to allow people to set it, a blank field still being autogenerated as now.

#3 Updated by Stephen Benjamin about 4 years ago

  • Description updated (diff)

If a user is managing DHCP externally to Foreman, on an IPAM system that sets `next-server` based on matching a MAC range, it would be useful to be able to specify it in the UI. Perhaps under some kind of 'Advanced' section.

#4 Updated by Stephen Benjamin about 4 years ago

  • Bugzilla link set to 1132364

#5 Updated by Ohad Levy over 2 years ago

  • Related to Feature #13089: Support specifying interface MAC address during VM creation added

#6 Updated by Dominic Cleal over 2 years ago

  • Category set to Compute resources

#7 Updated by Dominic Cleal over 2 years ago

  • Related to deleted (Feature #13089: Support specifying interface MAC address during VM creation)

#8 Updated by Dominic Cleal over 2 years ago

  • Has duplicate Feature #13089: Support specifying interface MAC address during VM creation added

#9 Updated by Oliver Freyermuth 3 months ago

  • Triaged set to No

Just for the records, we've also run into this.
Our IPAM is also external and we can not connect it to Foreman, so right now, we have to use a manual workflow :-(.

Also available in: Atom PDF