On modern Chromebooks, Google ChromeOS provides an enterprise-grade Linux development environment (known internally as Crostini) that allows developers to run native command-line utilities, IDEs like VS Code, and graphical Linux applications seamlessly alongside web apps. Rather than compromising the security of the ChromeOS root filesystem or requiring users to disable verified boot by switching into Developer Mode, Crostini enforces a layered virtualisation architecture. It executes an isolated virtual machine called termina managed by Google’s custom hypervisor monitor (crosvm), inside which individual LXD/Incus Linux containers (such as the default Debian container, penguin) execute user software.
While the ChromeOS graphical Settings interface provides basic toggles to back up, restore, or resize the Linux disk, it lacks visibility when containers fail to launch, when disk allocations become fragmented, or when developers need to spawn isolated secondary containers. To gain low-level administrative control over this virtualisation stack, power users utilise the ChromeOS Developer Shell (Crosh) along with its dedicated virtualisation commands: vmc (Virtual Machine Controller) and vsh (Virtual Shell). This comprehensive guide outlines the Crostini container architecture, demonstrates practical vmc and vsh workflows, and details troubleshooting methods for broken development environments.
Crostini Virtualisation Architecture and Command Tooling
Understanding the multi-tier hierarchy of the ChromeOS Linux stack clarifies which command to employ at each administrative tier:
| Layer / Tool | Operating Scope | Primary Executable / Protocol | Key Administrative Capabilities |
|---|---|---|---|
vmc (Crosh) |
Virtual Machine Management | Interacts with ChromeOS vm_concierge daemon |
Starting, stopping, exporting, importing, and resizing termina VMs. |
vsh (Crosh) |
Virtual Terminal Access | Interacts with vhost-vsock subsystem |
Spawning root shells into termina or user shells into containers. |
lxc (Inside Termina) |
Container Management | LXD / Incus container supervisor | Creating, snapshotting, and clustering multi-distro Linux containers. |
| ChromeOS Settings GUI | High-level User Interface | System Settings > Linux development environment | Basic disk slider adjustment, port forwarding, single-file backup. |
Accessing Crosh and Launching Virtual Machines with vmc
To access the ChromeOS Developer Shell, press the keyboard shortcut Ctrl + Alt + T from any active ChromeOS window. A dedicated Crosh terminal tab opens displaying the crosh> command prompt.
Note: Crosh is accessible on all standard Chromebooks without enabling Developer Mode, preserving hardware-backed verified boot security and TPM encryption.
Auditing Existing Virtual Machines
To inspect all registered virtual machines and view their allocated disk sizes, run:
crosh> vmc list
Crosh reports the registered VM names along with their disk consumption (in bytes):
termina (18245222400 bytes, sparse)
Total size: 18245222400 bytes
Starting and Stopping the termina VM
To boot the underlying virtual machine environment manually from Crosh:
crosh> vmc start termina
If the VM is already running, this command connects your current terminal directly to the internal VM shell. To cleanly shut down all running Linux containers and terminate the VM to release system RAM back to ChromeOS:
crosh> vmc stop termina
Exporting and Importing Full VM Snapshots
While the ChromeOS Settings UI only exports files from the penguin container, vmc export creates a complete, bit-level raw disk image of the entire termina virtual machine, including all custom containers, kernel modules, and network configurations:
crosh> vmc export termina backup_termina.tar.gz Downloads
This writes the compressed archive directly into your user’s standard Downloads folder. To restore or deploy this VM on another Chromebook:
crosh> vmc import dev_workstation backup_termina.tar.gz Downloads
Destroying a Corrupted Virtual Machine
If an experimental kernel package or filesystem crash renders your Linux environment unbootable, purge the virtual machine completely to allow ChromeOS to generate a fresh deployment:
crosh> vmc destroy termina
Connecting to Containers and Shells with vsh
The vsh command allows administrators to bypass traditional SSH daemons and open direct virtual sockets into running guests.
Entering the Root termina VM Shell
To access the low-level administrative shell of the termina host itself:
crosh> vsh termina
The prompt changes to (termina) chronos@localhost ~ $. From here, you have superuser privileges across the hypervisor environment.
Directly Entering a User Container
To open a shell directly inside your default penguin container without opening the graphical Terminal app:
crosh> vsh termina penguin
You can also execute single diagnostic commands non-interactively by appending them after double dashes (--):
crosh> vsh termina penguin -- uptime
Advanced: Managing Multi-Container Environments with LXC
Once inside the termina shell via vsh termina, you can use the native lxc CLI to manage multiple isolated Linux distributions side by side:
- List All Active Containers:
lxc list - Create an Instant Snapshot of penguin Before Risky Upgrades:
lxc snapshot penguin pre_node_upgrade - Restore the Snapshot if Issues Arise:
lxc restore penguin pre_node_upgrade - Launch a Secondary Ubuntu Container for Isolated Testing:
lxc launch ubuntu:24.04 noble-test
To open a bash session in this new secondary container from Crosh at any time, execute vsh termina noble-test.
Troubleshooting Common Crostini Startup Failures
When launching the Linux Terminal app in ChromeOS produces an error dialogue such as “Error starting penguin container: 51” or “Virtual machine failed to start”, use Crosh to diagnose the root issue:
- Check for Unresponsive Daemons: Run
vmc stop termina, wait five seconds, and relaunch usingvmc start termina. This resets hungvhostcommunication sockets. - Audit Virtual Disk Errors: Inside the
terminashell, inspect container journal logs usingjournalctl -u lxdto verify whether database locks or disk corruption prevented startup. - Dynamic Disk Space Reclaim: If the sparse image file grew excessively, use
vmc disk-op termina shrinkto trim unused blocks and return free space to the ChromeOS internal SSD.
By leveraging the vmc and vsh command set within Crosh, developers unlock granular control over ChromeOS virtualisation, enabling robust container lifecycle management, disaster recovery, and multi-distribution development environments.