Unable to start Fuchsia Emulator on Ubuntu

205 views
Skip to first unread message

Rohan Thacker

unread,
May 15, 2021, 3:51:22 PM5/15/21
to discuss
Hello Everyone,

Hope you're well, I am trying to build Fuchsia OS and run it on the Fuchsia Emulator femu, but after waiting for the emulator to start the fx command exists and displays the error below.

failed to create Fuchsia device device health check failed. Unable to ssh due to error: Error: Cannot start Fuchsia Emulator. Exit status is 1

I have followed the instructions provided at fuchsia.dev, the build completes successfully and the commands used to build the OS was

fx set core.qemu-x64 --with //examples/hello_world fx build

Subsequently, I tried running with headless mode turned on "fx vdl start -N --headless" however this results in the same error as above, I also tried to build the OS without the --with argument but received the same error.

On looking through the log file, we see a network error on the second last line of the log file, maybe this is of interest? it reads:

emu-system-x86_64-headless: network script /etc/qemu-ifdown failed with status 256

I am using Ubuntu 21.04 on my machine,

Note: I've also posted this question on the stackover flow community

Thank you,

Rohan Thacker

Message has been deleted

Yilong Li

unread,
May 16, 2021, 8:03:06 PM5/16/21
to Rohan Thacker, dis...@fuchsia.dev
It seems that the network configuration scripts /etc/qemu-ifup and /etc/qemu-ifdown are missing. You can work around it by installing the qemu package: 
$ sudo apt install qemu

I am using Ubuntu 21.04 on my machine.

P.S: I've also posted this question on the stackover flow community

Thank you,

Rohan Thacker

--
All posts must follow the Fuchsia Code of Conduct https://fuchsia.dev/fuchsia-src/CODE_OF_CONDUCT or may be removed.
---
You received this message because you are subscribed to the Google Groups "discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/discuss/CAGgOCsm7rXXHj%2BKqhThFnGwWa%2BwQbAx1iSo643UDs1zPVjbCvA%40mail.gmail.com.


--
-Yilong

Rohan Thacker

unread,
May 16, 2021, 8:59:55 PM5/16/21
to Yilong Li, dis...@fuchsia.dev
Thank you Yilong, installing qemu resolved the network issues. Does this mean qemu is a required dependency? In other words, should this line in the docs be updated "sudo apt-get install curl git unzip" to include qemu?

Amit Uttamchandani

unread,
May 17, 2021, 12:19:48 AM5/17/21
to Rohan Thacker, Gabe Schine, Yilong Li, discuss

Gabe Schine

unread,
May 17, 2021, 1:09:32 PM5/17/21
to Amit Uttamchandani, Rohan Thacker, Yilong Li, discuss
Yes, if this is a prereq, preflight should check for it.


It'd be an excessively simple CL ;).
--
Gabe Schine
Software Engineer / Manager

Rohan Thacker

unread,
May 17, 2021, 1:22:57 PM5/17/21
to Gabe Schine, Amit Uttamchandani, Yilong Li, discuss
May I do this?

If I understand correctly, Adding "qemu" to line 13 of this file is required?

Gabe Schine

unread,
May 17, 2021, 1:27:57 PM5/17/21
to Rohan Thacker, Amit Uttamchandani, Yilong Li, discuss
That's correct, and yes, please go ahead! You can send the review to me.

James Tucker

unread,
May 17, 2021, 1:30:54 PM5/17/21
to Gabe Schine, Rohan Thacker, Amit Uttamchandani, Yilong Li, discuss
We ship a prebuilt for qemu, actually two, one qemu, one femu.

I don't see any of our scripts depending on this path in /etc. Some distros wouldn't put a file there, also, as they're trending toward not writing package static files to /etc.

Is this a bug in femu that needs to be filed?

Yilong Li

unread,
May 17, 2021, 2:48:45 PM5/17/21
to James Tucker, Gabe Schine, Rohan Thacker, Amit Uttamchandani, discuss
On Mon, May 17, 2021 at 10:30 AM James Tucker <ra...@google.com> wrote:
We ship a prebuilt for qemu, actually two, one qemu, one femu.

I don't see any of our scripts depending on this path in /etc. Some distros wouldn't put a file there, also, as they're trending toward not writing package static files to /etc.

QEMU/AEMU use /etc/qemu-(ifup|ifdown) as fallback scripts if "script=" or "downscript=" are not specified in QEMU command arguments.

AEMU has its own fallback logic but it seems we didn't use this if it runs Fuchsia (using its min-config mode): 

 
Is this a bug in femu that needs to be filed?



--
-Yilong

Camden Bruce

unread,
May 20, 2021, 4:42:53 AM5/20/21
to discuss, Yilong Li, Gabe Schine, thacke...@gmail.com, Amit Uttamchandani, discuss, James Tucker

Does this affect other versions of Ubuntu, or Debian? Last I checked it was working fine for me on 20.04.

Yilong Li

unread,
May 20, 2021, 7:31:08 AM5/20/21
to Camden Bruce, discuss, Gabe Schine, thacke...@gmail.com, Amit Uttamchandani, James Tucker
The change has landed on both "fx vdl" and "fx emu" scripts (https://fuchsia-review.googlesource.com/c/fuchsia/+/530910) to set "downscripts" argument correctly, so it should work now for any distros.



--
-Yilong

Camden Bruce

unread,
May 20, 2021, 7:45:51 PM5/20/21
to discuss, Yilong Li, discuss, Gabe Schine, thacke...@gmail.com, Amit Uttamchandani, James Tucker, Camden Bruce
Okay cool
Reply all
Reply to author
Forward
0 new messages