unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#24156: QEMU '-net bridge' --> "qemu-system-x86_64: -net bridge: bridge helper failed"
@ 2016-08-05  2:40 myglc2
  2020-12-18 19:47 ` zimoun
  0 siblings, 1 reply; 5+ messages in thread
From: myglc2 @ 2016-08-05  2:40 UTC (permalink / raw)
  To: 24156

[-- Attachment #1: Type: text/plain, Size: 948 bytes --]


Motivation: bridging or routing is required to enable a connection to be
made inward to a QEMU VM. TAP seems like the best of the available
solutions. But connecting to a TAP device produces an error when the
QEMU bridge helper fails.

Example:

g1@g1 ~/src/vmb$ qemu-system-x86_64 -net user -net bridge -net nic,model=virtio -enable-kvm -m 4096 -k en-us -display curses /home/g1/src/vmb/tmp/img6/vm.img
failed to parse default acl file `/gnu/store/1072khbm9124a8a1pyyyw4mr1p12jsfq-qemu-2.6.0/etc/qemu/bridge.conf'
qemu-system-x86_64: -net bridge: bridge helper failed

This error was produced with the attached 'img-tap' script. e.g., to
build the vm ...

./img-tap mk 1

To (attempt to) run the vm ..

./img-tap run 1


Running Guix built from git checkout on GuixSD:
stat ~/.config/guix/latest | grep File:
  File: '/home/g1/.config/guix/latest' -> '../../src/guix'
g1@g1 ~/src/vmb$ git -C ~/.config/guix/latest describe
v0.11.0-242-g7ccb874



[-- Attachment #2: img-tap --]
[-- Type: application/octet-stream, Size: 1195 bytes --]

#!/run/current-system/profile/bin/bash
set -xe

# guix vm examples

# usage
# $ <scriptname> mk  [vm#] - mak image
# $ <scriptname> run [vm#] - run image

CMD=`basename "$0"`
VMNUM=${2:-""}
TMPDIR=$PWD/tmp/$CMD$VMNUM
mkdir -p $TMPDIR
cp $CMD $TMPDIR/$CMD

case $1 in
    mk)
	# save the vm config
	cp v1.scm $TMPDIR
	# save guix version 
	(stat $HOME/.config/guix/latest | grep File:) > $TMPDIR/guix-version
	# save guix config
	git -C ~/.config/guix/latest branch -av | grep '* master' >> $TMPDIR/guix-version
	# be sure the version of guix we have checked out is the one we are using
	make -C $HOME/.config/guix/latest -s > $TMPDIR/guix-make.log
	# make vm & copy image from of store
	cp -n $(guix system vm-image $TMPDIR/v1.scm --image-size=4GB) $TMPDIR/vm.img
	# make writeable
	chmod u+w $TMPDIR/vm.img
	;;

    run)
	# run the image
	# Note: '-k en-us' is a hack to get Mac XQuartz keys to "sort of work"
	qemu-system-x86_64 \
	    -net user \
	    -net bridge \
	    -net nic,model=virtio \
	    -enable-kvm \
	    -m 4096 \
	    -k en-us \
	    -display curses \
	    $TMPDIR/vm.img
	;;

    *)

	echo ERROR: you typed: \"$CMD $*\" which has missing arguments or invalid arguments

esac

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-13 21:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-05  2:40 bug#24156: QEMU '-net bridge' --> "qemu-system-x86_64: -net bridge: bridge helper failed" myglc2
2020-12-18 19:47 ` zimoun
2021-01-11 12:36   ` zimoun
2021-01-11 21:38     ` George Clemmer
2021-01-13 20:59       ` zimoun

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).