This document describes how to set up the Fuchsia emulator (FEMU). For more information on FEMU, see the Fuchsia emulator overview.
To run FEMU, you must have
For Fuchsia's ephemeral software to work in the emulator, you need to configure an IPv6 network.
To enable networking in FEMU, run the following commands:
sudo ip tuntap add dev qemu mode tap user $USER sudo ip link set qemu up
You need to install TunTap{:.external}, kernel extensions that allow macOS to create virtual network interfaces.
For macOS 10.9 (Mavericks) and 10.10 (Yosemite), install TunTap using this installation package{:.external}.
For macOS 10.13 (High Sierra) and later versions, do the following:
Install Homebrew{:.external}:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Install TunTap:
brew cask install tuntap
The installation of TunTap may fail at first. In that case, do the following:
Open System Preferences
.
Open Security & Privacy
and select theGeneral
tab.
Next to the System software from developer "Mattias Nissler" was blocked from loading.
message, click Allow (see Apple's User-Approved Kernel Extension Loading{:.external} for details).
Run the install command again:
brew cask install tuntap
After installing TunTap, run the following command:
sudo chown $USER /dev/tap0
To start the emulator with networking enabled, run the following command:
fx emu -N
Note: If you need to reach the internet from the emulator, configure IP forwarding and IPv4 support on the emulator TAP interface.
For next steps on using FEMU, see Running the Fuchsia Emulator.