Skip to content

Instantly share code, notes, and snippets.

View pr1ntf's full-sized avatar

Trent pr1ntf

View GitHub Profile
@pr1ntf
pr1ntf / iohyvereadme.txt
Created October 15, 2015 15:47
Old iohyve readme detailing vnet
### Welcome! ###
# If you are just setting up shared networking, just set the guest's IP to a valid IP address
# on the host's network. If you choose to use VNET, you'll need to set a few more things up.
### Quick Pre-flight checklist ###
# iohyve's network is meant to work either via VNET or Shared IP, both utilizing tap(4)
# The goal is to potentialy have bhyve guests and iocage jails living on the same VNET
# Things labeled as NEEDED are needed at the very least for shared IP guests.
@pr1ntf
pr1ntf / win2k16bhyve-err1.txt
Created October 5, 2015 20:47
win2k16bhyve-err1.txt
==AtaAtapiPassThru Start== Controller = 3EEC3D98
port [0] port mulitplier [0] has a [cdrom]
CalculateBestPioMode: AdvancedPioMode = 3
IdeInitCalculateMode: PioMode = 4
CalculateBestUdmaMode: DeviceUDmaMode = 407F
IdeInitCalculateMode: UdmaMode = 5
InstallProtocolInterface: 1D3DE7F0-0807-424F-AA69-11A54E19A46F 3EEB8A40
InstallProtocolInterface: 143B7632-B81B-4CB7-ABD3-B625A5B9BFFE 3EEB8A90
InstallProtocolInterface: 19DF145A-B1D4-453F-8507-38816676D7F6 3EDA7698
InstallProtocolInterface: 0167CCC4-D0F7-4F21-A3EF-9E64B7CDCE8B 3EDA7420
@pr1ntf
pr1ntf / winbhyvesawce.txt
Last active October 5, 2015 19:21
Secret sauce for Windows and bhyve
Existing Windows installation ISOs expect a GUI console. To get around that, you have to do an "unattended install". Windows people seem to know all about this but it was new to me It basically is dropping down an XML file into the ISO that answers all the questions, and sets parameters.
Sample XML unattend scripts can be downloaded from
https://github.com/nahanni/bhyve-windows-unattend-xml
These set up an IP address with DHCP, use "Test123" for the 'Administrator' password, enable remote RDP access, and install virtio drivers. You may want to customize these, but they will work fine out of the box. Note the license keys in these have been scrubbed - they're generally not needed for server installs, but if you're going for a desktop install you'll probably want to add them in.
Assuming w2k16, the steps are:
- Install the p7zip and cdrtools-devel packages on FreeBSD (the versions I used on CURRENT were v9.38 and 3.01a24,1 respectively)
@pr1ntf
pr1ntf / plasma.py
Created September 17, 2015 14:11
PythonPlasma
# Python PIL (pillow) code to generate frame images out of a plasma algorithm
# Author: 2015 Thomas O. Robinson, cyranix@cyranix.net
# Open Source, no particular rights reserved. Would love to hear from anyone who reads, uses or improves it
# Certain research was done using http://www.bidouille.org/prog/plasma and http://lodev.org/cgtutor/plasma.html as references.
# I started this project because of a need to generate some random, psychedelicish grayscale animations for use in another project I am working on, and old school plasma screensavers seemed like a logical solution. Since there really wasn't any good tutorials on the net for implementing this, and literally nothing for python (which I am only using because the libraries for my other project only have bindings for C++ or python), which has some pretty poor documentation for working with images and graphics and pixel data and such, I set out on my own, and this is the result of about 3 days of inconsistent work. I've documented it the best I could
@pr1ntf
pr1ntf / debian8iohyve
Created July 29, 2015 04:13
Quick and dirty Debian 8 in iohyve
# Create the VM
iohyve create debianvm 8G nmdm8
# Set the correct bootloader
iohyve set debianvm loader=grub-bhyve
# Fetch the image
iohyve fetch http://cdimage.debian.org/debian-cd/8.1.0/amd64/iso-cd/debian-8.1.0-amd64-netinst.iso
# Install
@pr1ntf
pr1ntf / drillanswer.sh
Created July 2, 2015 19:21
human readable drill answer
drill TXT buttsbuttsbutts.xyz | grep -A1 ";; ANSWER" | sed 1d | cut -d '"' -f2
@pr1ntf
pr1ntf / bhyvesawce.sh
Last active September 12, 2023 00:52
iocage/bhyve notepad
# Create guest
# iohyve create $name $size $con
__create() {
local name="$2"
local pool="$(zfs list | grep iohyve | head -n1 | cut -d '/' -f 1)"
local size="$3"
local con="$4"
echo "Creating $name..."
# create dataset in case there needs to be files to store in the future. (grub2-bhyve)
zfs create $pool/iohyve/$name
@pr1ntf
pr1ntf / bootin.sh
Last active August 29, 2015 14:23
bootin
#!/bin/sh
guestlist="$(zfs list | grep iohyve | grep -v ISO | grep -v .img | cut -d ' ' -f 1 | cut -d '/' -f 3 | sed 1d)"
#echo $guestlist
for i in $guestlist ; do
bootprop="$(zfs get -H -o value iohyve:boot neuralnet/iohyve/$i)"
if [ $bootprop = "1" ]; then
iohyve start $i -p &
@pr1ntf
pr1ntf / iohyve-0.2.12.sh
Created June 4, 2015 22:51
Before the fork.
#!/bin/sh
# iohyve v0.2.12 2015/05/18 "persist docs"
# Process command line
__parse_cmd () {
while [ $# -gt 0 ] ; do
case "$1" in
version) __version
exit
,,,,;-;,,
,,;#################,
,########################,
,###########################>
,###############################,
,##################################>
,####################################>
,######################"^`,````$#######,
,####################%,;#####%##;"$#####>
$#################"`,##$%%%$$ `%#,$#####> ,;#####,,,