Unable to provision machine on Proxmox

Hello,

I just wanted to give a quick introduction. I have primarily been working with windows (SCCM) for 3 years, but have been in IT for around 5 years. I decided shortly after Microsoft announced “Recall” for Windows 11 to switch over my personal computer to Debian (and my servers in my home lab). My eventual goal after doing all of this homelabbing such as learning Podman, Puppet, Bash, Etc is to become proficient in both windows and linux management. This leads me to learning Foreman. I was reading through the documentation to get the provisioning working with proxmox and have been having some weird issues.

Problem:
After doing the initial setup for integrating foreman with proxmox when i create a host i can see in the proxmox console that the “foreman_service” creates the debian vm from template, but then almost immediately destroys it. The foreman interface says the following "Failed to create a compute ProxmoxNode01 (Proxmox) instance ollie-stilwell.lan: ERF42-2180 [Foreman::Exception]: Unable to ssh into proxmox server: Inappropriate ioctl for device "

Expected outcome:
Foreman should be able to at least create the VM without it immediately destroying it. I am expecting issues after figuring this out as nothing works perfectly the first time.

Foreman and Proxy versions:
Foreman: 3.13.0
Smart Proxy: 3.13.0

Distribution and version:
Debian 12 (Bookworm)

Other relevant data:

2025-03-08T19:46:02 [I|app|06e5049e] Backtrace for 'Failed to create a compute ProxmoxNode01 (Proxmox) instance ollie-stilwell.lan: ERF42-2180 [Foreman::Exception]: Unable to ssh into proxmox server: Inappropriate ioctl for device
 06e5049e |  ' error (Foreman::Exception): ERF42-2180 [Foreman::Exception]: Unable to ssh into proxmox server: Inappropriate ioctl for device
 06e5049e | /usr/share/foreman/vendor/ruby/3.1.0/gems/foreman_fog_proxmox-0.17.0/app/helpers/proxmox_vm_cloudinit_helper.rb:135:in `rescue in vm_ssh'
 06e5049e | /usr/share/foreman/vendor/ruby/3.1.0/gems/foreman_fog_proxmox-0.17.0/app/helpers/proxmox_vm_cloudinit_helper.rb:130:in `vm_ssh'
2025-03-08T19:46:02 [E|app|06e5049e] Failed to save: Failed to create a compute ProxmoxNode01 (Proxmox) instance ollie-stilwell.lan: ERF42-2180 [Foreman::Exception]: Unable to ssh into proxmox server: Inappropriate ioctl for device

Lastly my Proxmox version is 8.3.4.

Hi and welcome to the forum :slight_smile:

A very similar error has recently been reported here.
There it is mentioned that the proxmox plugin currently only supportes Proxmox 7 due to API changes in Proxmox 8. though from the Github issue I would expect that at least basic provisioning works, so there is probably a different issue around.
As mentioned in the other Proxmox thread, this error is thrown when the Proxmox plugin tries to SSH into the newly created instance and execute ls as a test command and something failes (in this case, “Inappropriate ioctl for device”). Since you are recieving a general linux error, there is probably something wrong with your finished VM.

As general information and to help you troubleshoot this issue further: By default, Foreman will try and clean up after itself when something in the provisioning process went wrong. That includes deleting the VM, deleting DNS/DHCP entries, etc. To help debugging this issue, you can try and turn this off via Foreman’s settings. In the UI, go to Administer → Settings → Provisioning, there you can set “Clean up failed deployment” to “no”, which will prevent Foreman from deleting the VM when the provisioning process fails. I would not recommend leaving this setting off permanently to avoid piling up a large amount of broken VMs, but for troubleshooting this might help.

Regards

Thanks for the suggestion. I’ll review the template and see if I can’t find one pre-built/known working and use that as well.

I did try and use the setting you mentioned, during my testing, so it would not delete it on failure but it kept doing so regardless. I can see in the logs in Proxmox the “clone” followed immediately by “destroy”. I restarted Foreman after the setting change as well to be certain and still had the same result.