windows icon indicating copy to clipboard operation
windows copied to clipboard

failed to load Boot0002 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0xA,0x0)/Scsi(0x0,0x0): Not Found

Open banyet1 opened this issue 1 year ago • 23 comments

[root@ams3 windows]# docker-compose up [+] Running 1/0 ✔ Container windows Created 0.0s Attaching to windows windows | ❯ Starting Windows for Docker v2.04... windows | ❯ For support visit https://github.com/dockur/windows windows | windows | ❯ Booting Windows using QEMU emulator version 8.2.1 ... windows | qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000007H:EDX.invtsc [bit 8] windows | qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000007H:EDX.invtsc [bit 8] windows | BdsDxe: failed to load Boot0002 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0xA,0x0)/Scsi(0x0,0x0): Not Found windows | BdsDxe: loading Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0) windows | BdsDxe: starting Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0) windows exited with code 0 [root@ams3 windows]# docker-compose up [+] Running 1/0 ✔ Container windows Running 0.0s Attaching to windows windows exited with code 0 [root@ams3 windows]# docker-compose up [+] Running 1/0 ✔ Container windows Running 0.0s Attaching to windows windows exited with code 0 [root@ams3 windows]#

How can I fix this, Thanks.

banyet1 avatar Mar 08 '24 05:03 banyet1

Additional FYI:

Intel(R) Xeon(R) CPU D-1531 @ 2.20GHz CentOS9 stream running on KVM

Thanks.

banyet1 avatar Mar 08 '24 05:03 banyet1

I'd like to provide an access code if you are interested. Thanks.

banyet1 avatar Mar 08 '24 05:03 banyet1

That boot error is normal, because before Windows is installed the harddrive is empty and it boot from CDROM to do the install. But that the container exits is not normal.

This seems to be an issue with QEMU on CentOS. Or at least I noticed that every user that has this problem is using CentOS. So Im afraid its only the QEMU or CentOS team who can fix this.

kroese avatar Mar 09 '24 09:03 kroese

I now created a new release (v2.05) which should provide more error info in your case. Can you please try and see if it reports more info? And if not, can you try setting:

environment:
  CONSOLE: "Y"

in your compose file, and see if outputs more info?

kroese avatar Mar 11 '24 13:03 kroese

Sure, will do within hours.

On Mon, Mar 11, 2024 at 9:27 PM Kroese @.***> wrote:

I now created a new release (v2.05) which should provide more error info in your case. Can you please try and see if it reports more info? And if not, can you try setting:

environment: CONSOLE: "Y"

in your compose file, and see if outputs more info?

— Reply to this email directly, view it on GitHub https://github.com/dockur/windows/issues/231#issuecomment-1988441027, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALL2EOHEXQI34TP2ORTUD7LYXWWL3AVCNFSM6AAAAABEMHZWY6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBYGQ2DCMBSG4 . You are receiving this because you authored the thread.Message ID: @.***>

-- Bien cordialement. Best Regard and Many Thanks.

banyet1 avatar Mar 11 '24 13:03 banyet1

Also, I see that your CPU has troubles with the Hyper-V enlightments, so I also recommend setting:

environment:
  HV: "N"

in your compose file, to get rid of those host doesn't support requested feature warnings.

kroese avatar Mar 11 '24 13:03 kroese

Just done without luck.

windows | ❯ Extracting Windows 11 bootdisk... windows | ❯ Extracting Windows 11 environment... windows | ❯ Extracting Windows 11 setup... windows | ❯ Extracting Windows 11 image... windows | ❯ Adding XML file for automatic installation... windows | ❯ Building Windows 11 image... windows | ❯ Creating a 64G growable disk image in raw format... windows | ❯ Booting Windows using QEMU emulator version 8.2.1 ... windows | char device redirected to /dev/pts/0 (label serial0) windows exited with code 0

[root@ams3 windows]# cat docker-compose.yml version: "3" services: windows: image: ghcr.io/dockur/windows:2.05 container_name: windows devices: - /dev/kvm cap_add: - NET_ADMIN ports: - 8006:8006 - 3389:3389/tcp - 3389:3389/udp stop_grace_period: 2m restart: on-failure environment: CONSOLE: "Y" HV: "N"

Since I failed to install Windows on Docker, I reviewed the documents and noticed that KVM is essential. So, I used KVM to install Windows on a KVM host, and it's running smoothly.

I'm baffled, if the virtual machine itself supports KVM (verified by lscpu), you can directly install Windows using KVM; if the virtual machine itself does not support KVM, you can still install it using QEMU mode, but it will be very slow. I assume Docker would have this issue as well. So, what are the advantages of using Docker?

