Closed gmalfray closed 3 years ago
It seems to be missing 'model' => 'virtio'
in parameters
I am also seeing this with proxmox 6.2-4
Seems similar to #137 unfortunately I don't see a PR to try to replicate with the new value.
workaround:
Use hammer CLI to provisionning Host --> https://github.com/theforeman/hammer-cli
1: create Compute Profile and configure it
2: create Host group
3: in Host group configure "Deploy on" and" Compute profile"
4: find manually next id in proxmox
5: use hammer CLI
exemple:
#> hammer -d host create --name "plop" --hostgroup-id 25 --compute-attributes "vmid=124" --location-id 1 --organization-id 2
Indeed when you create a host without a host group selected the interface form does not enable proxmox compute specific fields. I am gonna see if I can enhance it and if it is not a foreman feature only. You just need to create a host group first associated with a proxmox profile (server vm or container vm), then when you create a host you just have to select the right proxmox host group.
I know where is the bug: when you create host, select compute proxmox and go to VM tab you change type (lxc or server), proxmox specific nic form will then appears. The bug is in this file: https://github.com/theforeman/foreman_fog_proxmox/blob/80a82e6efd9ac7fbe00d0b9bd083a7e5968fa55d/app/assets/javascripts/foreman_fog_proxmox/proxmox_vm.js#L30. I am still investigating.
Describe
When I want to create a new host from the foreman interface the provisioning failed with the message:
Actual (400 Bad Request) excon.error.response: body => "{\" errors \ ": {\" id \ ": \" property is not defined in schema and the schema does not allow additional properties \ ", \ "net0 \": \ "invalid format - missing key in comma-separated list property \\ n \"}, \ "data \": null} ": cookies => []: headers => {" Cache-Control " => "max-age = 0" "Connection" => "close" "Content-Length" => "190" "Content-Type" => "application / json; charset = UTF-8" "Date" => "Wed, 23 Sep 2020 09:38:04 GMT" "Expires" => "Wed, 23 Sep 2020 09:38:04 GMT" "Pragma" => "no-cache" "Server" => "pve-api -daemon / 3.0 "}: host =>" 172.xx.xx.xx ": local_address =>" 192.168.xx.xx ": local_port => 49694: path =>" / api2 / json / nodes / xxx-proxmox1 / qemu ": port => 8006: reason_phrase => "Parameter verification failed." : remote_ip => "172.xx.xx.xx": status => 400: status_line => "HTTP / 1.1 400 Parameter verification failed. \ r \ n"
In a foreman log :
When editing the network interface, you cannot choose the card model in the proxmox section the fields do not appear
Used components Foreman 2.1.2 Foreman_fog_proxmox v0.12.4 Promox 6.2-10
Screenshots