Project

General

Profile

Actions

Bug #14160

closed

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

Added by Dmitry Sakun about 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources - VMware
Target version:
Difficulty:
easy
Triaged:
Fixed in Releases:
Found in Releases:

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


Files

production_log.txt production_log.txt 28.5 KB Dmitry Sakun, 03/11/2016 10:11 AM
Screen Shot 2017-02-07 at 10.37.44 AM.png View Screen Shot 2017-02-07 at 10.37.44 AM.png 117 KB Stefan Lasiewski, 02/07/2017 01:38 PM

Related issues 3 (0 open3 closed)

Related to Foreman - Bug #5510: Set network as first boot device for VMs in VMware compute resourcesClosedTimo Goebel04/30/2014Actions
Related to Foreman - Bug #20878: VMware image-based provisioning: Rewrite boot orderClosedTimo Goebel09/08/2017Actions
Has duplicate Foreman - Bug #16926: Can't deploy anymore via Vmware Image After upgrade vmware from 5.5. to 6DuplicateActions
Actions #1

Updated by Dominic Cleal about 8 years ago

  • translation missing: en.field_release set to 71

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.

Actions #2

Updated by Dominic Cleal about 8 years ago

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

Updated by Dmitry Sakun about 8 years 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.

Actions #4

Updated by Dmitry Sakun about 8 years 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.

Actions #5

Updated by Dominic Cleal about 8 years 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.

Actions #6

Updated by Dominic Cleal about 8 years ago

  • translation missing: en.field_release deleted (71)
Actions #7

Updated by Jason Gray almost 8 years 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

Actions #8

Updated by Jiří Machálek almost 8 years 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
Actions #9

Updated by Marek Hulán over 7 years ago

  • Bugzilla link set to 1398317
Actions #10

Updated by Marek Hulán over 7 years 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.

Actions #11

Updated by Stefan Lasiewski about 7 years 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.

Actions #12

Updated by Chris Roberts about 7 years ago

  • Status changed from New to Assigned
  • Assignee set to Chris Roberts
Actions #13

Updated by Chris Roberts about 7 years ago

  • Target version set to 178
  • Difficulty set to easy
Actions #14

Updated by The Foreman Bot about 7 years ago

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

Updated by Brad Buckingham about 7 years ago

  • Target version changed from 178 to 181
Actions #16

Updated by Klaas D about 7 years ago

This seems like a VMware bug to me. I can't even delete disks from a host that was built via foreman because the parameter configSpec.bootOptions.bootOrder

Actions #17

Updated by Brad Buckingham about 7 years ago

  • Target version changed from 181 to 187
Actions #18

Updated by Brad Buckingham almost 7 years ago

  • Target version changed from 187 to 193
Actions #19

Updated by Dominic Cleal almost 7 years ago

  • Has duplicate Bug #16926: Can't deploy anymore via Vmware Image After upgrade vmware from 5.5. to 6 added
Actions #20

Updated by Brad Buckingham almost 7 years ago

  • Target version changed from 193 to 196
Actions #21

Updated by Brad Buckingham almost 7 years ago

  • Target version deleted (196)
Actions #22

Updated by Timo Goebel almost 7 years ago

According to my research this error happens because the boot order setting referenced both storage volumes and network interfaces. During a clone operation via Foreman, the interface of the vm is replaced. The interface from the template is deleted and a new interface is added. The boot order reference is not updated and therefor invalid.

I did not find a way to actually modify the boot order of a vm during cloning, however I found a workaround for this: Instead of deleting the interface from the template and adding a new one, it's possible to update/edit the interface. Therefore the boot order reference doesn't get broken.
I have developed a patch for fog-vsphere that changes the behaviour accordingly. I'll open a PR once i have cleaned it up.

Actions #23

Updated by Timo Goebel almost 7 years ago

This PR should fix this issue: https://github.com/fog/fog-vsphere/pull/98

Actions #24

Updated by The Foreman Bot over 6 years ago

  • Pull request https://github.com/theforeman/foreman/pull/4721 added
Actions #25

Updated by Timo Goebel over 6 years ago

  • translation missing: en.field_release set to 240
  • Pull request deleted (https://github.com/theforeman/foreman/pull/4400)
Actions #26

Updated by Anonymous over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #27

Updated by Timo Goebel over 6 years ago

  • Related to Bug #20878: VMware image-based provisioning: Rewrite boot order added
Actions

Also available in: Atom PDF