Git Product home page Git Product logo

Comments (7)

hlef avatar hlef commented on September 15, 2024

It seems that a few configuration options are missing to support virtio-blk drives:

CONFIG_PCI=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_BLK_SCSI=y

This one might also be needed:

CONFIG_VIRTIO_PCI_LEGACY=y

from lupine-linux.

Moses20 avatar Moses20 commented on September 15, 2024

Same problem here.

@hlef were you able to get it to run on QEMU/KVM? If so, could you comment the line command in here?

from lupine-linux.

hlef avatar hlef commented on September 15, 2024

Yes, I managed to get it running on QEMU/KVM. You need to use the compressed kernel (Firecracker uses uncompressed kernels).

You can pass the usual ext2 filesystem using -drive (virtio-blk-pci, format raw).

For networking, the usual tap works.

For the kernel command line, pass something like

root=/dev/vda rw console=ttyS0 init=/guest_start.sh /bin/something

from lupine-linux.

Moses20 avatar Moses20 commented on September 15, 2024

If I understand you correctly, I have to compress the vmlinux with gzip in order for QEMU to run the kernel.

So I executed the following command:
sudo qemu-system-x86_64 -nographic -kernel vmlinux.gz \ -drive "file=$FILE.ext2,format=raw,if=none,id=hd0" \ -device virtio-blk-pci,id=blk0,drive=hd0,scsi=off \ -append "console=ttyS0 root=/dev/vda init=/bin/bash"

Sadly, this command gets me stuck in "Booting from ROM..".

As you can tell, I am fairly new to QEMU and thankful for any help.

from lupine-linux.

hlef avatar hlef commented on September 15, 2024

Oh, no, it's not only a matter of compressing the image, you should use vmlinuz-4.0.0 instead of vmlinux. :-)

Otherwise it looks mostly okay.

from lupine-linux.

Moses20 avatar Moses20 commented on September 15, 2024

Thank you, the unikernel is up and running now.

Just one little problem: I want to be able to talk to the guest from outside the host. I tried setting up a tap, where the tap and interface are added to a bridge.

And then running Qemu with following two flags:

-netdev tap,id=mynet0,ifname=tap1,script=no 
-device virtio-net-pci,netdev=mynet0,id=nic0  

Do I have to do some extra stuff besides executing the 'guest_net.sh' to get access to my local network?

from lupine-linux.

hlef avatar hlef commented on September 15, 2024

No, it should work like that.

from lupine-linux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.