aboutsummaryrefslogtreecommitdiffstats
path: root/roles/bhyve/templates
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2020-11-24 18:18:53 +0100
committerbinary <me@rgoncalves.se>2020-11-24 18:18:53 +0100
commit8478e90356b6738a13eed3878000d0e112074960 (patch)
treebde4fd7ceb716cf174d455dd4cb622b6c3241cf9 /roles/bhyve/templates
parentbeef4995064888e8193731e77eb718fbff0916f2 (diff)
downloadinfrastructure-8478e90356b6738a13eed3878000d0e112074960.tar.gz
Draft for sourcehut
Diffstat (limited to 'roles/bhyve/templates')
-rw-r--r--roles/bhyve/templates/alpine.conf.j27
1 files changed, 7 insertions, 0 deletions
diff --git a/roles/bhyve/templates/alpine.conf.j2 b/roles/bhyve/templates/alpine.conf.j2
index 9baf5c2..69979c0 100644
--- a/roles/bhyve/templates/alpine.conf.j2
+++ b/roles/bhyve/templates/alpine.conf.j2
@@ -8,6 +8,13 @@ network0_switch="{{ guest_switch }}"
disk0_type="virtio-blk"
disk0_name="disk0.img"
+{% for disk in guest_disks if disk.path is defined %}
+disk{{ disk.id }}_dev="custom"
+disk{{ disk.id }}_opts="sectorsize=512"
+disk{{ disk.id }}_type="ahci-hd"
+disk{{ disk.id }}_name="{{ disk.path }}"
+{% endfor %}
+
grub_install0="linux /boot/vmlinuz-virt initrd=/boot/initramfs-virt alpine_dev=cdrom:iso9660 modules=loop,squashfs,sd-mod,usb-storage,sr-mod"
grub_install1="initrd /boot/initramfs-virt"
grub_run0="linux /boot/vmlinuz-virt root=/dev/vda3 modules=ext4"
remember that computers suck.