Rhev vlan information for vm



I need get information about name of vlan by vm. I Use next code:

service = $evm.root[‘service’]
service.vms.each do |vm|
vm.hardware.nics.each do |nic|
next if nic.device_type != “ethernet”
$evm.log(‘info’, “#{nic.lan.inspect}”)


So if I look vm on Vmware it work good, but if I check vm on RHEV (version 3.6) I have nil.

In database I found next:
Table guest_devices column lan_id don’t have information for rhev, but exist for vmware.
Could somebody help me?


Did you ever find an answer to this? I just ran into the same issue.

For a RHV VM: vm.hardware.nics[0].lan returns nil but for VMware it returns the LAN.