Hi Viet,
thanks for the response, here is the log output
tarted POST "/hosts" for xx.x.x.x.x at Wed Mar 27 09:53:33 +0100 2013
Processing by HostsController#create as
Parameters: {"capabilities"=>"build", "authenticity_token"=>"xxxxxxxxx",
"utf8"=>"芒",
"host"=>{"name" =>"barsch", "managed"=>"true", "subnet_id"=>"5",
"architecture_id"=>"1",
"comment"=>"", "compute_resource_id"=>"4",
"compute_attributes"=> {"cpus"=>"1", "cluster"=>"DevOps", "start"=>"1",
"path"=>"/Datencenter/xxxxxx/vm/DevOps",
"interfaces_attributes"=>{"new_interfaces"=>{"_delete"=>"", "network"=>"VM
Network"},
"0"=>{"_delete"=>"", "network"=>"VMNetwork69"}},
"volumes_attributes"=>{"new_volumes"=>{"name"=>"Hard disk",
"size_gb"=>"10", "_delete"=>"", "datastore"=>"Local Disc esxxx.xxx.xxx"},
"0"=>{"name"=>"Hard disk", "size_gb"=>"15", "_delete"=>"",
"datastore"=>"Dev_Ops"}}, "memory_mb"=>"768"}, "provision_method"=>"build",
"overwrite"=>"false", "puppet_proxy_id"=>"3", "updated_at"=>"1364374283",
"mac"=>"", "domain_id"=>"1", "hostgroup_id"=>"2", "build"=>"1",
"medium_id"=>"10", "root_pass"=>"[FILTERED]",
"enabled"=>"1", "ptable_id"=>"11", "is_owned_by"=>"",
"environment_id"=>"3", "progress_report_id"=>"[FILTERED]",
"ip"=>"1xx.xx.xxx.xxx",
"interfaces_attributes"=>{"new_interfaces"=>{"name"=>"", "mac"=>"",
"domain_id"=>"1",
"type"=>"Nic::Managed", "_destroy"=>"false", "ip"=>"",
"provider"=>"IPMI"}}, "model_id"=>"", "puppetclass_ids"=>[""],
"disk"=>"", "operatingsystem_id"=>"3"}}
User Load (0.5ms) SELECT users
.* FROM users
WHERE users
.id
= 1
Greetings
Daniel
路路路
Am Dienstag, 26. M盲rz 2013 21:34:28 UTC+1 schrieb Viet Nguyen:
>
> First off can you create new VMware Hosts from Foreman UI?
>
> If so please post the json generated by your UI actions I can probably
> give some suggestion.
>
>
>
>
> On Monday, March 25, 2013 1:59:47 AM UTC-7, barmeni...@googlemail.comwrote:
>>
>> Greetings,
>>
>> is it possible to create a new host vm on vmware with the foreman api.
>>
>> On the man page (http://theforeman.org/api.html) i do not find any
>> commands for the vmware tab during the host creation:
>>
>>
>> something like
>>
>> -d "vm[cpus]=1" -d "vm[memory]=768" -d "vm[memory]=768" -d
>> "vm[cluster]=test" \
>> -d "vm[folder]=vm/test" -d "vm[network]=VMNetwork77" -d
>> "vm[datastore]=test" \
>> -d "vm[ds_name]=Hard disk" -d "vm[ds_size]=15" \
>>
>> The foreman log during the creation wasn't very helpful :-)
>>
>>
>> Thanks
>>
>> Daniel
>>
>