Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 18th December 2011
gpatrick gpatrick is offline
Package Pilot
Join Date: Nov 2009
Posts: 219
Default qemu networking

OpenBSD 5.0 is installed and ran a pkg_add for qemu-0.14.1p4. I have created a disk image for OpenBSD 5.0 and can successfully start qemu with that image, however, I am unable to get networking for the OpenBSD guest inside Qemu.

I followed an article on undeadly.org:
# cat /etc/hostname.bridge0
add re0
add tun0

#cat /etc/hostname.tun0
link0 up

# cat /etc/rc.local
if [ -x /usr/local/bin/qemu ]; then
    echo -n 'Qemu: vmi386'
    sh -c "sudo -C 4 -u qemuuser \
        /usr/local/bin/qemu \
        -daemonize \
        -nographic \
        -net nic,vlan=0,model=rtl8139,macaddr=aa:aa:aa:aa:aa:aa \
        -net tap,vlan=0,fd=3,script=no \
        -m 512 \
        -hda /path/to/raw/disk.img \
        -serial null \
        -monitor null \
        -no-fd-bootchk 3<>/dev/tun0"
    echo "."
Note: I changed the MAC.

But I am unable to get it to work. I get:
Qemu: vmi386qemu: -net, tap,vlan=0,fd=3,script=no: ifname=, script=, downscript= 
and vnet_hdr= is invalid with fd=
qemu: -net tap,vlan=0,fd=3,script=no: Device 'tap' could not be initialized
I have searched for Qemu networking on an OpenBSD host but there isn't much out there. Does anyone have steps to get networking with tap/tun in an OpenBSD guest using Qemu on an OpenBSD host?
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenBSD QEMU-1.0-RC2 J65nko News 2 17th November 2011 03:07 PM
qemu & kqemu adamk FreeBSD General 10 9th October 2008 03:27 PM
Jailed QEMU + other OS revzalot FreeBSD Installation and Upgrading 3 29th May 2008 06:00 PM
ssh to FreeBSD run in Qemu mfaridi FreeBSD Security 11 19th May 2008 01:00 PM

All times are GMT. The time now is 06:40 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick