Bug #2666

Unable to create new host

Added by Lucas E Holm about 9 years ago. Updated about 5 years ago.

Compute resources
Target version:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:



I'm unable to create new host:

'Unable to save: Failed to destroy a compute hypervisor.domain.tld (VMWare) instance host.domain.tld: unexpected path class NilClass mac value is blank'

Using unattended mode and there is no option to type mac in 'virtual machine' view.

Can provide debug logs if needed.

rpm -qa | grep foreman

Related issues

Related to Foreman - Feature #1945: Better VMWare support for non-clusters setupClosed


#1 Updated by Dominic Cleal about 9 years ago

  • Assignee deleted (Ohad Levy)

Check for any errors in /var/log/foreman/production.log when you select the compute resource from the "Deploy on" dropdown menu on the first tab on the form.

It's probably also worth trying on 1.2.0 at this point, since a lot of bug fixes have gone in.

#2 Updated by Lucas E Holm about 9 years ago

Started POST "/hosts/puppetclass_parameters" for at Fri Jun 14 10:39:10 +0200 2013
  Processing by HostsController#puppetclass_parameters as
  Parameters: {"authenticity_token"=>"RTpV6VIDWAOTNl+gDtxoqEYYn1JsZWnIPZmLPtZ8mcU=", "capabilities"=>"build", "utf8"=>"✓", "host"=>{"name"=>"newhost001", "progress_report_id"=>"[FILTERED]", "interfaces_attributes"=>{"new_interfaces"=>{"type"=>"Nic::Managed", "name"=>"", "provider"=>"IPMI", "ip"=>"root", "domain_id"=>"", "_destroy"=>"false", "mac"=>""}}, "compute_attributes"=>{"memory_mb"=>"768", "interfaces_attributes"=>{"new_interfaces"=>{"network"=>"VM Network", "_delete"=>""}, "0"=>{"network"=>"VM Network", "_delete"=>""}}, "path"=>"/ha-folder-root/ha-datacenter/vm", "start"=>"1", "cluster"=>"dmzhoster.secana.evry", "volumes_attributes"=>{"new_volumes"=>{"name"=>"Hard disk", "size_gb"=>"10", "datastore"=>"datastore1", "_delete"=>""}, "0"=>{"name"=>"Hard disk", "size_gb"=>"10", "datastore"=>"datastore1", "_delete"=>""}}, "cpus"=>"1"}, "build"=>"1", "hostgroup_id"=>"", "ip"=>"", "environment_id"=>"", "enabled"=>"1", "architecture_id"=>"", "provision_method"=>"build", "disk"=>"", "root_pass"=>"[FILTERED]", "comment"=>"", "overwrite"=>"false", "compute_resource_id"=>"1", "puppet_proxy_id"=>"1", "domain_id"=>"1", "subnet_id"=>"", "model_id"=>"", "mac"=>"", "updated_at"=>"1371199134", "managed"=>"true"}}
  ^[[1m^[[35mUser Load (0.7ms)^[[0m  SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
Setting current user thread-local variable to admin
  ^[[1m^[[36mSQL (0.6ms)^[[0m  ^[[1mSELECT COUNT(*) AS count_all, puppetclass_id AS puppetclass_id FROM `lookup_keys` WHERE `lookup_keys`.`puppetclass_id` IN (NULL) GROUP BY puppetclass_id^[[0m
  ^[[1m^[[35mSQL (1.7ms)^[[0m  SELECT COUNT(*) AS count_all, environment_classes.puppetclass_id AS environment_classes_puppetclass_id FROM `lookup_keys` INNER JOIN `environment_classes` ON `environment_classes`.`lookup_key_id` = `lookup_keys`.`id` WHERE `environment_classes`.`puppetclass_id` IN (NULL) GROUP BY environment_classes.puppetclass_id
Rendered puppetclasses/_class_parameters.html.erb (0.0ms)
Rendered puppetclasses/_classes_parameters.html.erb (11.2ms)
Completed 200 OK in 25ms (Views: 11.8ms | ActiveRecord: 4.4ms)

#3 Updated by Lucas E Holm about 9 years ago

I resolved this by adding 'mac' as global variable. Afterwards MAC input was visible in 'Create Host/Network' view.

#4 Updated by Joakim T about 9 years ago


After i choose the "deploy on" field under host the "mac" field under network gets it style changed to "display: none".
When i then hit the submit button i get the error message that the mac address is missing.

The mac field is left with this style / tree layout

<div id="mac_address" style="display: none;">
   <div class="control-group  ">
     <label class="control-label" for="mac">MAC</label>
     <div class="controls">
       <input autocomplete="off" id="host_mac" name="host[mac]" size="30" type="text" value="">
       <span class="help-inline">MAC address for this host</span>
       <span class="help-block"></span>

#5 Updated by Amos Benari about 9 years ago

  • Status changed from New to Feedback

Please try reproduce the issue on Foreman 1.2 as we have fixed several bugs in the VMWare integration code.
If the problem persist can you please specify if you are working with vSphere or directly with ESX hypervisor?

#6 Updated by Oliver Weinmann almost 9 years ago


running foreman 1.2 I get the same error on a standalone esxi 5.1 after appying the patch from here:

It works fine on a vSphere Cluster.

Maybe this is related?

#7 Updated by Benjamin Papillon over 8 years ago

  • Related to Feature #1945: Better VMWare support for non-clusters setup added

#8 Updated by Benjamin Papillon over 8 years ago

  • Description updated (diff)


Did you try again after upgrading to 1.3 or 1.4?
With or without patch on #1945?

Thanks for your report

#9 Updated by Johan Sunnerstig about 8 years ago


I've tried this on 1.4.1-3 and on the nightly(~1 week old as well as one from today) and the problem persists for me.
Without the patch in #1945 I get the usual "requires cluster" message regardless of version. With the patch on 1.4.x I run into the uuid problem in #4590 . With the patch on nightly I run into this message: "undefined method `new' for "VirtualE1000":String".


#10 Updated by Ryan DeShone over 7 years ago

Is there any update on this? I just set up Foreman 1.7 to manage two VMWare hosts and am having this exact issue (once I manually patched the issue from #1945). Does anyone have a workaround? Can we get any sort of traction on a fix? What seems like a relatively small bug like this lingering for over a year is worrisome.

#11 Updated by Anonymous about 5 years ago

  • Status changed from Feedback to Rejected

only vSphere is supported.

Also available in: Atom PDF