Chrome OS Flex No-Nonsense QEMU Virtualization: A Complete Guide
Chrome OS Chrome OS Flex Guide Installation WalkthroughHi all, welcome to my blog, MusaBase! In this comprehensive walkthrough, I'll guide you through virtualization of Chrome OS Flex on QEMU (Quick Emulator) in Linux. I am using Arch Linux btw, but you can achieve the same on almost every Linux distribution's.
It might be challenging, but i assure you that if you follow each step in this walkthrough, you'll have a fully functional virtual machine with Chrome OS Flex installed and running by the end.
In this tutorial, I will cover every step, from installing and configuring QEMU to creating a virtual disk and installing Chrome OS Flex on that virtual hard drive, ensuring that the OS runs smoothly.
Jump To:
Limitations and Caveats
Chrome OS Flex is designed to be installed directly onto physical hardware specifically, PCs and Macs, to revitalize older devices. Although it can be run in virtual machines, this is not its intended use case, and Google does not officially provide full support for it in a virtual enviornmnet. Furthermore, there are additional limitations with this setup: for example, you cannot run a Linux development enviornmnet within it because doing so require nested virtualization, and successful operation is not guaranteed.
Prerequisites for Running Chrome OS Flex on a Virtual Machine
Running Chrome OS Flex on a virtual machine is straightforward, though the process differs from installing it on physical hardware. Instead of booting from a USB drive, you'll need to create a virtual disk and configure your VM to boot from the Chrome OS Flex recovery image. This approach allows you to test and get familiar with Chrome OS Flex in a safe virtual enviornmnet before considering any physical deployment.
Before proceeding, ensure your PC meets the following hardware requirments:
- Processor: Intel or AMD x86-64-bit compatible.
- Ram: 8GB or 16GB.
- Hard-Drive: Allocate at least 16GB for Chrome OS Flex, plus additional space based on your needs.
- Operating System: Any Linux distribution to run your virtualization software.
- 🖥️ Virtual Machine Tool: QEMU.
Step 1. Installing QEMU and Core Virtualization Packages
For detailed, distribution-specific instructions on installing QEMU and its virtualization dependencies, please see our How to Install QEMU on Linux guide. Once QEMU is set up, return here to continue configuring and running Chrome OS Flex in your virtual machine environment.
Step 2. Acquire Chrome OS Flex Image
Now that you've set up your virtual emulator, it's time to download the Chrome OS Flex image for QEMU. Note that Chrome OS Flex is not distributed as a conventional .ISO file. Instead, Google provides a recovery image in .bin format, compressed within a .zip file.
To download ChromeOS Flex:- Option 1:
- Option 2:
Visit Google's Official Chrome OS Flex Page. Fill out the form and follow Google's guide to obtain the Chrome OS Flex image.
Click the direct download link:
https://dl.google.com/chromeos-flex/images/latest.bin.zip
The above link will start downloading the Chrome OS Flex image.
This link is safe and comes directly from Google's official website for Chrome OS Flex.
After the downlaod completes you'll have a .zip file, typically named something:
"chromeos_16002.51.0_reven_recovery_stable-channel_mp-v6.bin.zip"
Extract the Image:
Since the download file is a .zip archive containing a .bin file, you need to extract it. You can use a graphical file extraction tool like Ark, a utility that supports multiple formats(tar, gzip, bzip2, rar, and zip).
- Installation (Example for Arch-Base distros):
sudo pacman -S ark
Replace "pacman" with your package manager.
Once Ark is installed, extract the .bin file from the .zip archive. For clarity when selecting the image in QEMU, rename the extracted .bin file to a simple, memorable name (e.g., chromeosflex).
Step 3. Installing Chrome OS Flex On a Virtual Machine
Now that your QEMU virtual emulator is set up, configured, and you've downloaded and extracted the Chrome OS Flex image, it's time to install Chrome OS Flex on your virtual machine. First, create a virtual storage device where the OS will be installed.
3.1. Creating a Virtual Storage Drive
- Open your terminal.
- (Optional) If you want the virtual drive created in a specific directory, navigate there using the cd command. By default, the drive will be created in your home directory.
- To create the virtual drive, type:
qemu-img create -f qcow2 chromeosflex.qcow2 16G
- 16G: Adjust the size as needed (Chrome OS Flex requires a minimum of 8-12GB).
- Replace the "chromeosflex" with your preferred drive name.
- qemu-img: A tool for creating and managing virtual disk images for QEMU.
- create: This tells qemu-img to create a new disk image.
- -f qcow2: Specifies the format of the image:qcow2 (QEMU Copy-On-Write 2) is a flexible disk image format that supports features like compression, snapshots, and thin provisioning.
Note: Make sure that your chromeosflex.bin file and chromeos.qcow2 (virtual drive) are in the same directory. Like this:
3.2. Booting into Chrome OS Flex Image
To install Chrome OS Flex, you must attach two virtual drives to QMEU:
- The first drive is the chromeosflex.bin file (the installer, functioning like a bootable USB).
- The second drive is the virtual storage drive (chromeosflex.qcow2) where the OS will be installed.
Note: Confirm you're in the same directory as both files, use cd if necessary.
- To launch QEMU with chromeosflex.bin and chromeosflex.qcow2, type:
qemu-system-x86_64 -drive format=raw,file=chromeosflex.bin -drive format=qcow2,file=chromeosflex.qcow2 -m 8G -smp 2 -enable-kvm -display "gtk,gl=on,show-cursor=on" -device virtio-vga-gl -usb -device usb-tablet
- qemu-system-x86_64: This is the command to start the QMEU emulator for the x86_64 architecture, QEMU is a generic and open-source machine emulator and virtualizer.
- -drive format=raw,file=chromeosflex.bin: This option defines a virtual hard drive for the VM. format=raw specifies that the dirve image is in raw format, meaninig it's a direct binary image of the disk. file=chromeosflex.bin indicates that the raw disk image file is named chromeosflex.bin, you can replace it with name you named your .bin file.
- -drive format=qcow2,file=chromeosflex.qcow2: This options defines the secondary virtual hard drive for the VM. format=qcow2 specifies that the drive image is in qcow2 image of the disk. file=chromsosfex.qcow2 indicates that the qcow2 image file is named cromeosflex.qcow2, you can replace it with name you named your .qcow2 file.
- -m 8G: This specifies the amount of RAM 8 gigabytes (GB) we allocated to the VM, replace 8G with your preffered size.
- -smp 2: This sets the number of virtual CPUs (symmetric multiprocessing) to 2. The VM will have two processor cores, also replace the 2 with your preffered size.
- -enable-kvm: This enables Kernel-based Virtual Machine (KVM) acceleration. KVM is a virtualization module in the Linux Kernel that allows QEMU to run VMs with near-native performance. This option significantly improves the speed of the VM. If you are not on a linux based system, or if your cpu does not support hardware virtualization, this will cause an error, the workaround is simply remove this option from the above command.
- -display "gtk,gl=on,show-cursor=on": This configures the display settings for the VM. gtk specifies that the GTK (GIMP Toolkit) graphical user interface should be used for the VM's display. gl=on Enables OpenGL acceleration for the virtual display. which is important for smooth graphics rendering, especially for Chrome OS FLex.
- -device virtio-vga-gl: This adds a virtual graphics adapter to the VM, using the virtio-vga-gl driver, VirtIO is a standardized interface for virtual devices, providing high performance. The gl suffix indicates that it supports OpenGL acceleration.
- -usb: This enables USB support for the virtual machine.
- -device usb-tablet: This adds a virtual USB tablet device, which is often used for better mouse input and responsiveness,espically in virtualized environments.
Once QEMU starts, the Chrome OS Flex installer will load after about 1-2 minutes. You can also use Chrome OS Flex in guest mode by clicking the Browse as Guest button. However, note that guest mode won't save changes between sessions.
3.3. Installing Chrome OS Flex
To install the OS:- When the installer loads, click the Install Chrome OS Flex button (or follow the on-screen prompts to choose between trying and installing the OS). The installer will warn you that the installation will erase data on the hard-drive. Since this is a virtual drive, click Install to proceed.
- After installation, the emulator will shut down.
3.4. Booting into Freshly Installed Chrome OS Flex
- Now that Chrome OS Flex is successfully installed in the virutal machine, it's time to boot into the freshly installed operating system from the virtual drive.
- To do this, simply modify the preivous QEMU run command by removing the installer drive option -drive format=raw,file=chromeosflex.bin.
- Use the following command to boot directly from the virtual storage drive:
qemu-system-x86_64 -drive format=qcow2,file=chromeosflex.qcow2 -m 8G -smp 2 -enable-kvm -display "gtk,gl=on,show-cursor=on" -device virtio-vga-gl -usb -device usb-tablet
- Press Enter.
And here you go! now you have Chrome OS Flex running in your virtual machine. With save state support, every time you shut down QEMU and restart Chrome OS Flex, it picks up right where you left off. Enjoy exploring your new virtual machine environment.
🎉 Congratulations, your Chrome OS Flex setup is complete!
If this guide helped you, subscribe for more step-by-step tutorials.
1O1 out, I`ll see you in the next one!