Unable to assign specefic mac address to a windows container

Hi all,

I’m having trouble understanding why certain MAC addresses can’t be assigned to containers. AFAIK 4b:b0:5f:a1:23:c2 is a valid mac address. However, when I try assign it to either windows or Linux containers I get errors which I’ve never had a problem with before.

I was hoping someone could shed some light on why this might be happening?

Thanks in adv.

Nick

See below:

docker run:

docker run --mac-address="4b:b0:5f:a1:23:c2" library/hello-world

outcome on windows containers:

22292414fadd4a79c3d1f7ba8433c731740d96b5dd06deacd998b79eca968f18

docker: Error response from daemon: container 22292414fadd4a79c3d1f7ba8433c731740d96b5dd06deacd998b79eca968f18 encountered an error during Start: failure in a Windows system call: The parameter is incorrect. (0x57).

oucome on linux containers:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"process_linux.go:385: running prestart hook 0 caused \\\"error running hook: exit status 1, stdout: , stderr: time=\\\\\\\"2019-01-03T11:22:21Z\\\\\\\" level=fatal msg=\\\\\\\"failed to add interface veth65a0f39 to sandbox: error setting interface \\\\\\\\\\\\\\\"veth65a0f39\\\\\\\\\\\\\\\" MAC to \\\\\\\\\\\\\\\"4b:b0:5f:a1:23:c2\\\\\\\\\\\\\\\": cannot assign requested address\\\\\\\"\\\\n\\\"\"": unknown.

“4b” part does not work

docker run --mac-address=92:b0:5f:a1:23:c2 library/hello-world

Hi does anyone know how to specify the Mac address while you are installing? What do I need to add to my script?

Thanks so much for you help!

docker run --restart always -d \
--name=CrashplanPro \
-e USER_ID=0 \
-e GROUP_ID=0 \
-p 5800:5800 \
-p 5900:5900 \
-e TZ=America/New_York \
-e CRASHPLAN_SRV_MAX_MEM=5120m \
-v /share/CACHEDEV1_DATA/Virtualize/Containers/appdata/crashplan-pro/config:/config:rw \
-v /share/CACHEDEV1_DATA:/storage:rw \
-v /share/CE_CACHEDEV5_DATA/Boy-09/CP_Archive.01.2014-11.2021:/storage/CP_Archive/01.2014-11.2021:rw \
-v /share/CE_CACHEDEV5_DATA/Boy-09/CP_Archive.01.2014-10.2021:/storage/CP_Archive/01.2014-10.2021:rw \
-v /share/CE_CACHEDEV5_DATA/Boy-09/CP_Archive.12.2021:/storage/CP_Archive/12.2021:rw \
jlesage/crashplan-pro