theforeman / foreman_fog_proxmox

Foreman plugin to add Proxmox compute resource based on fog-proxmox gem
GNU General Public License v3.0
105 stars 30 forks source link

Associate VMs fails #209

Open l00d3r opened 3 years ago

l00d3r commented 3 years ago

I think it's because of case sensitivity on VM association as described here

Changing app/models/foreman_fog_proxmox/proxmox.rb

    def associated_host(vm)
      associate_by('mac', vm.mac)
    end

to

    def associated_host(vm)
      associate_by('mac', vm.interfaces.map(&:mac).map { |mac| Net::Validations.normalize_mac(mac) })
    end

allowed host association

aristella commented 2 years ago

With proxmox plugin 0.14 and foreman 3.1 the above patch didn't work (I still cannot associate proxmox VMs due to mac case sensitive check)

Manisha15 commented 9 months ago

Hey, can you please test it again with version 0.14.3 ? @aristella

phantomdez commented 2 months ago

I am unable to associate VMs and I am using version 0.15.0. I get the following error: Oops, we're sorry but something went wrong undefined method match? for nil:NilClass

Additionally I have renamed all my VM's in proxmox in lowercase to avoid this issue and it still doesn't work so I am not sure if this issue is the same or something different.

I can provide more information required.