Giter Club home page Giter Club logo

firevm's Introduction

FireVM

Utility to create slim VM images from docker container images. The idea behind this is you can leverage the existing great tooling for docker images and get an incredible easy workflow to compose your VM images too.

asciicast

Example:

# We create our new VM definition via regular container tooling 
docker build -t my-vm-template:latest .
# We create our 200MB QCOW2 VM image from container image
firevm my-vm-template:latest -s 200 -f qcow2 -o my-vm-template.qcow2
# Launch our new VM
sudo virt-install --name my-vm --ram 1024 --disk /my-vm-template.qcow2,bus=virtio \
    --boot hd --network user,model=virtio --nographics --os-type linux --import

Requisites

  • Docker CE installed
  • QEMU utilities installed
  • Python 3.6+

How works?

FireVM tool is inspired in Firecraker's Ignite project which provided a similar idea focused on VMs targeted to run in Firecracker only. Our goal in firevm is to ignite slim and generic cloud VM images suitable for a wider range of hypervisors like KVM and Hyper-V.

The PoC was tested on CentOS 8.

Filesystem interface

Docker images can include the Linux kernel and optionally a linux kernel can be injected by using the --kernel option and specifying a separated docker image for it. Any case, FireVM expects by default the following files:

  • Kernel image: /boot/vmlinuz
  • initramfs image (optional): /boot/initramfs

Available Kernel Images

They are Docker images holding kernel compiled and ready to use

  • jairov4/firevm-kernel:5.10.25-amd64
  • jairov4/firevm-kernel:5.4.108-amd64
  • jairov4/firevm-kernel:4.19.183-amd64
  • jairov4/firevm-kernel:4.14.227-amd64

Compiling own kernel image

cd kernel
make

Troubleshooting

Remember setup your file ACL in home directory for KVM usage to allow qemu user walk in.

sudo setfacl -m u:qemu:rx /home/$USER/ 

firevm's People

Contributors

jairov4 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.