Can vagrant work with qemu-system-{arm,aarch64}?

325 views
Skip to first unread message

Vladimir Goyda

unread,
Nov 28, 2019, 6:39:37 PM11/28/19
to Vagrant
I have tuples for multiple linux distributions: xenial, bionic, buster for armhf and aarch64

Each tuple contains an image of the root filesystem, initrd.img and vmlinuz files. 

They work fine with qemu-system-arm and qemu-system-aarch64

Can we use them with vagrant?

for example, qemu works fine this way:

#!/usr/bin/env bash
qemu-system-aarch64 -name final-buster-arm-64 \
    -smp 4 -m 1200M -M virt  -cpu cortex-a57  \
    -initrd initrd.img \
    -kernel vmlinuz \
    -append 'root=/dev/sda1 console=ttyAMA0' \
    -global virtio-blk-device.scsi=off \
    -device virtio-scsi-device,id=scsi \
    -drive file=debian-arm64-final.qcow2,id=rootimg,cache=unsafe,if=none -device scsi-hd,drive=rootimg \
    -drive file=ephemeral.qcow2,id=ephemeral,cache=unsafe,if=none -device scsi-hd,drive=ephemeral \
    -netdev user,hostfwd=tcp::22022-:22,id=net0 -device virtio-net-device,netdev=net0 \
    -nographic

How to cook Vagrantfile to use it with vagrant?
Is it possible?

Thanks in advance
Vlad

dragon788

unread,
Nov 29, 2019, 8:11:52 AM11/29/19
to Vagrant
You should check out this plugin that lets you use libvirt/qemu as the virtualization engine for Vagrant. https://github.com/vagrant-libvirt/vagrant-libvirt

You'll also probably want to build your boxes using Packer with libvirt compatible templates (should be easy to find in GitHub).

dragon788

unread,
Nov 29, 2019, 8:15:38 AM11/29/19
to Vagrant
Reply all
Reply to author
Forward
0 new messages