Thanks.

banyet1 avatar Mar 11 '24 14:03 banyet1

BTW:

I'm switch to other KVM host and give it a try and without any luck.

[root@kvm windows]# lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s): 4 NUMA node(s): 1 Vendor ID: AuthenticAMD CPU family: 23 Model: 49 Model name: AMD EPYC-Rome Processor Stepping: 0 CPU MHz: 3593.250 BogoMIPS: 7186.50 Virtualization: AMD-V Hypervisor vendor: KVM Virtualization type: full L1d cache: 64K L1i cache: 64K L2 cache: 512K NUMA node0 CPU(s): 0-3 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw perfctr_core ssbd ibpb stibp vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr wbnoinvd arat npt lbrv nrip_save tsc_scale vmcb_clean pausefilter pfthreshold umip rdpid arch_capabilities [root@kvm windows]# [root@kvm windows]# docker-compose up [+] Running 1/0 ✔ Container windows Created 0.0s Attaching to windows windows | ❯ Starting Windows for Docker v2.05... windows | ❯ For support visit https://github.com/dockur/windows windows | windows | ❯ Booting Windows using QEMU emulator version 8.2.1 ... windows | char device redirected to /dev/pts/0 (label serial0) windows exited with code 0

banyet1 avatar Mar 11 '24 15:03 banyet1

Is that also on CentOS?

kroese avatar Mar 11 '24 15:03 kroese

Yes, but this time is CentOS 8 Stream.

banyet1 avatar Mar 11 '24 15:03 banyet1

I've installed Windows via KVM successfully [root@kvm ~]# virsh list --all Id Name State fra shut off

banyet1 avatar Mar 11 '24 15:03 banyet1

Every time someone reports this problem, they are using CentOS (8 or 9). So I really think this is some problem between CentOS and QEMU or CentOS and KVM. I am using Ubuntu myself, so I have no way to figure out what is going wrong.

kroese avatar Mar 11 '24 15:03 kroese

Thanks, could you delight me:

Since I failed to install Windows on Docker, I reviewed the documents and noticed that KVM is essential. So, I used KVM to install Windows on a KVM host, and it's running smoothly.

I'm baffled, if the virtual machine itself supports KVM (verified by lscpu), you can directly install Windows using KVM; if the virtual machine itself does not support KVM, you can still install it using QEMU mode, but it will be very slow. I assume Docker would have this issue as well. So, what are the advantages of using Docker?

Thanks.

banyet1 avatar Mar 11 '24 15:03 banyet1

There is no advantage of using Docker compared to a "real" VM. It just that it should be easier to install. But if you know how to create a VM then it has no advantage.

kroese avatar Mar 11 '24 15:03 kroese

Thank you very much. From your project, I am convinced that KVM can be used for nested installation of Windows. I had always thought this was not possible, which is very important to me.

banyet1 avatar Mar 11 '24 15:03 banyet1

4685824K ........ ........ ........ ........ 99% 46.4M 1s
4718592K ........ ........ ........ ........ 99% 46.4M 0s
4751360K .....                              100% 46.0M=1m41s
❯ Extracting Windows 11 bootdisk...
❯ Extracting Windows 11 environment...
❯ Extracting Windows 11 setup...
❯ Extracting Windows 11 image...
❯ Adding XML file for automatic installation...
❯ Building Windows 11 image...
❯ Creating a 64G growable disk image in raw format...
❯ Booting Windows using QEMU emulator version 8.2.1 ...
3h3h3hBdsDxe: failed to load Boot0002 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0xA,0x0)/Scsi(0x0,0x0): Not Found
BdsDxe: loading Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)
BdsDxe: starting Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)
❯ ERROR: Forcefully terminating Windows, reason: 0...
❯ Shutdown completed!


❯ Starting Windows for Docker v2.04...
❯ For support visit https://github.com/dockur/windows
❯ Booting Windows using QEMU emulator version 8.2.1 ...
3h3h3hBdsDxe: failed to load Boot0002 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0xA,0x0)/Scsi(0x0,0x0): Not Found
BdsDxe: loading Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)
BdsDxe: starting Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)
❯ ERROR: Forcefully terminating Windows, reason: 0...
❯ Shutdown completed!

I have the same problem.

I'm using Debian 12. Could it be due to the BTFS filesystem?

Jorritooo avatar Mar 11 '24 17:03 Jorritooo

I started over. I restored yesterday's snapshot. Fresh installation of docker and portainer. Debian 12

Yaml file:

