VMware, BIOS, iPXE, Windows client deployment

Hi,
If I try to deploy virtual Machines via foreman, it always runs in a loop and it not starts localy. Maybe a ‘boot local’ entry in the pescript resolve the issue?
Is there a solution for this issue?

Hi,

could you please share more details?
What provisioning type you are using (network/image)?
What status has the provisioned host in the foreman?

What version/plugins are you using?

Thanks! :wink:

Hi, of course!
foreman Version 1.21.3

I try to deploy Windows 10 via IPXE Chain BIOS (ESX-VCSA-Cluster / VMware) over network.

the last production.log:

2019-06-04T06:29:04 [I|app|01b4e084] Started GET “/unattended/provision?token=04b8ef37-bd65-42b3-b543-0f7b3cc57462” for …
2019-06-04T06:29:04 [I|app|01b4e084] Parameters: {“token”=>“04b8ef37-bd65-42b3-b543-0f7b3cc57462”, “kind”=>“provision”}
2019-06-04T06:29:04 [I|app|90829ce7] Started GET “/unattended/finish?token=04b8ef37-bd65-42b3-b543-0f7b3cc57462” for …
2019-06-04T06:29:04 [I|app|90829ce7] Parameters: {“token”=>“04b8ef37-bd65-42b3-b543-0f7b3cc57462”, “kind”=>“finish”}
c:\deploy\wget64.exe http://foreman.de/unattended/built?token=04b8ef37-bd65-42b3-b543-0f7b3cc57462

than the reboot starts.

I work with an external DHCP Server and an intermidiate.ipxe

#!ipxe
# Intermediate iPXE script to report MAC address to Foreman
isset ${net0/mac} || goto no_nic
dhcp net0 || goto net1
chain http://FOREMAN_OR_PROXY/unattended/iPXE?mac=${net0/mac} || goto net1
exit 0

:net1
isset ${net1/mac} || goto no_nic
dhcp net1 || goto net2
chain http://FOREMAN_OR_PROXY/unattended/iPXE?mac=${net1/mac} || goto net2
exit 0

:net1
# Create as many copies as necessary (the example will work up to 2 NICs)

:no_nic
echo Failed to chainload from any network interface
sleep 30
exit 1

Hello, you are giving us tough time to understand what you are suffering from. Describe in more detail what is going on. The Windows client is looping it what loop - reinstalling over and over again?

If this is the case, then the wget call which should exit “build” mode is likely failing. Does this return HTTP 201 or is that 404 or 500?

Also make sure your BIOS boot order is configured as follows:

  • Network (PXE)
  • HDD

Because when the host is then correctly set to non-build mode, iPXE will actually fail to boot (which is what we want) and BIOS should fallback to the second device (HDD) and boot the OS.

Hi Izap, thanks for your support. Youre right, the VM reinstalling over and over again. I get no Error. I think now the 'tell forman I am finish ’ fails and iPXE starts again.

okay, I go am working with salt, and my ‘i am built skript’ is embedded in the finish script. ‘Normaly’ with bare metal this works.

Unfortunatly my problem still exist and I need support for my issue.
After the peSetup, it starts booting from network again.
in foreman /var/lib/tftpboot/pxelinux.cfg my host ist still in build modus, so foreman doesn’t rewrite this file.
should i tell the bios machine to boot further from next partition ? or foremanthat the build modus is finished?
The OS is correctly installed. I boot it manually.

This is really the relevant part. I’d look in /var/log/foreman/production.log to see if it’s called and if so, if it’s correct.