Project

General

Profile

Actions

Bug #22820

open

PXE Boot / Deployment of Windows via WDS and multiple reboots

Added by Alexander Ray over 6 years ago. Updated over 6 years ago.

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

Description

When I deploy a new Windows server by chaining PXE to a WDS server, the VM is created fine - however, the WDS installation process involves several reboots. The problem is that until I call the 'built' URL, it will continue attempting to boot from WDS and never finish the install; I got around this by having it call 'built' before the first reboot, so the rest of the deployment works, except that as a result of calling 'built' the Puppet CA will not autosign the server's certificate when puppet is installed.

The VM seems to be provisioned with netboot as the highest priority, over local hard disk, whereas the reverse should work just fine since it will only boot off the network when the first stage of WDS deployment has not completed. However, there doesn't appear to be a configuration option to alter this behavior.

Actions #1

Updated by Alexander Ray over 6 years ago

  • Category set to Compute resources - VMware
Actions #2

Updated by Alexander Ray over 6 years ago

If I manually cancel the net boot after the first reboot, and move the call to 'built' from before the first reboot to after puppet is installed, it works fine.

I tried editing /usr/share/foreman/app/models/compute_resources/foreman/model/vmware.rb, going to line 611 and replacing

:boot_order => ['network','disk']

with

:boot_order => ['disk','network']

But that didn't have an effect, it still tried to netbook first.

Actions #3

Updated by Alexander Ray over 6 years ago

Updating vmware.rb did work after all, just had to restart Foreman for some reason. Provisioning works fine from start to finish now, though I suspect the lack of net boot as the top-priority boot option will impair the ability to rebuild the host.

Actions #4

Updated by Alexander Olofsson over 6 years ago

We had a similar issue, so I ended up writing a plugin to make it easier to deal with; https://github.com/ananace/foreman_specifictemplate

With that one in place then all you need to do is to do a HTTP request before the reboot to have Foreman deploy a local boot template for you.

Not a perfect workaround, but it avoids having to do manual boot order swapping, or losing lifecycle management due to only booting locally. (Which is admittedly mostly an issue for physical hardware)

Actions #5

Updated by Alexander Ray over 6 years ago

Alexander Olofsson wrote:

We had a similar issue, so I ended up writing a plugin to make it easier to deal with; https://github.com/ananace/foreman_specifictemplate

With that one in place then all you need to do is to do a HTTP request before the reboot to have Foreman deploy a local boot template for you.

Not a perfect workaround, but it avoids having to do manual boot order swapping, or losing lifecycle management due to only booting locally. (Which is admittedly mostly an issue for physical hardware)

Works great! Had to make a couple changes to get it to work with your example code, but I'm not sure that it's me just not understanding templates well.

Actions

Also available in: Atom PDF