version: "3"
services:
  windows:
    image: dockurr/windows
    container_name: windowspro11
    devices:
      - /dev/kvm
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 3389:3389/tcp
      - 3389:3389/udp
    stop_grace_period: 2m
    restart: on-failure
    environment:
      RAM_SIZE: "8G"
      CPU_CORES: "4"
      CONSOLE: "Y"

Log file:

❯ Starting Windows for Docker v2.05...
❯ For support visit https://github.com/dockur/windows
❯ Downloading Windows 11...
[i] Downloading Windows media from official Microsoft servers...
[i] Downloading Windows 11...
[!] Microsoft blocked the automated download request based on your IP address. Please check the FAQ on how to boot from a local file and manually download this ISO in a web browser here: https://www.microsoft.com/en-us/software-download/windows11
[!] 1 attempted download(s) failed! Please re-run Mido with these arguments to try downloading again (any partial downloads will be resumed): win11x64
[+] Finished! Please see the above errors with information
❯ Failed to download Windows 11 using Mido, will try a different method now...
❯ Downloading product information from Microsoft...
❯ Downloading Windows 11...
     0K ........ ........ ........ ........  0% 67.2M 69s
 32768K ........ ........ ........ ........  1% 46.1M 84s
( ... )
4751360K .....                              100% 38.2M=1m42s
❯ Extracting Windows 11 bootdisk...
❯ Extracting Windows 11 environment...
❯ Extracting Windows 11 setup...
❯ Extracting Windows 11 image...
❯ Adding XML file for automatic installation...
❯ Building Windows 11 image...
❯ Creating a 64G growable disk image in raw format...
❯ Booting Windows using QEMU emulator version 8.2.1 ...
char device redirected to /dev/pts/0 (label serial0)

Jorritooo avatar Mar 11 '24 19:03 Jorritooo

@Jorritooo Can you remove the CONSOLE: "Y" line and try with the new version v2.06? I think I may have fixed it finally

kroese avatar Mar 12 '24 00:03 kroese

same issue happened in windows-arm

console error msg:

windows | ❯ Booting Windows using QEMU emulator version 8.2.1 ... windows | /run/entry.sh: line 27: exec: qemu-system-x86_64: not found windows exited with code 127

xellosiris avatar Mar 12 '24 11:03 xellosiris

I got the same result as @Jorritooo , but with the new version 2.0.6. When I use CONSOLE: "Y", the container stops immediately after "char device redirected to /dev/pts/0 (label serial0)". Without it, I now get to the reboot after the first step of the installation process.

3899392K ........ ........ ........ ........ 96%  135M 1s
3932160K ........ ........ ........ ........ 97% 92.5M 1s
3964928K ........ ........ ........ ........ 98%  135M 1s
3997696K ........ ........ ........ ........ 99%  135M 0s
4030464K ........ ........ ........ ........ 99% 73.6M 0s
4063232K ...                                100%  136M=32s

❯ Extracting Windows 10 bootdisk...
❯ Extracting Windows 10 environment...
❯ Extracting Windows 10 setup...
❯ Extracting Windows 10 image...
❯ Adding XML file for automatic installation...
❯ Building Windows 10 image...
❯ Creating a 64G growable disk image in raw format...
❯ Booting Windows using QEMU emulator version 8.2.1 ...

3h3h3hBdsDxe: failed to load Boot0002 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0xA,0x0)/Scsi(0x0,0x0): Not Found
BdsDxe: loading Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)
BdsDxe: starting Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)
❯ ERROR: Forcefully terminating Windows, reason: 0...
3h❯ Shutdown completed!

Running Docker 25.0.4 on a VM running Ubuntu 22.04.4 LTS under Proxmox VE 8.1. I thought Windows 10 might be less demanding on CPU or other constraints, but it works the same as Win11 (i.e.: not).

BTW: I got rid of the "windows | qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000007H:EDX.invtsc [bit 8]" warning by creating a new entry in /etc/pve/virtual-guest/cpu-models.conf for Proxmox like this:

cpu-model: mine
    flags +invtsc
    phys-bits host
    hidden 0
    hv-vendor-id AuthenticAMD
    reported-model host

and then selecting that CPU model (custom-mine) for the Docker VM.

meyergru avatar Mar 12 '24 12:03 meyergru

dosen't work in 2.06 i try docker compose up dosen't work

