Project

General

Profile

Actions

Support #20915

open

hammer host create in vmware using image

Added by adriano lopes over 6 years ago. Updated over 4 years ago.

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

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

Actions #1

Updated by Eric Hansen almost 6 years ago

adriano lopes wrote:

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

I'm having the same or a similar issue, the script that I wrote to build the host is below with the error. Any assistance with how to debug this is appreciated.

hammer host create --architecture-id 1 --domain-id 1 --environment-id 8 --managed "true" --operatingsystem-id 23 --provision-method "image" --image-id 7 --root-password "$ys8dmin" --hostgroup-id 1 --compute-resource-id 11 --compute-attributes "cpus=2,corespersocket=2,memory_mb=4096,cluster=TSMVC2Cluster,path=/Datacenters/New_Datacenter/vm,resource_pool=Foreman,guest_id=windows8Server64Guest,firmware=bios,hardware_version=Default,scsi_controller_type=VirtualLsiLogicSASConntroller,start=1" --interface "primary=1,managed=0,provision=1,virtual=0,ip=172.20.40.174,type=interface,name=eh-centos74-compute174,subnet_id=1,compute_type=VirtualE1000,compute_network=172.20.x.x Network" --volume "capacity=50G,datastore=GAMERA_LUN,thin=true,eager_zero=false" --name "eh-centos74-compute174"

2018-04-11 15:56:08 ad7f1b0c [app] [W] Rolling back due to a problem: [#<Orchestration::Task:0x007f76e847bab0 @name="Set up compute instance eh-centos74-compute174.qa.catalogic.us", @status="failed", @priority=2, @action=[#<Host::Managed id: nil, name: "eh-centos74-compute174.qa.catalogic.us", last_compile: nil, last_report: nil, updated_at: nil, created_at: nil, root_pass: "$5$pn9J5mMT$9Pr/cfdJbZH2aRVS5zqvodWdBE84IMgPQlsoVY...", architecture_id: 1, operatingsystem_id: 23, environment_id: 8, ptable_id: nil, medium_id: nil, build: true, comment: nil, disk: nil, installed_at: nil, model_id: nil, hostgroup_id: 1, owner_id: 3, owner_type: "User", enabled: true, puppet_ca_proxy_id: 1, managed: true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: 11, puppet_proxy_id: 1, certname: nil, image_id: 7, organization_id: nil, location_id: nil, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: 1, provision_method: "image", grub_pass: "$5$pn9J5mMT$9Pr/cfdJbZH2aRVS5zqvodWdBE84IMgPQlsoVY...", global_status: 0, lookup_value_matcher: "fqdn=eh-centos74-compute174.qa.catalogic.us", pxe_loader: nil, discovery_rule_id: nil>, :setCompute], @timestamp=2018-04-11 19:56:08 UTC>]
2018-04-11 15:56:08 ad7f1b0c [app] [I] Processed 1 tasks from queue 'Host::Managed Main', completed 0/3
2018-04-11 15:56:08 ad7f1b0c [app] [E] Task 'Set up compute instance eh-centos74-compute174.qa.catalogic.us' failed
2018-04-11 15:56:08 ad7f1b0c [app] [E] Task 'Query instance details for eh-centos74-compute174.qa.catalogic.us' canceled
2018-04-11 15:56:08 ad7f1b0c [app] [E] Task 'Power up compute instance eh-centos74-compute174.qa.catalogic.us' canceled
2018-04-11 15:56:08 ad7f1b0c [app] [E] Unprocessable entity Host::Managed (id: new):
Failed to create a compute tsmvc2-New_Datacenter (VMware) instance eh-centos74-compute174.qa.catalogic.us: was not found
Actions

Also available in: Atom PDF