Skip to content

Instantly share code, notes, and snippets.

@tejasraman
Last active October 21, 2024 19:50
Show Gist options
  • Save tejasraman/beb15feae2bbfef950d4709df2bddd66 to your computer and use it in GitHub Desktop.
Save tejasraman/beb15feae2bbfef950d4709df2bddd66 to your computer and use it in GitHub Desktop.
Install ChromeOS in QEMU (Windows)

Installing ChromeOS Flex (hardware accelerated) on QEMU for Windows

A word of warning. This will be slow and buggy. Do not attempt to use this as a daily driver.

Requirements:

  • Windows 10 or 11 (x64)

Download Files:

  • Download QEMU
  • Download ChromeOS Flex (remember to download the file; do NOT use Chromebook Recovery Utility)
  • Download Windows Terminal (if on Windows 10, included on 11)

Steps:

  • Enable Windows Hypervisor Platform from Control Panel and reboot

  • Install QEMU. Make sure "Tools" is enabled.

  • Open the Start menu and search for "Edit environment variables for your account". Click "Path", "Edit", "New" and then type C:\Program Files\qemu

  • Log out and log back in (to load the PATH variable)

  • Create a directory on yout system to store all your files. Move the downloaded Flex zip to this folder and unzip it. You will see a .bin file. Enable showing file extensions in your Explorer for this part

  • Right-click inside the folder and click "Open in Terminal". You will see a PowerShell window.

  • Type qemu-img create -f vdi flex.vdi xG (x represents number of GB)

  • Rename the .bin to cros.raw (Ctrl+A to select file extension)

  • Type 'C:\Program Files\qemu\qemu-system-x86_64.exe' -vga virtio -m 8G -drive file=flex.vdi,format=vdi,index=1 -accel whpx,kernel-irqchip=on -drive file=cros.raw,format=raw,index=0 -device qemu-xhci -device usb-kbd -smp x (where x is a number of cores (if you have a 4c/8t use 4)

  • Click "Install" and install to the vdi

  • Next boot, type 'C:\Program Files\qemu\qemu-system-x86_64.exe' -vga virtio -m 8G -drive file=flex.vdi,format=vdi,index=0 -accel whpx,kernel-irqchip=on -device qemu-xhci -device usb-kbd -smp x to boot into the VDI.

  • Profit (or not; this will be laggy. Flags: disabling 2d canvas accel will help a LOT and using the "new" blur engine in high res does too.)

(If you have an Intel CPU, you can use HAX accel which will be faster (replace whpx with hax after installing intel Android tools)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment