gusztavvargadr / packer

Packer templates for building Windows and Ubuntu images

Home Page:https://app.vagrantup.com/gusztavvargadr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"This PC can't run Windows 11" when building Windows 11 box with Virtualbox

mahmoud-ashi opened this issue · comments

Hey @gusztavvargadr. Thanks for maintaining this project! It has been a great help.

I'm trying to build a Windows 11 vagrant box for Virtualbox but I keep facing the "This PC can't run Windows 11" message while booting up.
image

System setup:
I'm running on an Ubuntu 20.04 system with vagrant 2.2.18 and Vritualbox 6.1.32r149290.

Commands executed:
I cloned your repo and executed the following command:
dotnet cake --target=build --configuration=w1121h2e-virtualbox-core

I see that you have added the src/w11/packer/builders/iso/floppy/setup.cmd which sets some bypass checks in the registry which seems to match what I've read in the Internet here and that the boot command has the "shit+F10" but I still see this issue. I'm using the same ISO file as you do (at least I haven't changed anything) so I'm wondering how you got this working.

Thanks for your support.

@mahmoud-ashi sorry for the late reply. I can confirm the issue on some of my environments too. My guess is that in some environments the timings around the first boot are not set up correctly. I will try to come up with a fix as soon as possible and will keep you posted, it's a very fragile method anyway that I'd like to get rid of.

@mahmoud-ashi please see the commit 2f2a96f as part of #354. Can you please check if this adjustment solves the issue?

If not, can you please try debugging and increasing / decreasing that current wait times and let me know which value works for you?

@gusztavvargadr, thanks for the support. Seems like the commit 2f2a96f works fine on my system as well. Will you merge it to master? Thanks in advance.

Btw, when I faced this issue, I looked into other repos to see if I can find a solution for it and on the same machine, the packer config from https://github.com/Baune8D/packer-windows-desktop/blob/main/answer_files/11_efi/Autounattend.xml worked fine for me. Notice how the boot command there is set to "a<wait>a<wait>a" (see here) and then he's using cd_files with answer_files. That booted fine for me. Maybe you'd be interested in looking at that option as well.

@mahmoud-ashi thanks for confriming this and for the suggestion, seems like exactly the stable solution I'm looking for. I'm using cd_files too, it's just that I couldn't find a stable way to invoke the script at the right stage of the boot.

Feel free to watch #354 so you know when it is merged, I hope to do it soon. I will close this now, thanks again for your help.