mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-03-11 16:58:31 +03:00
There's valid cases where a VM can be defined with a conflicting MAC address. Prior to ebd6091cc8e4 and related refactorings we were more lax here if the conflicting VM wasn't running, but now we are blocking some valid usage. Hoist the validation check up to cli.py and add --check mac_in_use=off to skip the validation. Advertise it like we do for other checks, so now a collision error will look something like: The MAC address '22:11:11:11:11:11' is in use by another virtual machine. (Use --check mac_in_use=off or --check all=off to override) Reported-by: Pino Toscano <ptoscano@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com>