Can not get mac address of a provision vm

can not get mac address of a provision vm macaddr = prov.get_option(:mac_address) is not working get null

Try prov.vm.mac_addresses.first

i am using

when ‘miq_provision’
prov = $evm.root[‘miq_provision’]
log(:info, “Provision: #{prov.id} Request: #{prov.miq_provision_request.id} Type: #{prov.type}”)
macaddr = prov.get_option(:mac_address)
vmname = prov.get_option(:vm_target_name)
dns_domain = nil || $evm.object[‘dns_domain’]
view = nil || $evm.object[‘view’]

vmname works but macaddr is not

It is not a provision option, but a vm attribute. Did you try the code I suggested?

yes it did not work !