unikraft / pykraft

Python library for configuring and building unikernels

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails with "kraft up"

nkcr opened this issue · comments

Trying to use this example with kraft up -F -p kvm -m x86_64 helloworld-go from a virtual machine running ubuntu server 20.04.1 I get the following:

(...)
2020-10-08 11:33:34 INFO     make: Leaving directory '/home/nkcr/.unikraft/unikraft'
Trying to get root privileges...
[sudo] password for nkcr: 
**************************************************************************
 QEMU:
   Name:                  47b009db-0713-4f80-b4e7-b865729387ba
   PID:                   13567
   Monitor socket:        /run/qemu-guest-13551_monitor.socket
   VNC listen:            5900

   SMP configuration:     sockets=1,cores=1,threads=1
   Memory:                64 MB
   Kernel:                /home/nkcr/first-unikernel/build/first-unikernel_kvm-x86_64
   Parameters:            console=ttyS0

   Warning: No networking for guest!
   Warning: Guest will be terminated with CTRL+C!
**************************************************************************
Starting VM...
Connecting to serial output...
2020/10/08 11:33:43 socat[13579] E tcsetattr(5, TCSADRAIN, 0x56339c6b89c0): Inappropriate ioctl for device

and /run/qemu-guest-13551_monitor.socket does not exist.

(if I use the --background option, the process is created but I don't know where to get the Unikernel's output)

This is a bug with socat. Downgrading to a slightly earlier version worked with me when I had this problem. 🙂

Great, thank you for the prompt answer :). I made a step forward using socat 1.7.3.4.
Now this is what I get:

SeaBIOS (version 1.13.0-1ubuntu1)
Booting from ROM...
Welcome to  _ __             _____
 __ _____  (_) /__ _______ _/ _/ /_
/ // / _ \/ /  '_// __/ _ `/ _/ __/
\_,_/_//_/_/_/\_\/_/  \_,_/_/ \__/
                 Rhea 0.4.0~00bbf2c
fatal error: runtime: cannot reserve arena virtual address space
runtime: use of FixAlloc_Alloc before FixAlloc_Init
fatal error: runtime: internal error

No worries. Looks like you have another different issue on your hands ;).

Closing as issue resolved.

The bug seems to be patched in socat 1.7.4.1.

"
According to the Changelog from socat-1.7.3.4[1] this is a know problem (Under certain circumstances, termios options of the first address were applied to the second address, resulting in error "Inappropriate ioctl for device"). The upstream commit[2] fixes this issue (also released in socat-1.7.3.4).

Thanks, Sascha.

[1] http://www.dest-unreach.org/socat/doc/CHANGES
[2] https://repo.or.cz/socat.git/commit/5ebf36038f3960798e769bff5646e755a91a1119
"
source: https://bugs.launchpad.net/ubuntu/+source/socat/+bug/1883957

If you are using Ubuntu here are the steps to update it:

- wget http://archive.ubuntu.com/ubuntu/pool/main/s/socat/socat_1.7.4.1-3ubuntu1_amd64.deb
- sudo apt install ./socat_1.7.4.1-3ubuntu1_arm64.deb

More information: https://ubuntu.pkgs.org/21.10/ubuntu-main-amd64/socat_1.7.4.1-3ubuntu1_amd64.deb.html