Bug #14160

VMware image-based provisioning: 'configSpec.bootOptions.bootOrder' parameter incorrect

Added by Dmitry Sakun about 1 year ago. Updated 3 days ago.

Status:Ready For Testing
Priority:Normal
Assigned To:Chris Roberts
Category:Compute resources - VMware
Target version:Katello - Team Brad - Iteration 12
Difficulty:easy Bugzilla link:1398317
Found in release:1.11.0 Pull request:https://github.com/theforeman/foreman/pull/4400
Story points-
Velocity based estimate-

Description

Foreman (1.11RC1) image-based provisioning + VMware (VCenter version 5.5.0) fails with the following error: InvalidArgument: A specified parameter was not correct (configSpec.boot Options.boot Order). Not sure if this has something to do with Foreman. UI error is(partially in German): "Failed to create a compute IPX (VMware) instance temptest01.gfk.com: InvalidArgument: Ein angegebener Parameter war nicht korrekt. configSpec.bootOptions.bootOrder"

In addition (may be related), once the machine is provisioned via PXE, it still tries to boot from network first.

Foreman log attached

production_log.txt Magnifier (28.5 KB) Dmitry Sakun, 03/11/2016 10:11 AM

Screen Shot 2017-02-07 at 10.37.44 AM.png (117 KB) Preview Stefan Lasiewski, 02/07/2017 01:38 PM

Screen%20shot%202017-02-07%20at%2010.37.44%20am

Related issues

Related to Foreman - Bug #5510: Set network as first boot device for VMs in VMware comput... Closed 04/30/2014

History

#1 Updated by Dominic Cleal about 1 year ago

  • Release set to 1.11.0

Tentatively setting to 1.11.0 as it may be a regression, though I can't tell where. The change in #5510 only appears to be in the network provisioning code path, I can't see where it could have changed image provisioning.

Was the template you're building from created from a Foreman-created VM or something?

In addition (may be related), once the machine is provisioned via PXE, it still tries to boot from network first.

This is by design, see #5510. It allows the host to be rebuilt from Foreman.

#2 Updated by Dominic Cleal about 1 year ago

  • Related to Bug #5510: Set network as first boot device for VMs in VMware compute resources added

#3 Updated by Dmitry Sakun about 1 year ago

Dominic Cleal wrote:

Tentatively setting to 1.11.0 as it may be a regression, though I can't tell where. The change in #5510 only appears to be in the network provisioning code path, I can't see where it could have changed image provisioning.

Was the template you're building from created from a Foreman-created VM or something?

In addition (may be related), once the machine is provisioned via PXE, it still tries to boot from network first.

This is by design, see #5510. It allows the host to be rebuilt from Foreman.

Yes, correct. The image was built by Foreman as well.

#4 Updated by Dmitry Sakun about 1 year ago

Any hints on how to see what's being sent via API ? I tried to change boot order of the template and lower HW version but it didn't help.

#5 Updated by Dominic Cleal about 1 year ago

There's not an easy way, only http://projects.theforeman.org/projects/foreman/wiki/Troubleshooting#Compute-resource-debugging which may not work properly on a production installation.

I don't think it's anything Foreman is doing during clone, as the code change appears to only be used during network provisioning. My guess is that it's stored inside the template somehow.

#6 Updated by Dominic Cleal 12 months ago

  • Release deleted (1.11.0)

#7 Updated by Jason Gray 11 months ago

I was able to get around the same problem by deleting these two options from the vmx:

bios.hddOrder
bios.bootOrder

The default boot order seems to be defined by the default bios settings. This may not work for people who have non-default or special a special boot order. There is a VMWare article that describes these options:

https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2011654

#8 Updated by Jiří Machálek 10 months ago

I had also this issue with 1.11.0. As workaround I commented out line 23 in file /opt/theforeman/tfm/root/usr/share/gems/gems/fog-vsphere-0.6.1/lib/fog/vsphere/requests/compute/create_vm.rb, where boot options are reconfigured:

20           vm_cfg[:cpuHotAddEnabled] = attributes[:cpuHotAddEnabled] if attributes.key?(:cpuHotAddEnabled)
21           vm_cfg[:memoryHotAddEnabled] = attributes[:memoryHotAddEnabled] if attributes.key?(:memoryHotAddEnabled)
22           vm_cfg[:firmware] = attributes[:firmware] if attributes.key?(:firmware)
23           #vm_cfg[:bootOptions] = boot_options(attributes) if attributes.key?(:boot_order) || attributes.key?(:boot_retry) # WORKAROUND
24           resource_pool = if attributes[:resource_pool] && attributes[:resource_pool] != 'Resources'
25                             get_raw_resource_pool(attributes[:resource_pool], attributes[:cluster], attributes[:datacenter])
26                           else
27                             get_raw_cluster(attributes[:cluster], attributes[:datacenter]).resourcePool
28                           end

#9 Updated by Marek Hulán 3 months ago

  • Bugzilla link set to 1398317

#10 Updated by Marek Hulán 2 months ago

Maybe we could add a checkbox to set whether we want to hardcode bootoptions. While by default it's useful, when we want to build a host that we plan to covert to a template we could disable it. Chances are we won't rebuild it so the boot order does not matter.

#11 Updated by Stefan Lasiewski about 1 month ago

As a side effect of this bug, the VMware sets the BIOS to something called "User Mode", which means we cannot change the Boot Order from the BIOS. At least, that's what I think is happening based on https://communities.vmware.com/thread/434314?start=0&tstart=0 .

That was surprising

See the screenshot.

#12 Updated by Chris Roberts about 1 month ago

  • Status changed from New to Assigned
  • Assigned To set to Chris Roberts

#13 Updated by Chris Roberts 8 days ago

  • Target version set to Team Brad - Iteration 12
  • Difficulty set to easy

#14 Updated by The Foreman Bot 3 days ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4400 added

Also available in: Atom PDF