Project

General

Profile

Actions

Bug #10223

open

Image provisoning over API doesn't start host automatically

Added by El Joppa over 9 years ago. Updated over 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Foreman 1.8rc3
Debian Wheezy

curl -s -X $METHOD -H "Accept:application/json" -H "Content-Type:application/json" \
     -k -u $USER:$PASS \
-d '{"host":"name":"test1","hostgroup_id":"1","operatingsystem_id":"1","image_id":"1","compute_resource_id":"1","compute_profile_id":"1","provision_method":"image","subnet_id":"1","compute_attributes":{ "start":"1","vm_attrs":{ "cpus":"4"}}}}' \
     $FOREMAN_URL/api/v2/hosts | json_pp

The machine is created through libvirt provider but the virtual machine doesnt have a filesystem with content in it so it just says "No boot device" in the console. If i drop the compute_attributes and just power up the machine manually it all works..except i have to manually power up the machine after the api call (which waits for the machine to come up)

debug put up at:
rsync /tmp/foreman-debug-ngR17.tar.xz rsync://theforeman.org/debug-incoming


Related issues 3 (0 open3 closed)

Related to Foreman - Bug #6342: Compute profile should be used when empty volumes and interfaces passed in compute_attributesClosedTomáš Strachota06/23/2014Actions
Has duplicate Foreman - Bug #14210: Provisioning via API doesn't start the host by defaultDuplicate03/15/2016Actions
Has duplicate Foreman - Bug #14325: VM does not start after creation when using a compute profileDuplicate03/22/2016Actions
Actions

Also available in: Atom PDF