Assorted shell and Python scripts
at main 726 B view raw
1#!/bin/sh 2# Purpose: Simple script to start my Debian VM using bhyve on FreeBSD 3# Original author: Vivek Gite (https://www.cyberciti.biz) under GPL v2.x+ 4# Modifications made by: hyperreal (https://hyperreal.coffee) under GPL v2.x+ 5 6if ! kldstat | grep -w vmm.ko; then 7 kldload -v vmm 8fi 9 10if ! kldstat | grep -w nmdm.ko; then 11 kldload -v nmdm 12fi 13 14if ! bhyve -c 4 -m 8G -w -H -s 0,hostbridge -s 4,virtio-blk,/dev/zvol/zroot/debianvm -s 5,virtio-net,tap0 -s 29,fbuf,tcp=0.0.0.0:5900,w=1024,h=768 -s 30,xhci,tablet -s 31,lpc -l com1,stdio -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd debianvm 2>/tmp/start_debian_vm_error; then 15 neomutt -s "[nas] start_debian_vm error" jas@nas </tmp/start_debian_vm_error 16fi