Unable to create a host via api ERF42-8295



When I use the api in order to create a new host: ERF42-8295
Expected outcome:

Foreman and Proxy versions:
Foreman and Proxy plugin versions:
Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)


2019-05-09T13:59:58 [W|app|b4071] Rolling back due to a problem: [#<Orchestration::Task:0x00007f96991fa018 @name=“Set up compute instance api-test-vm.eng.fireeye.com”, @id=“Set up compute instance api-test-vm.eng.fireeye.com”, @status=“failed”, @priority=2, @action=[#<Host::Managed id: nil, name: “api-test-vm.eng.fireeye.com”, last_compile: nil, last_report: nil, updated_at: nil, created_at: nil, root_pass: “$5$kBpvFps2D4ORwBGR$ABdQoGXKHjv/zkYjUnp5oqwnBjl5dc…”, architecture_id: 1, operatingsystem_id: 18, environment_id: nil, ptable_id: 118, medium_id: 9, build: false, comment: nil, disk: nil, installed_at: nil, model_id: nil, hostgroup_id: 19, owner_id: 4, owner_type: “User”, enabled: true, puppet_ca_proxy_id: nil, managed: true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: 4, puppet_proxy_id: nil, certname: nil, image_id: nil, organization_id: nil, location_id: nil, type: “Host::Managed”, otp: nil, realm_id: nil, compute_profile_id: 6, provision_method: nil, grub_pass: “$5$kBpvFps2D4ORwBGR$ABdQoGXKHjv/zkYjUnp5oqwnBjl5dc…”, global_status: 0, lookup_value_matcher: “fqdn=api-test-vm.eng.fireeye.com”, pxe_loader: nil, discovery_rule_id: nil, initiated_at: nil, build_errors: nil>, :setCompute], @created=1557424798.8027544, @timestamp=2019-05-09 17:59:58 UTC>]
2019-05-09T13:59:58 [I|app|b4071] Processed 1 tasks from queue ‘Host::Managed Main’, completed 0/8
2019-05-09T13:59:58 [E|app|b4071] Task ‘Set up compute instance api-test-vm.eng.fireeye.comfailed
2019-05-09T13:59:58 [E|app|b4071] Task ‘Query instance details for api-test-vm.eng.fireeye.comcanceled
2019-05-09T13:59:58 [E|app|b4071] Task ‘Create DHCP Settings for api-test-vm.eng.fireeye.comcanceled
2019-05-09T13:59:58 [E|app|b4071] Task ‘Create IPv4 DNS record for api-test-vm.eng.fireeye.comcanceled
2019-05-09T13:59:58 [E|app|b4071] Task ‘Deploy TFTP PXELinux config for api-test-vm.eng.fireeye.comcanceled
2019-05-09T13:59:58 [E|app|b4071] Task ‘Deploy TFTP PXEGrub2 config for api-test-vm.eng.fireeye.comcanceled
2019-05-09T13:59:58 [E|app|b4071] Task ‘Deploy TFTP PXEGrub config for api-test-vm.eng.fireeye.comcanceled
2019-05-09T13:59:58 [E|app|b4071] Task ‘Deploy TFTP iPXE config for api-test-vm.eng.fireeye.comcanceled
2019-05-09T13:59:58 [E|app|b4071] Unprocessable entity Host::Managed (id: new):
Failed to create a compute elrond (Proxmox) instance api-test-vm.eng.fireeye.com: ERF42-8295 [Foreman::Exception]: invalid vmid=0

2019-05-09T13:59:58 [I|app|b4071] Rendering api/v2/errors/unprocessable_entity.json.rabl within api/v2/layouts/error_layout
2019-05-09T13:59:58 [I|app|b4071] Rendered api/v2/errors/unprocessable_entity.json.rabl within api/v2/layouts/error_layout (1.9ms)
2019-05-09T13:59:58 [I|app|b4071] Completed 422 Unprocessable Entity in 4299ms (Views: 4.7ms | ActiveRecord: 97.7ms)


Compute Resource plugin Proxmox was unable to complete VM creation request. This plugin is maintained by @tristanrobert so looking at him as I have no clue what is going on.


@ xjparkerx vmid must be a valid one (100+). You are using an old version. Try with a more recent one. Could you please post a more detailed issue in the foreman_fog_proxmox project?