Windows Provisioning made Easy!

Hi @drz9,

From your provided information, I can only deduce that the “next-server” isn’t being set in iPXE for one or the other reason; as “tftp:///boot/windows-x64-windows-images-JiQavrkLFtOU/wimboot” should be something in the lines “tftp://your.local.foreman.server.com/boot/windows-x64-windows-images-JiQavrkLFtOU/wimboot” I don’t see the hostname or an ip-address here. Not sure why the next-server (option 66) would be missing; can you perhaps verify the dhcp response actually has it?

Kind regards

1 Like

has sombody seen this error or have information what the installer tries to do here?
Is this maybe hyperv specific problem?

Actually i’ve had this problem in the past as well at one point… But i seem to have forgoten the solution for now… I think it has something to do with the vm settings… But i can’t recall if it is memory that needs to be sufficient or if it was a network adapter issue… When i do remember i’ll let you know, at least i can tell you that i have managed to make it run on hyper v in the past

1 Like

could it be the wimboot version maybe.
can i use another boot.wim or does the boot.wim already conatin some custoized config?

Hey,

Wimboot hasn’t been updated in some time now, i think the product is considered feature complete. If anything I’d try playing around with various system settings to see if you can resolve it. If you are not strictly bound to hyper-v on the otherhand you could give virtualbox if a spin to validate if the rest of the configuration is running as expected. Unfortunately due to covid-19 i don’t have access to my lab environment anymore… i’m very sure i got windows to run on hyper-v using wimboot.

1 Like

I think i only used gen 1 vms with a legacy adapter actually…
I would try this first. Don’t forget to use the same mac address :slight_smile:

1 Like

@UXabre , I screen is stuck at bootloader pickup , I knwo its a basic issue but need help as I tried all the above mentioned . Please refer to the screen

Do I need to have Foreman DHCP Feature enabled to make installation work? Because my thinking is that I could just use static IP addresses as usual and make installation work “boot disk based” like I am used to with Linux systems

Hi @drz9,

It should work using a bootdisk approach and skipping the dynamic part; I, however, haven’t tried this but their might be dragons (how will it get the correct foreman token for instance?). I do patch the winPE image on-the-fly using wimboot to inject the installation script; but I guess that one could also overcome that problem easily; if not a lot of things change it’s doable. But like I said, I’m guessing, if you use provisioning tokens, this will be problematic.

If you do manage to get it to work; perhaps you can share your knowledge in a blog post; I bet there are others who also prefer that way of working + it would help me to further understand your needs and how the script could be enhanced to help your use-case as well :slight_smile:

Kind regards and good luck!

1 Like

Hi,

i get following error during run of WIMan.

Have you any idea what was wrong?

Removing WinPE-WMI-Package … OK
onfiguring WinPE Console… Ausnahme beim Aufrufen von “SetAccessRule” mit 1 Argument(en): “Manche ode
r alle Identitätsverweise konnten nicht
übersetzt werden.”
In E:\tools\WIMan\WIMan-master\WIMan-master\inc\ConfigureWinPEConsole.ps1:10 Zeichen:5
$Acl.SetAccessRule($Ar)
~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: ( MethodInvocationException
+ FullyQualifiedErrorId : IdentityNotMappedException

Failed
Adding drivers… Skipping
Setting TargetPath to X:… OK
Optimizing image… OK

BR
Thomas

Hi,

Problem seems this code:

$Acl = Get-Acl ("${wimFile}_mount\windows\system32\winpe.jpg")
Log "DEBUG" "ACL for '$($wimFile)_mount\windows\system32\winpe.jpg' is $Acl"
$result += $?
$Ar = New-Object  system.security.accesscontrol.filesystemaccessrule("Administrators","FullControl","Allow")
$result += $?
$Acl.SetAccessRule($Ar)

However probably this error come as the system were i execute this is a german windows 2016 server desktop were the group is called Administratoren

1 Like

Hi,

on testsystem i was running into a certificate issue during installation.

As a quick fix one can modify line 19 in Windows peSetup.cmd with:
set “WGET=wget64.exe --no-check-certificate”

probably an improvment for an optional switch in the template?

BR
Thomas

1 Like

Hi @tomabg,

I’ll check this out, I think your analysis is spot on probably; never occured to me but I’ll try and find a way to find the administrator in a language agnostic way :slight_smile:

However, it shouldn’t be an issue as this is only to change the backgroundimage in winPE to include the foreman helmet :slight_smile:

As for your other remark, I’ll also check to include it :slight_smile:

thanks for testing and your feedback!

1 Like

Thank you meanwhile installation works great.

Thank you very much

Hi
how you realized automatic domain join in the WIMAN tooling?

just seen…finish template its clear

BR
Thomas

Hi! I’m stucked at the same phase like you. Any news? I need to know if this can be done on hyper-v.

Thank you!
Mihai

Hi,
i have not get it working on hyper-v…in some other forums i have read its a problem with the boot.wim version.

we now use vmware as compute resource where its working fine.

BR
Thomas

Hi,
I tried following your steps on a vsphere 6.7U2.
The Script from the repository worked well and everything worked so far until I wanted to create a vm.

The options I used for the operating system in foreman are like in the following screenshots:

Here is the installation media.

I already was at the point “tomabg” mentioned, where it said “…peSetup.cmd… failed: File not found”
I solved that by copying over the ipxe files: ipxe.efi, ipxe.lkrn, undionly.kpxe
Now I have the problem, that the boot process is starting to load ipxe, but then suddenly stops and everything begins to boot from the beginning. So, it’s a loop. And it also doesn’t matter, if I specify bios or uefi.
Here is a screenshot from this:

Best Regards
Lukas

Hi.
First of all kudos to you @UXabre for this. Setup went smoothly and easy to pick it up.

Unfortunately :smiley: I have the same problem as @llxp when I try to boot a Windows 2019 VM… ipxe.krn is loaded, iPXE is initializing devices and then the loop begins… Did you guys encountered this or have some hints ? :woozy_face: I can’t figure out what should I do to fix it…

BR,
Viorel

Small update :slight_smile: after modifying the dhcpd.conf file I managed to get through the previous loop and get into a new one :woozy_face:
I followed this https://projects.theforeman.org/projects/foreman/wiki/Fetch_boot_files_via_http_instead_of_TFTP

if exists user-class and option user-class = “iPXE” {
filename “http://foreman.fmt.lab/intermediate.ipxe”;
} elsif option architecture = 00:06 {
filename “ipxe.efi”;
} elsif option architecture = 00:07 {
filename “ipxe.efi”;
} elsif option architecture = 00:09 {
filename “ipxe.efi”;
} else {
filename “pxelinux.0”;
}

where intermediate.ipxe file is placed in /usr/share/foreman/public/ and containing this:

#!ipxe

Intermediate iPXE script to report MAC address to Foreman

isset ${net0/mac} || goto no_nic
dhcp net0 || goto net1
chain http://foreman.fmt.lab/unattended/iPXE?mac=${net0/mac} || goto net1
exit 0

:net1
isset ${net1/mac} || goto no_nic
dhcp net1 || goto net2
chain http://foreman.fmt.lab/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

Any idea ? I don’t know if its a progress or ar a wrong road that I’m following :D…