Bug #22059
openCreate Host Fails on all ESXi 5.5 hosts but works fine on ESXi 6.5 hosts
Description
Foreman 1.16.0-RC2 works great on all our ESX 6.5 hosts, but all my ESX 5.5 hosts fail to create the host with the following error in the production log. I don't do anything different during the create process.
2017-12-21 15:36:39 a1abee98 [app] [W] Failed to create a compute tsmvc - TSM Datacenter (VMware) instance clara-gebers.qa.catalogic.us: InvalidArgument: A specified parameter was not correct: | | RbVmomi::Fault: InvalidArgument: A specified parameter was not correct: | /opt/theforeman/tfm/root/usr/share/gems/gems/rbvmomi-1.10.0/lib/rbvmomi/vim/Task.rb:14:in `wait_for_completion' | /opt/theforeman/tfm/root/usr/share/gems/gems/fog-vsphere-1.9.2/lib/fog/vsphere/requests/compute/create_vm.rb:48:in `create_vm_on_datastore' | /opt/theforeman/tfm/root/usr/share/gems/gems/fog-vsphere-1.9.2/lib/fog/vsphere/requests/compute/create_vm.rb:40:in `create_vm' | /opt/theforeman/tfm/root/usr/share/gems/gems/fog-vsphere-1.9.2/lib/fog/vsphere/models/compute/server.rb:297:in `save'
The parameters passed to the build command are shown here in the production log, something it doesn't like. The production log zipped is attached to the issue.
2017-12-21 15:36:32 a1abee98 [app] [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"5EJGBWfJQ1+MsFz3156vNnjpTD58csqX975PcDEI8/Y5HlRB8cL/K0naUjJaJKrMAqpbGMLZcDcEqFwJQHyTaw==", "host"=>{"name"=>"clara-gebers", "hostgroup_id"=>"1", "compute_resource_id"=>"10", "compute_profile_id"=>"1", "environment_id"=>"8", "config_group_ids"=>[""], "puppetclass_ids"=>[""], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"clara-gebers", "domain_id"=>"1", "subnet_id"=>"1", "ip"=>"172.20.40.110", "ip6"=>"", "managed"=>"0", "primary"=>"1", "provision"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>"", "compute_attributes"=>{"type"=>"VirtualE1000", "network"=>"network-11"}}}, "compute_attributes"=>{"cpus"=>"1", "corespersocket"=>"1", "memory_mb"=>"2048", "firmware"=>"bios", "cluster"=>"bexesx2.devad.catalogic.us", "resource_pool"=>"ehansen", "path"=>"/Datacenters/TSM/vm", "guest_id"=>"centos7_64Guest", "hardware_version"=>"vmx-10", "memoryHotAddEnabled"=>"0", "cpuHotAddEnabled"=>"0", "add_cdrom"=>"0", "start"=>"1", "annotation"=>"", "scsi_controllers"=>"{\"scsiControllers\":[{\"type\":\"VirtualLsiLogicController\",\"key\":1000}],\"volumes\":[{\"thin\":true,\"name\":\"Hard disk\",\"mode\":\"persistent\",\"controllerKey\":1000,\"size\":10485760,\"sizeGb\":100,\"datastore\":\"archive_inventory\"}]}"}, "architecture_id"=>"1", "operatingsystem_id"=>"17", "provision_method"=>"bootdisk", "build"=>"1", "medium_id"=>"1", "ptable_id"=>"123", "pxe_loader"=>"None", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"3-Users", "enabled"=>"1", "model_id"=>"", "comment"=>"", "overwrite"=>"false"}, "capabilities"=>"build image bootdisk", "provider"=>"Vmware", "bare_metal_capabilities"=>"build"}
Files
Updated by Ioan Rogers over 5 years ago
I have this same issue, and I've tracked it down to the "Guest OS" VM field. The list foreman displays does not match the list displayed when creating a VM directly in VSphere. I had "CentOS 7 (64-bit)" as the guest OS in foreman, but that option is not present on VSphere. It has "CentOS 5/6/7 (64-bit)" which is not in Foreman's list. Chose "Redhat Enterprise Linux 7 (64-bit)" and can now deploy VMs.
Updated by Eric Hansen over 5 years ago
Ioan Rogers wrote:
I have this same issue, and I've tracked it down to the "Guest OS" VM field. The list foreman displays does not match the list displayed when creating a VM directly in VSphere. I had "CentOS 7 (64-bit)" as the guest OS in foreman, but that option is not present on VSphere. It has "CentOS 5/6/7 (64-bit)" which is not in Foreman's list. Chose "Redhat Enterprise Linux 7 (64-bit)" and can now deploy VMs.
I have confirmed your observations, thanks for the update, it works for me if I choose "Redhat Enterprise Linux 7 (64-bit)"
Updated by Eric Hansen over 5 years ago
I have confirmed your observations, thanks for the update, it works for me if I choose "Redhat Enterprise Linux 7 (64-bit)"
I have some other problem now farther on with the iPXE boot process cannot connecting back up the Foreman server. It could just be the one ESXi host that I'm trying it on now, I'd have to find another to confirm. But, the problem isn't the same most definitely, i.e. I never got this far previously.
Updated by Eric Hansen over 5 years ago
I have confirmed success on a different ESX 5.5i host