帮助用户在 Docker 中创建、管理并通过 SSH 连接无头 Windows 11 虚拟机。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "windows-vm" 技能: 1. 下载 https://raw.githubusercontent.com/obra/superpowers-lab/main/skills/windows-vm/SKILL.md 2. 保存为 ~/.claude/skills/windows-vm/SKILL.md 3. 装好后重载技能,告诉我可以用了
请帮我启动一个新的无头 Windows 11 Docker 虚拟机,并告诉我 SSH 连接方式与可用状态。
返回虚拟机已启动的状态、连接信息,以及后续可执行的管理操作。
请重启当前的 Windows 虚拟机,并检查它是否已正常恢复运行,输出最新状态。
返回重启结果、当前运行状态,以及是否可以继续通过 SSH 连接。
请提供连接这个 Windows 11 虚拟机的 SSH 命令、必要参数,以及连接前需要确认的事项。
返回可直接使用的 SSH 连接命令、参数说明和连接前检查清单。
Manage a headless Windows 11 VM running via dockur/windows in Docker with KVM acceleration. The VM is accessible via SSH only — no RDP or GUI required.
/dev/kvm must exist — check with ls /dev/kvm)sshpass (sudo apt install sshpass)imagemagick (optional, for screenshot debugging: sudo apt install imagemagick)windows11$HOME/windows-vm/
storage/ — VM disk image (managed by dockur, wiped on recreate)iso/win11x64.iso — cached Windows ISO (7.3GB, persists across recreates)oem/install.bat — post-install script (installs OpenSSH Server)localhost:2222 (bound to 127.0.0.1 only)localhost:3389 (bound to 127.0.0.1 only, fallback)localhost:8006 (VNC in browser, for debugging)Ensure directories exist:
mkdir -p "$HOME/windows-vm/oem" "$HOME/windows-vm/storage" "$HOME/windows-vm/iso"
Ensure $HOME/windows-vm/oem/install.bat exists with OpenSSH setup:
@echo off
echo Installing OpenSSH Server...
powershell -Command "Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0" 2>nul
powershell -Command "Get-WindowsCapability -Online -Name OpenSSH.Server* | Add-WindowsCapability -Online" 2>nul
dism /Online /Add-Capability /CapabilityName:OpenSSH.Server~~~~0.0.1.0 2>nul
powershell -Command "Start-Service sshd" 2>nul
powershell -Command "Set-Service -Name sshd -StartupType Automatic"
powershell -Command "New-ItemProperty -Path 'HKLM:\SOFTWARE\OpenSSH' -Name DefaultShell -Value 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' -PropertyType String -Force"
powershell -Command "New-NetFirewallRule -Name 'OpenSSH-Server' -DisplayName 'OpenSSH Server' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22"
powershell -Command "Get-Service sshd" 2>nul
echo Done.
If recreating, remove the old container and disk:
docker stop windows11 && docker rm windows11
rm -f "$HOME/windows-vm/storage/data.img"
Launch the container. There are two cases:
If cached ISO exists ($HOME/windows-vm/iso/win11x64.iso):
docker run -d \
--name windows11 \
-p 127.0.0.1:3389:3389 \
-p 127.0.0.1:2222:22 \
-p 127.0.0.1:8006:8006 \
-e RAM_SIZE="8G" \
-e CPU_CORES="4" \
-e DISK_SIZE="64G" \
-e USERNAME="user" \
-e PASSWORD="password" \
--cap-add NET_ADMIN \
--device /dev/kvm \
-v "$HOME/windows-vm/storage:/storage" \
-v "$HOME/windows-vm/oem:/oem" \
-v "$HOME/windows-vm/iso/win11x64.iso:/boot.iso" \
dockurr/windows
First time (no cached ISO) — omit the /boot.iso mount and add VERSION:
docker run -d \
--name windows11 \
-p 127.0.0.1:3389:3389 \
-p 127.0.0.1:2222:22 \
-p 127.0.0.1:8006:8006 \
-e RAM_SIZE="8G" \
-e CPU_CORES="4" \
-e DISK_SIZE="64G" \
-e VERSION="win11" \
-e USERNAME="user" \
-e PASSWORD="password" \
--cap-add NET_ADMIN \
--device /dev/kvm \
-v "$HOME/windows-vm/storage:/storage" \
-v "$HOME/windows-vm/oem:/oem" \
dockurr/windows
After the ISO downloads and Windows boots, immediately copy the ISO out before
the container is ever stopped (dockur wipes /storage on recreate):
cp "$HOME/windows-vm/storage/win11x64.iso" "$HOME/windows-vm/iso/win11x64.iso"
Wait for Windows install + OpenSSH setup to complete. This takes 20-30 minutes for a fresh install (the OEM install.bat runs at the end of Windows OOBE and downloads OpenSSH from Microsoft, which is slow). Monitor with:
…
帮助你通过 tmux 控制需实时交互的命令行会话,安全运行编辑器、REPL 和交互式 Git 操作。
按需通过 mcp CLI 调用 MCP 服务,发现工具与资源而不预加载上下文
帮助你审计代码库,找出语义重复但命名或实现不同的函数
用于在当前会话中拆分并并行推进独立实现任务,加快开发执行效率。
在开发分支完成并通过测试后,帮助选择合并、提 PR 或清理收尾方案。
帮助你创建、修改并在发布前验证 AI 技能配置与可用性
帮助用户远程在 Windows 机器上执行命令、管理文件并获取截图与剪贴板内容。
用自然语言管理 VPS、域名、DNS 记录和 SSH 密钥,简化运维操作。
通过 vmrun 命令统一控制 VMware 虚拟机生命周期、来宾执行与文件操作。
让 AI 代理在 Windows 中执行文件、应用与界面操作及测试任务
通过 SSH 在远程 Linux 主机执行命令,并支持日志记录与独立运行。
通过 SSH 管理 VPS,执行命令、传输文件、管理 Docker 并维护服务器文档。