> BdsDxe: failed to load Boot0002 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0xA,0x0)/Scsi(0x0,0x0): Not Found
> windows  | BdsDxe: loading Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)
> windows  | BdsDxe: starting Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)
> windows  | KVM: entry failed, hardware error 0xffffffff
> windows  | EAX=00000000 EBX=7bee6638 ECX=000000b2 EDX=000000b2
> windows  | ESI=00000000 EDI=0000007a EBP=7bee65a0 ESP=7bee6578
> windows  | EIP=00008000 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=1 HLT=0
> windows  | ES =0000 00000000 ffffffff 00809300
> windows  | CS =bf00 7ffbf000 ffffffff 00809300
> windows  | SS =0000 00000000 ffffffff 00809300
> windows  | DS =0000 00000000 ffffffff 00809300
> windows  | FS =0000 00000000 ffffffff 00809300
> windows  | GS =0000 00000000 ffffffff 00809300
> windows  | LDT=0000 00000000 00000000 00000000
> windows  | TR =0040 cc9df000 00000067 00008b00
> windows  | GDT=     cc9e0fb0 00000057
> windows  | IDT=     00000000 00000000
> windows  | CR0=00050032 CR2=95e517f8 CR3=39e6b000 CR4=00000000
> windows  | DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 
> windows  | DR6=00000000ffff0ff0 DR7=0000000000000400
> windows  | EFER=0000000000000000
> windows  | Code=qemu-system-x86_64: hw/core/cpu-sysemu.c:76: cpu_asidx_from_attrs: Assertion `ret < cpu->num_ases && ret >= 0' failed.
> windows  | ❯ ERROR: Forcefully terminating Windows, reason: 0...
> windows  | ❯ Shutdown completed!
> windows exited with code 0

SaskueUchiwa avatar Mar 12 '24 16:03 SaskueUchiwa

@Jorritooo Can you remove the CONSOLE: "Y" line and try with the new version v2.06? I think I may have fixed it finally

I've removed "console: y"

❯ Starting Windows for Docker v2.06...
( ... )
( ... )

4751360K .....                              100% 43.7M=1m44s
❯ Extracting Windows 11 bootdisk...
❯ Extracting Windows 11 environment...
❯ Extracting Windows 11 setup...
❯ Extracting Windows 11 image...
❯ Adding XML file for automatic installation...
❯ Building Windows 11 image...
❯ Creating a 64G growable disk image in raw format...
❯ Booting Windows using QEMU emulator version 8.2.1 ...
3h3h3hBdsDxe: failed to load Boot0002 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0xA,0x0)/Scsi(0x0,0x0): Not Found
BdsDxe: loading Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)
BdsDxe: starting Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)
❯ ERROR: Forcefully terminating Windows, reason: 0...
❯ Shutdown completed!

If i reboot and look at the VNC i see the screen turn purple and text "setup" for about 0,5 seconds before it crashes

Jorritooo avatar Mar 12 '24 18:03 Jorritooo

I don't know what is more strange. The most default yaml file seems to work. It even uses the official Microsoft download link. 20 minuets ago it used the alternative download.

Don't know, i think it most be something whit the environment setup that goes wrong. I've increased both to the max.

Jorritooo avatar Mar 12 '24 18:03 Jorritooo

I have same issue.

host: Windows 11 Pro 22H2 + docker desktop 4.28.0

docker-compose:

version: "3"
services:
  windows:
    image: dockurr/windows
    container_name: windows
    devices:
      - /dev/kvm
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 3389:3389/tcp
      - 3389:3389/udp
    stop_grace_period: 2m
    volumes:
      - ./storage:/storage
    restart: on-failure

i use custom.iso: "..\storage\custom.iso" It successfully builds:

storage:

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
da----         13-Mar-24   2:40 PM                shared
-a----         13-Mar-24   2:40 PM     6707564544 custom.iso
-a----         13-Mar-24   2:40 PM    68719476736 data.img
-a----         13-Mar-24   2:40 PM             18 windows.mac
-a----         13-Mar-24   2:40 PM        3653632 windows.rom
-a----         13-Mar-24   2:40 PM         540672 windows.vars
-a----         13-Mar-24   2:40 PM              5 windows.ver

container logs:

BdsDxe: failed to load Boot0002 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0xA,0x0)/Scsi(0x0,0x0): Not Found
2024-03-13 14:40:53 BdsDxe: loading Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)
2024-03-13 14:40:53 BdsDxe: starting Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)
2024-03-13 14:41:01 KVM: entry failed, hardware error 0xffffffff
2024-03-13 14:41:01 EAX=00000000 EBX=f2f2eff8 ECX=000000b2 EDX=000000b2
2024-03-13 14:41:01 ESI=00000000 EDI=0000007a EBP=f2f2ef60 ESP=f2f2ef38
2024-03-13 14:41:01 EIP=00008000 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=1 HLT=0
2024-03-13 14:41:01 ES =0000 00000000 ffffffff 00809300
2024-03-13 14:41:01 CS =bd00 7ffbd000 ffffffff 00809300
2024-03-13 14:41:01 SS =0000 00000000 ffffffff 00809300
2024-03-13 14:41:01 DS =0000 00000000 ffffffff 00809300
2024-03-13 14:41:01 FS =0000 00000000 ffffffff 00809300
2024-03-13 14:41:01 GS =0000 00000000 ffffffff 00809300
2024-03-13 14:41:01 LDT=0000 00000000 00000000 00000000
2024-03-13 14:41:01 TR =0040 7dedd000 00000067 00008b00
2024-03-13 14:41:01 GDT=     7dedefb0 00000057
2024-03-13 14:41:01 IDT=     00000000 00000000
2024-03-13 14:41:01 CR0=00050032 CR2=5524bc5c CR3=0d8ee000 CR4=00000000
2024-03-13 14:41:01 DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 
2024-03-13 14:41:01 DR6=00000000ffff0ff0 DR7=0000000000000400
2024-03-13 14:41:01 EFER=0000000000000000
2024-03-13 14:41:01 Code=qemu-system-x86_64: hw/core/cpu-sysemu.c:76: cpu_asidx_from_attrs: Assertion `ret < cpu->num_ases && ret >= 0' failed.
2024-03-13 14:41:01 KVM: entry failed, hardware error 0xffffffff
2024-03-13 14:41:04 ❯ Shutdown completed!
2024-03-13 14:41:02 ❯ ERROR: Forcefully terminating Windows, reason: 0...

