unikraft / app-python3

Unikraft Python3 app repo
12 stars 9 forks source link

Failed to mount /: 0 #5

Open jonrob opened 3 years ago

jonrob commented 3 years ago

When running kraft up -p kvm -m x86_64 -t python3 --memory 1024 demo it fails to boot with the following error:

SeaBIOS (version 1.14.0-2)
Booting from ROM...
[   69.438952] CRIT: [libvfscore] rootfs.c @ 85   : Failed to mount /: 0
[   69.561104] ERR:  [libukboot] boot.c @ 92   : Init function at 0x11e360 returned error -1

Any suggestions on debugging? Thanks.

FredrikBakken commented 3 years ago

Hi @jonrob!

I encountered the same issue and have not found a good way to solve it with kraft yet, but using qemu-system-x86_64 seems to work. To execute the example, you can do the following:

  1. cd in the ~/.unikraft/apps directory
  2. Use kraft to initialize the python3 application: kraft init -t python3@staging python3
  3. Use kraft menuconfig to select: 1) KVM as the platform, 2) Python 3 in library configuration -> "also provide main function", 3) vfscore in library configuration -> with 9PFS
  4. Back in the application directory, create a sub-directory named fs0 and extract the contents of minrootfs.tgz in this sub-directory
  5. In the root directory of the application, build it: kraft build
  6. After successfully build it, run it:
    sudo qemu-system-x86_64 \
    -fsdev local,id=myid,path=$(pwd)/fs0,security_model=none \
    -device virtio-9p-pci,fsdev=myid,mount_tag=rootfs,disable-modern=on,disable-legacy=off \
    -kernel build/python3_kvm-x86_64 \
    -append "-- helloworld.py" \
    -enable-kvm \
    -m 1G \
    -nographic

If you get some errors - try to set the unikraft version to usoc21 and the library versions to staging.