You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows VM: omarchy-windows-vm launch fails silently ("Failed to start Windows VM") when the shared-folder anchor has the setgid bit set #10149
After installing and running the Windows VM (omarchy-windows-vm install → omarchy-windows-vm launch), a lateromarchy-windows-vm launch can start failing with only:
Starting Windows VM (this may prompt for authorization)...
❌ Failed to start Windows VM!
Try checking: omarchy-windows-vm status
omarchy-windows-vm status shows the container is still RUNNING, and docker logs confirms Windows booted fine — so this isn't actually a VM start failure, it's the privileged up_wait helper aborting before it even touches Docker.
Root cause
prepare_caller_mounts() requires both mount-anchor directories to be exactly mode 700:
The shared anchor (bind-mounted into the guest as /shared for the Samba share) ends up with mode 2700 (setgid bit set) after normal use from inside the Windows guest — this looks like legitimate behavior from the guest's SMB client/server touching the folder, not tampering. Once that happens, every subsequent up_wait/up call fails this strict == 700 comparison and aborts.
The bigger issue: none of the failure paths here print anything to stderr, so the wrapper's launch_windows() just prints the generic "Failed to start Windows VM!" with zero indication of why. Tracing it required running pkexec bash -x /usr/bin/omarchy-windows-vm __priv up_wait to find the actual [[ 2700 != 700 ]] comparison.
Steps to reproduce
omarchy-windows-vm install and let Windows finish setting up.
Use the VM for a while (browse the shared/Windows folder from inside the guest) so the setgid bit gets set on the host-side shared anchor.
Close RDP (VM auto-stops), then omarchy-windows-vm launch again.
Observe the opaque "Failed to start Windows VM!" message even though nothing is actually wrong with Docker/the container.
Workaround
chmod g-s /home/<user>/Windows # or wherever the shared folder points
omarchy-windows-vm launch
(Path found via findmnt -T /var/lib/omarchy/windows/mounts/users/<uid>/shared.)
Suggested fix
Either:
mask off the setgid/setuid/sticky bits before comparing (mode=$(( 8#$mode & 0777 )) or compare against a pattern that ignores the leading digit) instead of a strict == 700/== 700, since the guest's own Samba usage legitimately sets it, or
have prepare_caller_mounts re-clear the bit itself (it already does chmod 0700 on both fds earlier in the function — but the later comparison still reads the fd's mode via stat, and that chmod apparently doesn't stick for the shared fd, worth double-checking why), and/or
at minimum, echo the specific failing check to stderr so launch_windows can surface something more actionable than "Failed to start Windows VM!".
Automated duplication check: this issue looks similar to #9334, which covers the same Windows VM setgid permission check. I keep that one open and close this one to keep the discussion in one place.
If you feel this is the wrong decision, please open the issue again with a note on the difference.
Update: #12323 has merged into quattro. The setgid permission rejection is now fixed in both source-directory hardening paths, with an explicit mode diagnostic. This does not claim that runtime share privacy or every desktop failure notification is fixed.
Scope checked by GPT-6 in Codex and Codex Medium against the discussion and landed change; review independence is not guaranteed. No tests were rerun for this cleanup.
Activity
windows-vm: actually clear setgid on the shared/storage source before…
windows-vm: actually clear setgid on the shared/storage source before…
bjarneo commentedon Sep 20, 2026
Automated duplication check: this issue looks similar to #9334, which covers the same Windows VM setgid permission check. I keep that one open and close this one to keep the discussion in one place.
If you feel this is the wrong decision, please open the issue again with a note on the difference.
omarchybot commentedon Oct 4, 2026
Update: #12323 has merged into
quattro. The setgid permission rejection is now fixed in both source-directory hardening paths, with an explicit mode diagnostic. This does not claim that runtime share privacy or every desktop failure notification is fixed.Scope checked by GPT-6 in Codex and Codex Medium against the discussion and landed change; review independence is not guaranteed. No tests were rerun for this cleanup.
Omabot on behalf of DHH