D1ssolve avatar Mar 13 '24 07:03 D1ssolve

As per what I can find in Google this cpu_asidx_from_attrs: Assertion ret < cpu->num_ases && ret >= 0 failed. error some of you have, can occur with older Intel processors because of tdp_mmu being enabled by default on newer kernels.

To disable tdp_mmu you can add the following command to your kernel parameters: kvm.tdp_mmu=N in the Linux bootloader.

Check that it's disabled by running cat /sys/module/kvm/parameters/tdp_mmu

Another way to workaround it would be turn off 'Secure Boot' in the Windows VM, but currently I have not added any option to do that. In the next version I will add this flag.

kroese avatar Mar 13 '24 08:03 kroese

Device specification:

Processor	AMD Ryzen 7 7745HX with Radeon Graphics           3.60 GHz
Installed RAM	32.0 GB (31.7 GB usable)
System type	64-bit operating system, x64-based processor

Windows specification:

Edition	Windows 11 Pro
Version	22H2
OS build	22621.3155

How can i do this on windows ? To disable tdp_mmu you can add the following command to your kernel parameters: kvm.tdp_mmu=N in the Linux bootloader.

D1ssolve avatar Mar 13 '24 08:03 D1ssolve

@D1ssolve I added the flag now. Can you pull the new version (v2.07) and set:

environment:
  HV: "N"
  BOOT_MODE: "windows_plain"

in your compose file or

-e "HV=N" -e "BOOT_MODE=windows_plain"

in your run command and see if it changes anything? It disables Secure Boot + TPM + Hyper-V and it might make a difference for you.

kroese avatar Mar 13 '24 09:03 kroese

Two things:

  1. For me, still no luck with 2.07 and "windows_plain". I think the VM is resetting after finnishing "Copying Window files" during "Getting files ready for installation", it never makes it to the next steps, then the reboot fails - this got me thinking again.

  2. Now this the good news: I finally got it to work and it was dead simple: I had too little memory allocated on my Docker host. I bet this is the reason for this failure in almost 50% of cases: Since there are other things running on Docker as well, it may simply be the lack of free memory that does this. In all cases, there is a reboot and then, since the installation has not yet installed the neccessary things, the reboot just fails.

I first had a lack of free disk space, which caused another error. So, @kroese: If it is possible, you should check for free memory and available disk space before you even try to fetch the ISO.

meyergru avatar Mar 13 '24 12:03 meyergru

@kroese Great. It resolved my issue, thanks

D1ssolve avatar Mar 13 '24 12:03 D1ssolve

@meyergru You can set the maximum allowed memory like this:

environment:
  RAM_SIZE: "2G"

for a maximum of 2 GB.

There is not really a good way I can check if there is enough in the script, as it is a maximum,so it might need much less. And refusing to boot with an error is a bit harsh in that case because I do not know how much Windows will need.

If you are low on memory the best is to set the maximum pretty low, so Windows will never try to use more memory than is available.

As for the diskspace, this I already check but only for space for the ISO files. The space for the Windows install I cannot check, because I cannot know in advance how much Windows is going to use (same as the memory).

kroese avatar Mar 13 '24 12:03 kroese