
Hello, today I had a problem about conflicting MAC. The source of problem was a VM transferred from an engine environment

Sorry, incomplete message sent... today I had a problem about conflicting MAC between two different VMs. The source of the problem was a VM created on env1 managed by engine1 and then transferred some weeks ago to env2 managed by engine2. The two envs share some networks and during migration I didn't change the mac of the vnic after completing it. So the mac was left free from env1 and used in env2. The default mac pools are different ones between env1 and env2. So today in env1 I created a new vm on the same vlan as the previous one and oVirt assigned the previous one mac, now freed on it, originating big problems... I found an article (https://access.redhat.com/solutions/695383) to search in the engine web admin by mac, but it was for version 3.2 and it seems it doesn't work in 4.4.10. In VMs page I search filling the query with mac = my_mac or Vms: mac = my_mac but it keeps thinking with 3 squares blinking in the page. I have not so many VMs to justify time elapsing... (less then 50) Can I search for mac? How? Thanks, Gianluca On Fri, Mar 25, 2022 at 3:27 PM Gianluca Cecchi <gianluca.cecchi@gmail.com> wrote:
Hello, today I had a problem about conflicting MAC. The source of problem was a VM transferred from an engine environment

Hi, We have a Python-SDK script to find MAC dupes in our infrastructure. I'm attaching the script, you just need to set the URI, USERNAME, PASSWORD, CERTPATH and MACPOOLS variables. Hope this helps. Regards, Nicolás El 2022-03-25 14:35, Gianluca Cecchi escribió:
Sorry, incomplete message sent...
today I had a problem about conflicting MAC between two different VMs. The source of the problem was a VM created on env1 managed by engine1 and then transferred some weeks ago to env2 managed by engine2. The two envs share some networks and during migration I didn't change the mac of the vnic after completing it. So the mac was left free from env1 and used in env2.
The default mac pools are different ones between env1 and env2. So today in env1 I created a new vm on the same vlan as the previous one and oVirt assigned the previous one mac, now freed on it, originating big problems... I found an article (https://access.redhat.com/solutions/695383) to search in the engine web admin by mac, but it was for version 3.2 and it seems it doesn't work in 4.4.10. In VMs page I search filling the query with
mac = my_mac or
Vms: mac = my_mac
but it keeps thinking with 3 squares blinking in the page. I have not so many VMs to justify time elapsing... (less then 50)
Can I search for mac? How?
Thanks,
Gianluca
On Fri, Mar 25, 2022 at 3:27 PM Gianluca Cecchi <gianluca.cecchi@gmail.com> wrote:
Hello, today I had a problem about conflicting MAC. The source of problem was a VM transferred from an engine environment
Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/2UN4APDMFAJEWX...

On Fri, Mar 25, 2022 at 3:54 PM <nicolas@devels.es> wrote:
Hi,
We have a Python-SDK script to find MAC dupes in our infrastructure.
Thanks for it, Nicolas. But does it work if you have separate engines and in a scenario like mine? Even if you have a mac pool, you could import a VM and have it retain its original mac, that could be out of the mac pools normally admitted in that environment. It seems that your script has the variable below to adapt: # Replace this with your active MAC address pools, WITHOUT the last octet MACPOOLS = ['00:11:22:33:44', '00:55:66:77:88']
I will dig into your script, anyway. In the meantime, querying the engine db I used something like this to find the last two characters when the first ones are of type aa:bb:cc:dd:ee (or in general to match what I need): select substring(mac_addr from 16 for 2) as value from vm_interface where mac_addr like 'aa:bb:cc:dd:ee%' order by value; and then if I find anything in common in env1 and env2 (such as ff for last two characters) and want to see which VMs are involved I can use select vm_name from vm_interface,vm_static where vm_interface.vm_guid=vm_static.vm_guid and mac_addr='aa:bb:cc:dd:ee:ff' Gianluca
participants (2)
-
Gianluca Cecchi
-
nicolas@devels.es