diff --git a/iohyve b/iohyve index e5549d3..c9cf7dd 100755 --- a/iohyve +++ b/iohyve @@ -612,6 +612,7 @@ __prepare_guest() { local dataset="$(zfs list -H -t volume | grep $name | grep disk0 | cut -d '/' -f 1-3 | head -n1)" local pci="$(__get_zfs_pcidev_conf $dataset)" local tap="$(zfs get -H -o value iohyve:tap $dataset)" + local bridge="$(zfs get -H -o value iohyve:bridge $dataset)" # Setup tap if needed if [ $tap ] && [ $tap != "-" ]; then if [ $tap != "tap0" ]; then @@ -621,7 +622,13 @@ __prepare_guest() { if [ -z $tapif ]; then # create tap interface ifconfig $tap create - ifconfig bridge0 addm $tap + # add tap interface to bridge + # use bridge0 unless there is a specific bridge property + if [ -z $bridge ]; then + ifconfig bridge0 addm $tap + else + ifconfig $bridge addm $tap + fi fi fi # Add a virtio-net pci device for the tap