Skip to content

Commit fcee717

Browse files
abrichrclaude
andcommitted
fix: update default emulator IP to 20.20.20.21 for official WAA
The official windowsarena/winarena image uses 20.20.20.21 for the Windows VM inside QEMU, not 172.30.0.2. This change updates all default internal_ip values to match the official WAA setup. This enables fully unattended vanilla WAA benchmark runs. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 9a37bb4 commit fcee717

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

openadapt_ml/benchmarks/cli.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1989,15 +1989,15 @@ def capture_vm_screenshot(ip: str, output_path: Path | str = None) -> Path | Non
19891989

19901990

19911991
def check_waa_probe(
1992-
ip: str, timeout: int = 5, internal_ip: str = "172.30.0.2"
1992+
ip: str, timeout: int = 5, internal_ip: str = "20.20.20.21"
19931993
) -> tuple[bool, str | None]:
19941994
"""Check if the WAA /probe endpoint is responding.
19951995
19961996
Args:
19971997
ip: Public IP address of the Azure VM
19981998
timeout: Connection timeout in seconds
19991999
internal_ip: Internal IP of the Windows VM inside QEMU.
2000-
172.30.0.2 for dockurr/windows:latest
2000+
20.20.20.21 for dockurr/windows:latest
20012001
20.20.20.21 for official windowsarena/winarena
20022002
20032003
Returns:
@@ -2030,7 +2030,7 @@ def check_waa_probe(
20302030

20312031

20322032
def poll_waa_probe(
2033-
ip: str, max_attempts: int = 30, interval: int = 20, internal_ip: str = "172.30.0.2"
2033+
ip: str, max_attempts: int = 30, interval: int = 20, internal_ip: str = "20.20.20.21"
20342034
) -> bool:
20352035
"""Poll the WAA /probe endpoint until it responds or timeout.
20362036
@@ -2377,7 +2377,7 @@ def launch_benchmark_viewer(
23772377
vm_ip: str,
23782378
port: int = 8765,
23792379
open_browser: bool = True,
2380-
internal_ip: str = "172.30.0.2",
2380+
internal_ip: str = "20.20.20.21",
23812381
) -> None:
23822382
"""Launch the benchmark viewer for monitoring a running WAA benchmark.
23832383
@@ -2446,7 +2446,7 @@ def cmd_viewer(args: argparse.Namespace) -> None:
24462446
vm_ip = args.vm_ip
24472447
port = getattr(args, "port", 8765)
24482448
no_open = getattr(args, "no_open", False)
2449-
internal_ip = getattr(args, "internal_ip", "172.30.0.2")
2449+
internal_ip = getattr(args, "internal_ip", "20.20.20.21")
24502450

24512451
launch_benchmark_viewer(
24522452
vm_ip=vm_ip, port=port, open_browser=not no_open, internal_ip=internal_ip
@@ -3821,8 +3821,8 @@ def cmd_vm(args: argparse.Namespace) -> None:
38213821

38223822
print(f" VM IP: {ip}")
38233823

3824-
# Use 172.30.0.2 for vanilla WAA (dockurr/windows base, used by windowsarena/winarena)
3825-
internal_ip = getattr(args, "internal_ip", "172.30.0.2")
3824+
# Use 20.20.20.21 for vanilla WAA (dockurr/windows base, used by windowsarena/winarena)
3825+
internal_ip = getattr(args, "internal_ip", "20.20.20.21")
38263826

38273827
if getattr(args, "wait", False):
38283828
# Polling mode - keep checking until ready
@@ -4351,7 +4351,7 @@ def delete_vm(name: str) -> tuple[str, bool, str]:
43514351
print("\n2. CURRENT ACTIVITY")
43524352
print("-" * 70)
43534353
if not use_mock:
4354-
activity = detect_vm_activity(ip, "azureuser", "winarena", "172.30.0.2")
4354+
activity = detect_vm_activity(ip, "azureuser", "winarena", "20.20.20.21")
43554355
activity_icon = "⚙" if activity.is_active else "💤"
43564356
print(f" Status: {activity_icon} {activity.activity_type.upper()}")
43574357
print(f" Details: {activity.description}")
@@ -4530,9 +4530,9 @@ def start_server():
45304530
# Update status every update_interval seconds
45314531
if (current_time - last_update).total_seconds() >= update_interval:
45324532
# Quick status check
4533-
is_ready, probe_msg = check_waa_probe(ip, internal_ip="172.30.0.2")
4533+
is_ready, probe_msg = check_waa_probe(ip, internal_ip="20.20.20.21")
45344534
activity = detect_vm_activity(
4535-
ip, "azureuser", "winarena", "172.30.0.2"
4535+
ip, "azureuser", "winarena", "20.20.20.21"
45364536
)
45374537
status_line = f"WAA: {'READY' if is_ready else 'waiting'} | Activity: {activity.activity_type}"
45384538

@@ -4550,7 +4550,7 @@ def start_server():
45504550
last_update = current_time
45514551
else:
45524552
# Use cached status
4553-
is_ready, _ = check_waa_probe(ip, internal_ip="172.30.0.2")
4553+
is_ready, _ = check_waa_probe(ip, internal_ip="20.20.20.21")
45544554
status_line = f"WAA: {'READY' if is_ready else 'waiting'}"
45554555

45564556
# Live status display
@@ -4730,7 +4730,7 @@ def start_server():
47304730

47314731
for i in range(12):
47324732
time.sleep(10)
4733-
is_ready, response = check_waa_probe(ip, internal_ip="172.30.0.2")
4733+
is_ready, response = check_waa_probe(ip, internal_ip="20.20.20.21")
47344734
if is_ready:
47354735
print("\n WAA server is running!")
47364736
print(f" Response: {response}")
@@ -4943,7 +4943,7 @@ def run_diag_cmd(cmd: str) -> tuple[bool, str, str]:
49434943
# WAA probe status
49444944
print("\n[Bonus] WAA Probe Status")
49454945
print("-" * 50)
4946-
is_ready, response = check_waa_probe(ip, internal_ip="172.30.0.2")
4946+
is_ready, response = check_waa_probe(ip, internal_ip="20.20.20.21")
49474947
if is_ready:
49484948
print(f" ✓ WAA server READY: {response[:100] if response else '(empty)'}")
49494949
else:
@@ -5875,7 +5875,7 @@ def step(msg: str) -> None:
58755875
max_attempts = (max_wait_minutes * 60) // poll_interval
58765876

58775877
for attempt in range(max_attempts):
5878-
is_ready, response = check_waa_probe(ip, timeout=5, internal_ip="172.30.0.2")
5878+
is_ready, response = check_waa_probe(ip, timeout=5, internal_ip="20.20.20.21")
58795879
if is_ready:
58805880
print(f"\n WAA server is ready!")
58815881
break
@@ -6458,8 +6458,8 @@ def main() -> None:
64586458
)
64596459
p_vm.add_argument(
64606460
"--internal-ip",
6461-
default="172.30.0.2",
6462-
help="Internal IP of Windows VM (172.30.0.2 for vanilla WAA)",
6461+
default="20.20.20.21",
6462+
help="Internal IP of Windows VM (20.20.20.21 for vanilla WAA)",
64636463
)
64646464
p_vm.add_argument(
64656465
"--yes", "-y", action="store_true", help="Skip confirmation prompts"
@@ -6570,8 +6570,8 @@ def main() -> None:
65706570
)
65716571
p_viewer.add_argument(
65726572
"--internal-ip",
6573-
default="172.30.0.2",
6574-
help="Internal IP of Windows VM (default: 172.30.0.2)",
6573+
default="20.20.20.21",
6574+
help="Internal IP of Windows VM (default: 20.20.20.21)",
65756575
)
65766576

65776577
# View benchmark results - generate and serve HTML viewer for collected benchmark data

0 commit comments

Comments
 (0)