Repository navigation
Fix Windows VM launch never opening an RDP window - #6893
Merged
Merged
Conversation
docker logs retains output across stop/start, so grepping the whole log matched "Windows started successfully" from an earlier boot and returned immediately, firing xfreerdp3 while the guest was still booting. Anchor the scan to the container's current StartedAt, and run it even when the container was already running, since the image restarts the guest in place on reboot.
FreeRDP 3 attempts Kerberos before NTLM for NLA, and Arch's stock /etc/krb5.conf declares default_realm = ATHENA.MIT.EDU, so every launch tries to reach MIT's KDC. Off the network each attempt blocks ~23s and xfreerdp3 sits in CLOSE-WAIT without drawing a window, which reads as the VM failing to start. Point FreeRDP at a realm-less krb5 config so it falls through to NTLM, which is what the local Windows account uses anyway.
Contributor
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
A failed docker inspect left STARTED_AT empty, and docker logs drops the --since filter when it is, putting the scan back on the whole retained log and its stale success line. Sampling per poll also keeps the window on the current boot if the container restarts mid-wait. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
dhh
added a commit
that referenced
this pull request
Aug 23, 2026
* Wait for the current Windows boot before connecting RDP docker logs retains output across stop/start, so grepping the whole log matched "Windows started successfully" from an earlier boot and returned immediately, firing xfreerdp3 while the guest was still booting. Anchor the scan to the container's current StartedAt, and run it even when the container was already running, since the image restarts the guest in place on reboot. * Skip Kerberos when connecting to the Windows VM FreeRDP 3 attempts Kerberos before NTLM for NLA, and Arch's stock /etc/krb5.conf declares default_realm = ATHENA.MIT.EDU, so every launch tries to reach MIT's KDC. Off the network each attempt blocks ~23s and xfreerdp3 sits in CLOSE-WAIT without drawing a window, which reads as the VM failing to start. Point FreeRDP at a realm-less krb5 config so it falls through to NTLM, which is what the local Windows account uses anyway. * Re-read the container start time on every readiness poll A failed docker inspect left STARTED_AT empty, and docker logs drops the --since filter when it is, putting the scan back on the whole retained log and its stale success line. Sampling per poll also keeps the window on the current boot if the container restarts mid-wait. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: David Heinemeier Hansson <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit 75b99f7)
Closed
nick1udwig
pushed a commit
to nick1udwig/omarchy
that referenced
this pull request
Sep 9, 2026
* Wait for the current Windows boot before connecting RDP docker logs retains output across stop/start, so grepping the whole log matched "Windows started successfully" from an earlier boot and returned immediately, firing xfreerdp3 while the guest was still booting. Anchor the scan to the container's current StartedAt, and run it even when the container was already running, since the image restarts the guest in place on reboot. * Skip Kerberos when connecting to the Windows VM FreeRDP 3 attempts Kerberos before NTLM for NLA, and Arch's stock /etc/krb5.conf declares default_realm = ATHENA.MIT.EDU, so every launch tries to reach MIT's KDC. Off the network each attempt blocks ~23s and xfreerdp3 sits in CLOSE-WAIT without drawing a window, which reads as the VM failing to start. Point FreeRDP at a realm-less krb5 config so it falls through to NTLM, which is what the local Windows account uses anyway. * Re-read the container start time on every readiness poll A failed docker inspect left STARTED_AT empty, and docker logs drops the --since filter when it is, putting the scan back on the whole retained log and its stale success line. Sampling per poll also keeps the window on the current boot if the container restarts mid-wait. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: David Heinemeier Hansson <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6882.
omarchy-windows-vm launchstarts the container and then exits without ever opening an RDP window. From the user's side the VM just appears to refuse to start, andTerminal=falseon the desktop entry hides every error. Two independent causes, one commit each.Wait for the current Windows boot before connecting RDP
docker logsretains output acrossdocker stop/docker startand is only cleared when the container is removed, so any container that outlives a session already holdsWindows started successfullylines from previous boots. The readiness loop matched one of those on its first iteration and firedxfreerdp3about a second afterdocker compose up -d, while the guest was still in firmware. On the affected machine the guest needs ~30s to reach that message, so the client was starting ~29s early.The wait was also skipped entirely when the container was already running, which is not the same as the guest being up: the image restarts Windows in place whenever it reboots.
Anchoring the scan to
.State.StartedAtand running it unconditionally covers both.Skip Kerberos when connecting to the Windows VM
FreeRDP 3 attempts Kerberos before NTLM for NLA, and Arch's
krb5ships/etc/krb5.confas the upstream MIT sample withdefault_realm = ATHENA.MIT.EDU. Every launch therefore tries to reach MIT's KDC:Cannot contact any KDC for realm 'ATHENA.MIT.EDU') andxfreerdp3sits inCLOSE-WAITwithout drawing a windowSame symptom as the first bug, unrelated cause. This is the root cause behind #4365, which was closed without a change here. Pointing
KRB5_CONFIGat a realm-less config makes Kerberos fail instantly and hands the connection to NTLM, which is what the local Windows account uses anyway. The config is written next todocker-compose.ymlon first launch and left alone afterwards, so a user who does want Kerberos can edit it.Verification
Measured on Omarchy 4.0.0, i9-12900H, freerdp 2:3.30.0-2, dockurr/windows v5.16, cold container start each time:
./test/allshows the same 5 pre-existing failures on this branch and on a cleanquattrocheckout (bar-icon-geometry, and threeomarchy-pkgscheckout tests that need the sibling repo).test/shell.d/windows-vm-test.shpasses.Not addressed here
launchstill treats "RDP client exited" as "user is done" and stops the VM, so a connection failure silently tears the VM down — that is #5202 and wants its own change.