| _ -> ()) ls;
begin match !mac with
- | "" -> (* unspecified then just generate a random one *)
+ | "random" ->
mac := generate_random_mac ();
- | "vm" -> (* we generate one based on devid/model and vm's uuid *)
- mac := generate_vm_mac !id !model vm_uuid;
- | _ -> (* otherwise verify and use a random one if unvalid *)
+ | _ -> (* otherwise verify and use a vm-specific one if invalid *)
if not (is_valid_mac !mac) then
- mac := generate_random_mac ();
+ mac := generate_vm_mac !id !model vm_uuid;
end;
{