Index: user/marcel/libvdsk/vmrun.sh =================================================================== --- user/marcel/libvdsk/vmrun.sh (nonexistent) +++ user/marcel/libvdsk/vmrun.sh (revision 286980) @@ -0,0 +1,36 @@ +#!/bin/sh + +# Set our defaults +brif=bridge0 +memsz=1024M +ncpu=`sysctl -n hw.ncpu` +netif=`netstat -4rn | grep -e '^default ' | awk '{print $NF}'` +tapif=tap0 + +netif_exists() { + local netif=$1 + local iflist=`ifconfig -l` + for I in $iflist; do + if test $I == $netif; then + return 0 + fi + done + return 1 +} + +if ! kldstat -qm vmm; then + kldload vmm +fi + +if ! netif_exists $tapif; then + ifconfig $tapif create + sysctl net.link.tap.up_on_open=1 +fi + +if ! netif_exists $brif; then + ifconfig $brif create + ifconfig $brif addm $netif addm $tapif + ifconfig $brif up +fi + +exec sh /usr/share/examples/bhyve/vmrun.sh -c $ncpu -m $memsz -t $tapif "$@" Property changes on: user/marcel/libvdsk/vmrun.sh ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property