Import as managed VM from promox fails

Problem: Import of managed vm from promox fails with error undefined method `’ for nil:NilClass

Expected outcome: imported VM

Foreman and Proxy versions: 3.17.1 in both

Foreman and Proxy plugin versions:

Distribution and version: Debian 12

Other relevant data:

In production log I find:

2026-03-18T16:23:27 [I|app|047b4694] Adding Compute instance for pki.dc2.tcsoc.net
2026-03-18T16:23:27 [W|app|047b4694] Fehler beim Erstellen einer Rechenressource maxwell (Proxmox) Instanz pki.dc2.tcsoc
.net: undefined method []' for nil:NilClass 047b4694 | 047b4694 | ostype = host.compute_attributes['config_attributes']['ostype'] 047b4694 | ^^^^^^^^^^ 047b4694 | 2026-03-18T16:23:27 [I|app|047b4694] Backtrace for 'Fehler beim Erstellen einer Rechenressource maxwell (Proxmox) Instan z pki.dc2.tcsoc.net: undefined method ’ for nil:NilClass
047b4694 |
047b4694 | ostype = host.compute_attributes[‘config_attributes’][‘ostype’]
047b4694 | ^^^^^^^^^^
047b4694 | ’ error (NoMethodError): undefined method `’ for nil:NilClass
047b4694 |

OK I upgraded to 3.17.2 now I have a new Error:

Instanz allison.dc2.tcsoc.net: undefined method `include?’ for nil:NilClass config_cpu = config.select { |key, _value| config_typed_keys(type)[:cpu].include? key } ^^^^^^^^^

Any help would be appreciated

Hi @kagouros ,

It’s probably worth filing an issue to Issues · theforeman/foreman_fog_proxmox · GitHub

@nadjaheitmann have you seen this issue before with the proxmox plugin?

We currently have some issues with foreman_fog_proxmox and Foreman 3.17+ which all show similar symptoms. We are on it.

2 Likes

Any news on this. It is failing in a different way since the last upgrade.

Can you share which version you are now at how it is failing?

Foreman is 3.17 the error I get is the message:
Fehler beim Erstellen einer Rechenressource maxwell (Proxmox) Instanz xx.xx.xx.net: undefined method `include?’ for nil:NilClass config_cpu = config.select { |key, _value| config_typed_keys(type)[:cpu].include? key } ^^^^^^^^^

Proxmox is 9.1.16

I mean which foreman_fog_proxmox version are you using?

As I install with apt it is:

ruby-foreman-fog-proxmox/plugins,now 0.22.0-1~fm3.17 all [installed]

And it is still failing? Hm… Did you try rerunning foreman-installer and restarting the foreman service?

Yes i restarted due to other foreman package updates. As the error message changed i do think the new version war properly applied

Could you also try and clear your browser cache for the page? I think it is ‘Ctrl + Shit + R‘ or so. Just to make sure you really don’t have any artifacts of the old version lying around.

Yes I tried

We are using cpu type passthrough on the proxmox host. And I just retested with the new proxmox 9.2.2 same error.

Too bad! Can you please open an issue in Issues · theforeman/foreman_fog_proxmox · GitHub with an exact reproducer.

The issue should be fixed with foreman_fog_proxmox version 0.23.0.

2 Likes