Support #20915
openhammer host create in vmware using image
Description
Hello I'm trying to deploy with hammer using the script below:
compute_attributes="
cluster=Engenharia,
scsi_controller_type=ParaVirtualSCSIController,
hardware_version=vmx-11,
start=1,
guest_id=rhel7_64Guest,
path=/Datacenters/Laboratorio/vm/Team_Cloud
"
interface="
compute_type=VirtualVmxnet3,
compute_network=openstack-vlan201,
virtual=0,
provision=1,
primary=1,
managed=true,
ip=172.16.128.242
"
hammer host create \
--compute-attributes="$compute_attributes" \
--interface="$interface" \
--hostgroup=neutron \
--compute-profile="neutron" \
--compute-resource-id=2 --image="redhat" \
--provision-method="image" \
--volume="datastore=DRS100_CX3" \
--name=teste
But it is giving this error:
2017-09-13 17:59:12 99794e26 [app] [I] Parameters: {"host"=>{"name"=>"teste", "location_id"=>"4", "organization_id"=>"3", "compute_resource_id"=>2, "
hostgroup_id"=>5, "image_id"=>1, "build"=>true, "enabled"=>true, "provision_method"=>"image", "managed"=>true, "compute_profile_id"=>8, "compute_attrib
utes"=>{"cluster"=>"Engenharia", "scsi_controller_type"=>"ParaVirtualSCSIController", "hardware_version"=>"vmx-11", "start"=>"1", "guest_id"=>"rhel7_64
Guest", "path"=>"/Datacenters/Laboratorio/vm/Team_Cloud", "volumes_attributes"=>{"0"=>{"datastore"=>"DRS100_CX3"}}}, "content_facet_attributes"=>{}, "s
ubscription_facet_attributes"=>{}, "overwrite"=>true, "host_parameters_attributes"=>[], "interfaces_attributes"=>[{"virtual"=>"0", "provision"=>"1", "p
rimary"=>"1", "managed"=>"true", "ip"=>"172.16.128.242", "compute_attributes"=>{"type"=>"VirtualVmxnet3", "network"=>"openstack-vlan201"}}]}, "apiv"=>"
v2"}
2017-09-13 17:59:12 99794e26 [app] [I] Current user: foreman_admin (administrator)
2017-09-13 17:59:12 99794e26 [app] [I] Current user: foreman_admin (administrator)
2017-09-13 17:59:12 99794e26 [app] [I] Current user: nariga (administrator)
2017-09-13 17:59:12 99794e26 [app] [I] Authorized user nariga(Adriano Nariga)
2017-09-13 17:59:12 99794e26 [app] [I] Current user: nariga (administrator)
2017-09-13 17:59:15 99794e26 [app] [I] Loaded compute resource data for networks in 0.436888303 seconds
2017-09-13 17:59:16 99794e26 [app] [W] Unhandled VMware error
| Fog::Compute::Vsphere::NotFound: was not found
| /opt/theforeman/tfm/root/usr/share/gems/gems/fog-vsphere-1.7.0/lib/fog/vsphere/requests/compute/get_virtual_machine.rb:28:in `get_vm_ref'
....
| /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
2017-09-13 17:59:16 99794e26 [app] [W] Failed to create a compute Center EngLab (VMware) instance teste.lab.intranet: was not found
|
| Fog::Compute::Vsphere::NotFound: was not found
| /opt/theforeman/tfm/root/usr/share/gems/gems/fog-vsphere-1.7.0/lib/fog/vsphere/requests/compute/get_virtual_machine.rb:28:in `get_vm_ref'
....
| /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
2017-09-13 17:59:16 99794e26 [app] [E] Unprocessable entity Host::Managed (id: new):
| Failed to create a compute Center EngLab (VMware) instance teste.lab.intranet: was not found