1
0
Fork 0
out-of-tree/tools/qemu-debian-img/Vagrantfile

23 lines
742 B
Ruby

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y debootstrap qemu golang
mkdir qemu-debian-img && cd qemu-debian-img
cp /vagrant/main.go ./
GOBIN=/usr/bin go get ./
export REPO=http://archive.ubuntu.com/ubuntu
for RELEASE in trusty xenial bionic; do \
qemu-debian-img generate --repository=$REPO --release=$RELEASE $RELEASE.img
cp $RELEASE.img /vagrant/
done
cp /boot/vmlinuz-* /vagrant/vmlinuz-bionic
cp /boot/initrd* /vagrant/initrd-bionic
cp /lib/modules/`uname -r`/kernel/lib/test_static_key_base.ko /vagrant/sample.ko
SHELL
end