kvm guest // netbsd ext2fs

bsd/ext2fs | bsd/ext2fs-boot | xen guest | kvm guest

setup

guest=nbext2fs
vdisk=$guest.img

mkdir -p /data/guests/$guest/
cd /data/guests/$guest/

start clean

    virsh list --all
virsh destroy $guest
virsh undefine $guest

mount | grep lala
umount lala/

    losetup --all
losetup --detach=/dev/loop0

rm -f $vdisk

prepare virtual disk

dd if=/dev/zero of=$vdisk bs=1G count=0 seek=10

ls -lF /data/kernels/netbsd100.pfaltq
ls -lF /data/netbsd100/

# https://pub.nethence.com/bin/bsd/installext2fs.conf
vi ../installext2fs.conf

(tune accordingly)

# https://pub.nethence.com/bin/bsd/installext2fs-baremetal2.bash
../installext2fs-baremetal2.bash $guest $vdisk

ready to go

    virsh create $guest.xml --console

eventually clean-up the dirty hacks

cd /
rm -f .makedev_done

cd /etc/
mv -f rc.local.dist rc.local

yandex cloud

see guest-netbsd-yx-cloud

resources

https://www.qemu.org/docs/master/system/images.html#disk-image-file-formats


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun