Bug #14160
closedVMware image-based provisioning: 'configSpec.bootOptions.bootOrder' parameter incorrect
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
Updated by Dominic Cleal over 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.
Updated by Dominic Cleal over 8 years ago
- Related to Bug #5510: Set network as first boot device for VMs in VMware compute resources added
Updated by Dmitry Sakun over 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.
Updated by Dmitry Sakun over 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.
Updated by Dominic Cleal over 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.
Updated by Dominic Cleal over 8 years ago
- Translation missing: en.field_release deleted (
71)
Updated by Jason Gray over 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:
Updated by Jiří Machálek over 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
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.
Updated by Stefan Lasiewski over 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.
Updated by Chris Roberts over 7 years ago
- Status changed from New to Assigned
- Assignee set to Chris Roberts
Updated by Chris Roberts over 7 years ago
- Target version set to 178
- Difficulty set to easy
Updated by The Foreman Bot over 7 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/4400 added
Updated by Brad Buckingham over 7 years ago
- Target version changed from 178 to 181
Updated by Klaas D over 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
Updated by Brad Buckingham over 7 years ago
- Target version changed from 181 to 187
Updated by Brad Buckingham over 7 years ago
- Target version changed from 187 to 193
Updated by Dominic Cleal over 7 years ago
- Has duplicate Bug #16926: Can't deploy anymore via Vmware Image After upgrade vmware from 5.5. to 6 added
Updated by Brad Buckingham over 7 years ago
- Target version changed from 193 to 196
Updated by Timo Goebel about 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.
Updated by Timo Goebel about 7 years ago
This PR should fix this issue: https://github.com/fog/fog-vsphere/pull/98
Updated by The Foreman Bot about 7 years ago
- Pull request https://github.com/theforeman/foreman/pull/4721 added
Updated by Timo Goebel about 7 years ago
- Translation missing: en.field_release set to 240
- Pull request deleted (
https://github.com/theforeman/foreman/pull/4400)
Updated by Anonymous about 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset fb9869bbec7573f8ab1f7704a07415bd60da8ccb.
Updated by Timo Goebel about 7 years ago
- Related to Bug #20878: VMware image-based provisioning: Rewrite boot order added