haiku/3rdparty/vagrant
Alexander von Gluck IV 9e25244c5e 3rdparty/vagrant: Add our vagrant templates
* I have to figure out how to do this every major
  release, put here to document somewhat.
* The os images are empty files for obvious reasons
* This vagrant box is used by qemu for their automated
  testing under Haiku
  https://github.com/qemu/qemu/blob/master/tests/vm/haiku.x86_64

Change-Id: I8e02104063284a96e1672051e3d504a78a64cfe3
2022-02-16 12:09:06 -06:00
..
libvirt 3rdparty/vagrant: Add our vagrant templates 2022-02-16 12:09:06 -06:00
virtualbox 3rdparty/vagrant: Add our vagrant templates 2022-02-16 12:09:06 -06:00
README.md 3rdparty/vagrant: Add our vagrant templates 2022-02-16 12:09:06 -06:00
Vagrantfile 3rdparty/vagrant: Add our vagrant templates 2022-02-16 12:09:06 -06:00

Haiku Vagrant boxes

Haiku, Inc. has access to draft a new release at Vagrant

https://app.vagrantup.com/haiku-os

Creating libvirt box

Create base image: qemu-image -f qcow2 libvirt/box.img 8G

Install Haiku: qemu-system-x86_64 --enable-kvm -hda libvirt/box.img -cdrom <haiku.iso> -m 1G

Boot Haiku: qemu-system-x86_64 --enable-kvm -hda libvirt/box.img -m 1G

Update software:

pkgman update
<reboot>
pkgman install vim

Install vagrant public key:

mkdir ~/config/settings/ssh
wget https://raw.githubusercontent.com/hashicorp/vagrant/main/keys/vagrant.pub -O ~/config/settings/ssh/authorized_keys
chmod 700 ~/config/settings/ssh
chmod 600 ~/config/settings/ssh/authorized_keys

Rename "user" to "vagrant" by editing /etc/passwd. Change "user" to "vagrant"

Packaging libvirt

cd libvirt
tar cvzf ../libvirt.box *

Creating VirtualBox box

qemu-image convert -f qcow2 -O vmdk libvirt/box.img virtualbox/box-0001.vmdk
cd virtualbox
tar cvzf ../virtualbox.box *