# KHY OS Windows Build + VMware Stability Checklist

This checklist is for building `khy-os.iso` on Windows and validating stable boot in VMware.

## 1. Required Tools on Windows

1. Docker Desktop (Windows)
2. WSL2 (recommended for Docker backend)
3. PowerShell 5+ (Windows PowerShell or PowerShell 7)
4. VMware Workstation Pro/Player

## 2. Preflight (Recommended)

Run from project root:

```powershell
powershell -ExecutionPolicy Bypass -File scripts\alpine\windows-iso-preflight.ps1 -Output dist\khy-os.iso
```

Pass criteria:

1. Docker command found
2. Docker daemon running
3. Required files exist
4. Hypervisor support detected (or only warning)
5. Output drive free space >= 15 GB

If preflight has any `[FAIL]`, fix those first.

## 3. Build ISO on Windows

Default build (reuses cache):

```powershell
khy iso build --output dist\khy-os.iso
```

Or source script directly:

```powershell
powershell -ExecutionPolicy Bypass -File scripts\alpine\build-iso-windows.ps1 -Output dist\khy-os.iso
```

Force full rebuild (rarely needed):

```powershell
powershell -ExecutionPolicy Bypass -File scripts\alpine\build-iso-windows.ps1 -Output dist\khy-os.iso -NoCache
```

## 4. Artifact Verification

```powershell
Get-Item dist\khy-os.iso | Select-Object FullName,Length,LastWriteTime
Get-FileHash dist\khy-os.iso -Algorithm SHA256
```

## 5. VMware Stable Boot Settings

Create a VM with these baseline settings:

1. Guest OS: Linux 64-bit (Other Linux 5.x or newer)
2. Firmware: BIOS first (UEFI also supported by ISO)
3. CPU: 2 vCPU or higher
4. Memory: 4 GB or higher
5. Disk: 32 GB or higher (thin provision OK)
6. Network: NAT (for easiest first boot)
7. Disable Secure Boot if using UEFI and boot issues occur
8. Attach `dist\khy-os.iso` as CD/DVD and connect at power on

In GRUB menu, first try:

1. `KHY OS (VMware / Hyper-V)`
2. if needed, `KHY OS (safe graphics)`

## 6. Runtime Stability Smoke Test (Inside VM)

After boot:

1. `khy --version`
2. `khy doctor`
3. `khy gateway status`
4. `khy app list`
5. `khy ai status`

Expected:

1. No boot panic/restart loop
2. CLI responsive for multiple commands
3. Doctor output has no hard failure that blocks base runtime

## 7. Bare-Metal Preparation Notes

Before writing USB media:

1. Verify SHA256
2. Keep BIOS mode aligned with your machine (legacy BIOS or UEFI)
3. Disable Secure Boot if unsigned-kernel policy blocks boot
4. Keep one fallback USB with your previous known-good ISO

