Memory Exhaustion (OOM) running Windows 11 VM on 8GB Apple Silicon (M1)
- Dominant language
- Go
- Stars
- 21.9k
- Forks
- 957
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 53
Description
### Description
I am experiencing OOM issues when attempting to run a Windows 11 ARM64 VM on a MacBook Air M1 with 8GB ram. The virtualisation process consumes all available system memory, leading to a macOS "out of application memory" warning, forcing the process to be killed or suspended.
The Windows 11 VM should run reasonably well without exhausting host memory. According to [Microsoft's official Windows 11 minimum hardware requirements](https://learn.microsoft.com/en-us/windows/whats-new/windows-11-requirements), the OS requires only 4 GB of RAM and 2 cores.
### Environment
- Host OS: macOS Tahoe 26.5.1
- Host Hardware: MacBook Air M1, 8GB RAM
- Guest OS: Windows 11 ARM64
- Hypervisor/Emulator: QEMU (qemu-system-aarch64)
ha.stderr.log
```bash
{"level":"debug","msg":"Using internal driver \"qemu\"","time":"2026-07-18T23:33:09+05:30"}
{"level":"warning","msg":"`os: Windows` is experimental","time":"2026-07-18T23:33:09+05:30"}
{"level":"debug","msg":"Executing [hdiutil makehybrid -o /Users/ansumansahoo/.lima/windows-11/cidata.iso -iso -joliet -default-volume-name autounattend /var/folders/zs/sb6td3t52gscwv93jjh0pn6r0000gn/T/joliet2589291102]","time":"2026-07-18T23:33:09+05:30"}
{"level":"debug","msg":"Failed to detect CPU features. Assuming that AES acceleration is available on this Apple silicon.","time":"2026-07-18T23:33:09+05:30"}
{"level":"debug","msg":"OpenSSH version 10.2.1 detected, is GSSAPI supported: true","time":"2026-07-18T23:33:09+05:30"}
{"level":"debug","msg":"AES accelerator seems available, prioritizing aes128-gcm@openssh.com and aes256-gcm@openssh.com","time":"2026-07-18T23:33:09+05:30"}
{"level":"info","msg":"hostagent socket created at /Users/ansumansahoo/.lima/windows-11/ha.sock","time":"2026-07-18T23:33:09+05:30"}
{"level":"debug","msg":"Start udp DNS listening on: 127.0.0.1:64916","time":"2026-07-18T23:33:09+05:30"}
{"level":"debug","msg":"Start tcp DNS listening on: 127.0.0.1:49894","time":"2026-07-18T23:33:09+05:30"}
{"level":"debug","msg":"QEMU version 10.2.1 detected","time":"2026-07-18T23:33:10+05:30"}
{"level":"debug","msg":"firmware candidates = [/Users/ansumansahoo/.local/share/qemu/edk2-aarch64-code.fd /opt/homebrew/share/qemu/edk2-aarch64-code.fd /opt/homebrew/bin/share/edk2-aarch64-code.fd /usr/share/edk2/aarch64/QEMU_CODE.fd /usr/share/AAVMF/AAVMF_CODE.fd /usr/share/qemu-efi-aarch64/QEMU_EFI.fd]","time":"2026-07-18T23:33:10+05:30"}
{"level":"info","msg":"Using system firmware (`/opt/homebrew/share/qemu/edk2-aarch64-code.fd`)","time":"2026-07-18T23:33:10+05:30"}
{"level":"info","msg":"Starting swtpm for TPM emulation","time":"2026-07-18T23:33:10+05:30"}
{"level":"debug","msg":"swtpmCmd.Args: [/opt/homebrew/bin/swtpm socket --tpmstate dir=/Users/ansumansahoo/.lima/windows-11/swtpm --ctrl type=unixio,path=/Users/ansumansahoo/.lima/windows-11/swtpm.sock --tpm2 --terminate --log level=1]","time":"2026-07-18T23:33:10+05:30"}
{"level":"debug","msg":"Waiting for swtpm socket /Users/ansumansahoo/.lima/windows-11/swtpm.sock (attempt 0)","time":"2026-07-18T23:33:10+05:30"}
{"level":"debug","msg":"Waiting for swtpm socket /Users/ansumansahoo/.lima/windows-11/swtpm.sock (attempt 1)","time":"2026-07-18T23:33:10+05:30"}
{"level":"info","msg":"Starting QEMU (hint: to watch the boot progress, see `/Users/ansumansahoo/.lima/windows-11/serial*.log`)","time":"2026-07-18T23:33:10+05:30"}
{"level":"debug","msg":"qCmd.Args: [/opt/homebrew/bin/qemu-system-aarch64 -m 3072 -cpu host -machine virt,accel=hvf -smp 4,sockets=1,cores=4,threads=1 -drive if=pflash,format=raw,readonly=on,file=/opt/homebrew/share/qemu/edk2-aarch64-code.fd -drive file=/Users/ansumansahoo/.lima/windows-11/disk,if=virtio,discard=on -boot order=d,splash-time=0,menu=on -chardev socket,id=chrtpm,path=/Users/ansumansahoo/.lima/windows-11/swtpm.sock -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis-device,tpmdev=tpm0 -netdev user,id=net0,net=192.168.5.0/24,dhcpstart=192.168.5.15,hostfwd=tcp:127.0.0.1:49893-:22 -device virtio-net-pci,netdev=net0,mac=52:55:55:f6:bc:61 -device virtio-rng-pci -audiodev none,id=snd0 -display default -device ramfb -device virtio-keyboard-pci -device virtio-mouse-pci -device qemu-xhci,id=usb-bus -parallel none -chardev socket,id=char-serial,path=/Users/ansumansahoo/.lima/windows-11/serial.sock,server=on,wait=off,logfile=/Users/ansumansahoo/.lima/windows-11/serial.log -serial chardev:char-serial -chardev socket,id=char-serial-pci,path=/Users/ansumansahoo/.lima/windows-11/serialp.sock,server=on,wait=off,logfile=/Users/ansumansahoo/.lima/windows-11/serialp.log -device pci-serial,chardev=char-serial-pci -chardev socket,id=char-qmp,path=/Users/ansumansahoo/.lima/windows-11/qmp.sock,server=on,wait=off -qmp chardev:char-qmp -name lima-windows-11 -pidfile /Users/ansumansahoo/.lima/windows-11/qemu.pid]","time":"2026-07-18T23:33:10+05:30"}
{"level":"debug","msg":"send a key to QEMU to boot Windows ISO...","time":"2026-07-18T23:33:10+05:30"}
{"level":"info","msg":"Running in plain mode. Mounts, dynamic port forwarding, containerd, etc. will be ignored. Guest agent will not be running.","time":"2026-07-18T23:33:15+05:30"}
{"level":"info","msg":"Waiting for the essential requirement 1 of 1: `ssh`","time":"2026-07-18T23:33:15+05:30"}
{"level":"debug","msg":"executing script for windows \"ssh\"","time":"2026-07-18T23:33:15+05:30"}
{"level":"debug","msg":"executing ssh for script :/usr/bin/ssh [ssh -o ControlMaster=no -o ControlPath=none -o ControlPersist=no -F /dev/null -o IdentityFile=\"/Users/ansumansahoo/.lima/_config/user\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o GSSAPIAuthentication=no -o Ciphers=\"^aes128-gcm@openssh.com,aes256-gcm@openssh.com\" -o User=ansumansahoo -p 49893 127.0.0.1 -- PowerShell.exe -NoProfile -NonInteractive -Command \"if (Test-Path -Path 'C:\\ProgramData\\Lima\\lima-boot-done.txt' -PathType Leaf) { exit 0 } else { exit 1 }\"]","time":"2026-07-18T23:33:15+05:30"}
{"level":"debug","msg":"executing script for windows \"ssh\"","time":"2026-07-18T23:33:24+05:30"}
{"level":"debug","msg":"executing ssh for script :/usr/bin/ssh [ssh -o ControlMaster=no -o ControlPath=none -o ControlPersist=no -F /dev/null -o IdentityFile=\"/Users/ansumansahoo/.lima/_config/user\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o GSSAPIAuthentication=no -o Ciphers=\"^aes128-gcm@openssh.com,aes256-gcm@openssh.com\" -o User=ansumansahoo -p 49893 127.0.0.1 -- PowerShell.exe -NoProfile -NonInteractive -Command \"if (Test-Path -Path 'C:\\ProgramData\\Lima\\lima-boot-done.txt' -PathType Leaf) { exit 0 } else { exit 1 }\"]","time":"2026-07-18T23:33:24+05:30"}
{"level":"info","msg":"The essential requirement 1 of 1 is satisfied","time":"2026-07-18T23:33:33+05:30"}
{"level":"debug","msg":"Static port forwards: 0, Non-static port forwards: 0","time":"2026-07-18T23:33:33+05:30"}
```
Contributor guide
Research direction
Reproduce the Windows 11 ARM64 VM on the stated 8GB Apple Silicon setup, starting with the qemu-system-aarch64 command shown in the log and its -m 3072 setting. Compare host memory use during startup and determine a measurable memory-safety expectation; done means the VM no longer exhausts host memory under the reported conditions, with the relevant evidence or affected entry point documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos
- Domain
- infrastructure, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100