fx qemu

start fuchsia in qemu with a FVM disk

start fuchsia in qemu with a FVM disk

usage: fx qemu [-z <zbi_image>] [--uefi <image>] [--archive <tgt>]

     -z <zbi_image>   use <zbi_image> instead of the default (- for none)
     -t <boot_shim>   use <boot_shim> instead of the default
     --uefi <image>   Boot through UEFI and do so with the supplied UEFI filesystem or disk
                      image. Mutually exclusive with '-z' and '-t'.
     --archive <tgt>  Don't actually run QEMU.  Instead, create a compressed tarball archive
                      named "<tgt>.tgz" which contains all of the images needed to run QEMU.


When generating an archive, either two or three files are typically included in the
archive.  They are:

1) qemu-boot-shim.bin
   This file is the image to be loaded into RAM and jumped to. When using QEMU,
   pass this file to the VM instance using the -kernel option.
2) fuchsia-ssh.zbi
   This file is the image to be used as the initial ramdisk for the VM. When using QEMU,
   pass this file to the VM instance using the -initrd option.
3) raw.blk
   This file is the initial raw image of the block device for the VM.  It is
   not present in a "bringup" build configuration, but should be present for
   "core" builds and beyond.  When using QEMU, this file is provided to the
   VM using the --drive option, but needs to be manifested in the machine as
   a device using --device options in order for it to be available for the OS
   to mount.  An example of these flags might looks something like this:

     -drive file=<path_to_fvm_raw.zbi>,format=raw,if=none,id=mydisk
     -device ich9-ahci,id=ahci
     -device ide-hd,drive=mydisk,bus=ahci.0

This command delegates to //zircon/scripts/run-zircon. Other flags are
documented in that script, and can be discovered by passing -h or --help.

qemu source code