0

So I'm trying to run my fuchsia emulator but I keep running into the same problem. I'm running on a Virtualbox VM of Ubuntu v20.04. I set up and built core.qemu-x64 according to the getting started instructions on fuchsia.dev website. However, whenever I run fx vdl start -N while in the fuchsia directory I just get "[info] Waiting for emulator to start..." which it repeats endlessly. Looking at the logs it shows the error message "Reading sdk version errored: No such file or directory (os error 2)". This seems like why the emulator is failing to start. Looking online it seems to be a problem with how this version of Ubuntu resolves certain imports.

Is there a way I can start the emulator that would tell me what file(s) this error is coming from so I can manually resolve it? Otherwise, is there another solution that could fix this issue?

Thank you for any input, please let me know if I can provide any additional information.

Below is a screenshot of the output: enter image description here

Edit: I tried fx qemu -kN and got this output but no change to the original start behaviour: enter image description here

I also tried fx emu and got this output, still no change to the original start: enter image description here

Andrew
  • 585
  • 1
  • 7
  • 17
  • 1
    I never used vdl before, can you try and see if `fx qemu -kN` or `fx emu` work? I filed fxbug.dev/73247 so this gets resolved. – Marco Mar 27 '21 at 22:59
  • Thanks, I tried those but they didn't seem to have any effect. I added the output in case it was useful in some way. – Andrew Mar 28 '21 at 17:29
  • Did you enable KVM? The first screenshot contains the instructions to add your user to the KVM group and then logout and login to reliably pickup the membership change. – Clayton Wilkinson Mar 28 '21 at 20:22
  • I did try to, but it didn't work. The first command `sudo chmod 666 /dev/kvm` failed because my system doesn't have the directory. I originally assumed that 'KVM acceleration' just made it run faster. After looking into it more it seems VirtualBox doesn't have the best support for KVM: https://stackoverflow.com/questions/21861794/enable-kvm-on-ubuntu-running-on-virtualbox-on-windows. Is that something I need to run Fuchsia? – Andrew Mar 28 '21 at 23:36
  • 1
    You don't need KVM to run fuchsia, just run `fx qemu -N`, that would start qemu without KVM acceleration. (It runs orders of magnitude faster with kvm), as for `fx emu`, IIRC it uses kvm by default, so maybe you can disable it ? – Marco Mar 29 '21 at 07:19
  • Cool, I think that may have resolved my issue then. After running that command, increasing my VM's RAM, following some extra instructions on that command, and restarting the VM it seems to have started the Fuchsia emulator. Later today I'll verify it all works and create an actual answer for this post. Thanks for the help! – Andrew Mar 29 '21 at 14:15

1 Answers1

1

So I was able to resolve it eventually and first of all, I'd recommend increasing the allocated RAM of your VM. I went from 2GB to 7GB and I'm pretty sure that resolved part of it. Then continue with Marco's recommendations. The command fx qemu -N (or fx qemu -Nk if you have kvm enabled) seemed to do it for me. After I ran that I got another error message with a different command to run. Once I ran that new command and reran fx qemu -N it seemed to start working. Finally opening another terminal and starting fuchsia with fx vdl start -N made the emulator start up just fine. Thanks for the help everyone!

Andrew
  • 585
  • 1
  • 7
  • 17