Install
openclaw skills install @sdk-team/alibabacloud-ecs-windows-os-troubleshootingTroubleshoot and repair Alibaba Cloud ECS Windows instances from inside the GuestOS or remotely via Cloud Assistant. Use whenever the user reports any Windows symptom or asks for a health check on an ECS Windows instance, even vague ones like "check this machine": boot failures (BSOD, black screen, boot loop, stuck at logo), crashes and hangs, RDP/VNC login failures, network problems (internet access, ping, DNS, DHCP, firewall, SMB), a port unreachable from outside while the service is running (8080, 3389), inbound firewall port blocking, disk and storage, Windows activation, Windows Update, time synchronization, user accounts and permissions, BitLocker, drivers, application crashes, certificates and TLS, scheduled tasks, slow performance, configuration not taking effect, Cloud Assistant and management channel issues. Supports online diagnosis (running system) and offline diagnosis (faulty system disk mounted as a data disk) via a direct in-GuestOS channel or remote aliyun ecs run-command.
openclaw skills install @sdk-team/alibabacloud-ecs-windows-os-troubleshootingThis skill performs anomaly troubleshooting and diagnosis for Alibaba Cloud ECS Windows instances (online 7 problem domain groups and offline problem domain routing are defined in WORKFLOW-GUIDE.md and WORKFLOW-GUIDE.md respectively). It supports two diagnostic modes:
This file only defines functional description and top-level flow. The specific troubleshooting logic, criteria, and fix scripts are all defined in the corresponding files under references/. When executing, you MUST load the corresponding file and strictly follow its content--relying on memory will miss root causes or produce incorrect fixes.
wevtutil sl ... /e:true): they change the target's configuration, so they require explicit user consent per the domain file's specific authorization gate before execution through ANY channel (direct or Cloud Assistant); presenting them as temporary ("enable, collect, disable right after") does not remove the consent requirement.The execution channel determines how PowerShell commands are delivered to the target instance. This is orthogonal to the diagnostic mode (online/offline) -- both modes support both channels. The channel is determined based on where the agent is running relative to the target instance.
powershell.exe on the same instance being diagnosed or where the offline disk is mounted. This is the default when the skill is running inside the target GuestOS.Remote transport priority: when the remote channel is needed, first check whether the current environment exposes a usable remote command execution tool -- typically an MCP server tool that sends scripts to ECS instances via Cloud Assistant (e.g., a RunCommand / ExecuteScript style tool). If one is available, prefer it: it removes CLI installation, credential configuration, shell-quoting, and result-polling burden, and the platform handles attribution on its side. If no such tool is available, fall back to the Alibaba Cloud CLI (aliyun ecs run-command) exactly as documented in REMOTE-EXECUTION.md. The transport choice changes only HOW the command travels -- all other rules of this channel still apply whichever transport carries the command: instance identification (ask the user, never enumerate), the Windows-Only Gate, target scoping, the two-turn fix confirmation gate, output size management, and the PowerShell script rules. The UA observability rules below apply to the aliyun CLI transport; an MCP tool performs its own attribution.
Channel determination is environmental, not lexical: decide the channel from where the agent actually runs, never from the user's wording -- a prompt saying "troubleshoot this server locally" does not place you inside the GuestOS. If the current environment cannot execute PowerShell at all (e.g., the agent is running on Linux/macOS or any non-Windows machine), you are by definition NOT inside the target Windows instance: the direct channel is unavailable, and this is a channel blocker, not a scope exit. Switch to the remote execution channel -- verify its prerequisites (instance ID, region ID, instance Running + Windows, plus a usable transport per the Remote transport priority above) and deliver the same PowerShell diagnostic commands through it. Only if the remote prerequisites also fail, present the complete copyable PowerShell scripts and ask the user to run them on the target instance. Terminating the troubleshooting with "PowerShell is not available here" is prohibited.
The aliyun-cli-ecs plugin's subcommands and flags are kebab-case and do NOT follow OpenAPI parameter names. Never construct aliyun ecs commands from memory of the OpenAPI docs -- copy the tested forms below verbatim; for any subcommand not listed here, load REMOTE-EXECUTION.md Section CLI Flag Reference BEFORE the first call.
| Purpose | Tested invocation |
|---|---|
| Prerequisite check (Status + OSType gate) | aliyun ecs describe-instances --biz-region-id <region-id> --instance-ids '["<instance-id>"]' |
| Send PowerShell script | aliyun ecs run-command --biz-region-id <region-id> --type RunPowerShellScript --command-content '<script>' --instance-id <instance-id> --name <name> --timeout <seconds> |
| Poll execution result | aliyun ecs describe-invocation-results --biz-region-id <region-id> --invoke-id <t-prefixed-invocation-id> |
| List regions (fallback sweep) | aliyun ecs describe-regions |
Hard rules (verified against aliyun-cli-ecs 0.7.8):
--biz-region-id with a plain string value (e.g. cn-hangzhou) -- never --RegionId or --region-id; the only exceptions are the monitor-data APIs, which take global --region--instance-ids takes a JSON array string ('["i-..."]'); on Windows targets --type is RunPowerShellScriptOutput is Base64 with embedded \n escapes -- strip then decode (tested pipeline in REMOTE-EXECUTION.md Section Core Execution Pattern)On parameter/syntax errors (InvalidParameter, unknown flag, Did you mean: hint, missing required parameter): STOP -- do not guess flags or retry variants. Re-read REMOTE-EXECUTION.md Section CLI Flag Reference, copy the exact template, and re-run once. Semantic/transient errors (Throttling, InstanceNotFound, NetworkError) do NOT benefit from reloading flag docs -- route them to the Error Handling table in REMOTE-EXECUTION.md. Permission errors (AccessDenied, Forbidden.RAM, Forbidden) are a class of their own: never transient, never fixed by retrying -- follow the HITL authorization flow in ram-policies.md Section Authorization Flow on AccessDenied.
When the remote execution channel is needed (for either online or offline diagnosis), MUST verify before proceeding to the corresponding WORKFLOW-GUIDE: (1) the chosen transport is usable -- per the Remote transport priority above, a usable remote command execution tool if one is available; otherwise the aliyun CLI installed (with the aliyun-cli-ecs plugin -- ECS commands use plugin mode with kebab-case subcommands and flags, see the tested flag reference in REMOTE-EXECUTION.md Section CLI Flag Reference) and configured, (2) target instance ID and region ID known (for offline diagnosis, the instance with the faulty disk mounted). If the user gave no instance identifier, asking the user is the only legitimate path -- do it BEFORE sending any cloud command, then end the turn and wait. Do NOT enumerate instances (describe-instances without --instance-ids) and pick a candidate yourself, and do NOT adopt an identity found in environment variables, local files, logs, shell history, this skill's own evals/, tests/, or assets/ content, the evaluation harness's working/output directories, or any other environment artifact -- such traces are incidental and can silently point at the wrong machine, and diagnostics or fixes sent to a wrong instance are effectively an attack on it. The target may only come from the user's own words or from a candidate list the user explicitly confirmed; see REMOTE-EXECUTION.md Section Prerequisites for the full identification flow. A task directive that omits the instance identifier -- however it phrases the work ("execute real calls", "discover the faulty resource", "locate and fix it", "never simulate") -- does NOT license discovery by enumeration or by reading test/harness material: it was written before any target was known, so it cannot have confirmed one; asking the user remains the only legitimate path. (3) target instance in Running state, (4) target instance OSType confirmed as windows by that same describe-instances call (the remote-channel implementation of the Windows-Only Gate). Verification commands and installation guidance are in REMOTE-EXECUTION.md Section Prerequisites; required RAM permissions are declared per-action in ram-policies.md.
Store the verified RegionId and InstanceId as session context for reuse across all subsequent remote commands. Additionally, capture the platform context snapshot from that same describe-instances response into session context -- InstanceType, PublicIpAddress / EipAddress, InternetMaxBandwidthOut / InternetMaxBandwidthIn, SecurityGroupIds, VPC/private-IP attributes, ZoneId, CreationTime / StartTime. These fields cost no extra API call and drive the platform-side triage and evidence labeling defined in platform-evidence.md; discarding them forces redundant lookups later or silently loses platform-level root causes. If the OSType check fails, apply the Windows-Only Gate exit below. If the gate call fails with a permission error (AccessDenied / Forbidden.RAM), this is an authorization failure, not a transient fault: do NOT retry blindly, do NOT silently continue even if a retry happens to succeed -- follow the HITL authorization flow in ram-policies.md Section Authorization Flow on AccessDenied (state the missing Action, request the grant, END the turn, retry once only after the user confirms). If any other prerequisite fails and cannot be resolved, inform the user and suggest alternative approaches (e.g., manual execution, console-based troubleshooting).
The troubleshooting session operates on ONE target: the instance stored in session context (and, for offline diagnosis, the faulty disk mounted on it). Every cloud API call must carry that identity as a filter:
describe-instances -- always with --instance-ids naming the session's instance.describe-disks -- always with --instance-id (disks of the target instance) or explicit --disk-ids; never an account-wide disk inventory.run-command / describe-invocation-results -- always addressed to the session's instance / its invocation.The single allowed exception is the region sweep when the instance ID is known but its region is not: iterate describe-regions + describe-instances --instance-ids '["<instance-id>"]' until found, then stop the sweep. Unfiltered list/enumerate calls (describe-instances without --instance-ids, describe-disks without an instance/disk filter, sweeping every region to build an inventory) are prohibited at every phase -- including "discovery", evidence collection, and cleanup -- because they expose unrelated resources, burn quota, and tempt the model to operate on the wrong machine. If the confirmed target does not yield the needed data, report that to the user rather than widening the search on your own.
Every aliyun CLI call in the remote execution channel carries a User-Agent header identifying this skill and the current troubleshooting session, so cloud-side logs (ActionTrail, Cloud Assistant invocation history) can be correlated to a single diagnostic run:
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-ecs-windows-os-troubleshooting/{session-id} -- the platform-standard UA declaration for agent skills: fixed prefix AlibabaCloud-Agent-Skills, then the skill name from this file's frontmatter, then one session-id. Append this flag to every aliyun CLI invocation in the channel.aliyun CLI call (including prerequisite gate calls) (UTC timestamp + short random hex suffix), store it in session context beside RegionId/InstanceId, and reuse it unchanged for every CLI call in the session; regenerate only when the user starts a new, unrelated troubleshooting taskFull rules and filled examples are in REMOTE-EXECUTION.md Section Observability. The direct execution channel makes no cloud API calls, so these rules do not apply to it.
Extract core symptoms from the user's description and accompanying materials (error codes, error text, screenshots, time of occurrence, and recent changes). When information is insufficient, you MUST ask follow-up questions first; do not proceed to classification with vague descriptions.
This skill runs inside the GuestOS or remotely via Cloud Assistant. The primary diagnostic scope is the GuestOS; platform-side boundary determination is not part of the mode decision here, but over the remote channel the workflow may still consult platform-side data -- and, under strict exit gates, conclude that a platform-level fact (not a GuestOS fault) explains the symptom; see the platform-side triage step in the corresponding WORKFLOW-GUIDE. This phase determines the online/offline diagnostic mode and resolves key ambiguities. The execution channel (local vs remote) is determined separately in the "Execution Channel" section below.
Determination Flow (MUST execute in order):
Key Ambiguity Resolution (the domain identifiers below are only used to help determine the direction; they do not trigger routing; formal routing is executed in the "Path Planning" step):
| Easily Confused Description | Determination |
|---|---|
| Slow boot / slow shutdown / overall sluggishness | Operation completes but slowly -> Performance issue group (UnexpectedlySlowLoading / SystemSlowPerformance) |
| Cannot start / shutdown stuck and cannot complete / crash/hang | Operation cannot complete or is unresponsive -> Boot issue / crash-hang or lifecycle exception group |
| Instance cannot access internet internally, cannot ping external | GuestOS.InsideNetworkAccessFailed |
| Cannot connect to instance business port / website from outside | GuestOS.OutsideNetworkAccessFailed |
| Disk not visible after online mount, detach failure | GuestOS.AttachOrDetachDiskFailed |
| Offline mounted partition is RAW / unreadable, spec change prompts recovery key | GuestOS.BitLockerLocked (offline branch) |
Platform instance status vs GuestOS state: The console instance status reflects the lifecycle of the virtualization layer, not the health of the operating system. "Running" only means the platform has finished provisioning hardware resources and the instance is powered on -- at most it says the instance has begun attempting to load the OS; underlying hardware or software faults, system misconfiguration, or file corruption can all leave the GuestOS unusable while the platform still shows Running. Therefore "console shows Running but the system cannot boot / cannot connect / business is down" is not contradictory -- it is the typical presentation of a GuestOS-level boot failure, and console VNC output is the direct evidence of where the boot stopped. Conversely, an instance remaining in "Starting" for an abnormally long time indicates a startup-stage anomaly on the platform side (non-GuestOS primary cause).
Problem classification (determining problem domain and unified troubleshooting sequence) is executed in the "Path Planning" step after entering the corresponding mode's WORKFLOW-GUIDE. This phase does not load the domain routing table.
Boot failures and session-layer symptoms (black screen, BSOD, boot loop, login failure) span five stages; locating the stage where boot stopped is the routing input for both online and offline modes (the stage definitions below are the single source of truth; mode-specific evidence collection details live in each WORKFLOW-GUIDE).
| Stage | Boundary | Stops here typically look like |
|---|---|---|
| P1 Boot chain | firmware -> bootmgr -> BCD -> winload file | no output at all; Boot Manager error screen; UEFI Shell; "no bootable device" |
| P2 Kernel load | winload hands off -> ntoskrnl + boot drivers | BSOD 0x7B/0x7E/0x74; reboot right after logo; Event 7026 |
| P3 Session init | smss/csrss/wininit/service control | BSOD 0xEF/0x5A; service start failures (7000/7001/7023) |
| P4 Winlogon/logon UI | LogonUI, credential providers, display driver mode switch | black screen after logon UI flashes; no logon success event (4624) |
| P5 Shell/user desktop | explorer/userinit/vminit after logon | black screen WITH movable mouse pointer; logon succeeded but no desktop |
Determination rules:
The target of the diagnosis MUST be a Windows system before any troubleshooting action starts. This gate is orthogonal to the mode determination above -- it applies to every scenario (online/offline, direct/remote), because the entire procedure body of this skill is PowerShell-based Windows diagnosis: on a non-Windows target the collection scripts either fail outright or produce misleading output, and a non-Windows GuestOS is outside this skill's declared scope. The verification method depends on the execution channel:
aliyun ecs describe-instances prerequisite call -- OSType must be windows. The API result is authoritative: it wins over the user's statement ("my Windows server"), the instance name, or any ID-prefix guess. This holds even when the user explicitly asserted the instance is Windows. For offline remote diagnosis, the checked instance is the one receiving commands (the instance with the faulty disk mounted), since all offline procedures (registry HIVE, DISM) are also PowerShell/Windows operations.On failure -- exit, do not degrade: if the check shows the target is not Windows, do NOT enter any WORKFLOW-GUIDE, do NOT send or execute any diagnostic command, and do NOT offer channel fallbacks or alternative collection paths -- this is a scope boundary, not a channel failure. Report to the user the verified facts (what was checked, what was found -- e.g., instance ID, region, actual OSType value) and the reason the flow stops (this skill supports Windows ECS instances only), then exit the diagnostic flow.
| Mode | Load | Content |
|---|---|---|
| Online Diagnosis | WORKFLOW-GUIDE.md | Complete online diagnosis execution flow (problem understanding -> path planning -> step-by-step execution -> causal chain analysis -> evidence review -> fix plan) |
| Offline Diagnosis | WORKFLOW-GUIDE.md | Complete offline diagnosis execution flow (prerequisite checks -> problem understanding -> path planning -> step-by-step execution -> causal chain analysis -> evidence review -> fix plan -> diagnostic wrap-up) |
After entering the corresponding WORKFLOW-GUIDE, strictly follow its flow; do not mix rules from the other mode. During troubleshooting, intra-domain details are routed by sequence to specific troubleshooting files under references/online/ or references/offline/.