QEMU networking quirkiness on 7.0

Andrew Cid andrew at accid.net
Thu Apr 10 10:05:35 UTC 2008


> Yes, this needs to be setup on the host system.  The way a bridge is
> configured has changed on 7.  Here are the steps assuming that your
> external interface is em0:
> 
> # ifconfig tap0 create
> # ifconfig tap0 up
> # ifconfig em0 up
> # ifconfig bridge0 create
> # ifconfig bridge0 addm tap0 addm em0
> 
> Now tap0 and em0 are bridged together.  You should configure your
> external IP on the bridge instead of em0 as you normally would.  If you
> use DHCP then:
> 
> # dhclient bridge0

Forgot to add that you'll also need to create the /etc/qemu-ifup script,
otherwise this won't work.  That's what the script should look like:

#!/bin/sh
ifconfig ${1} up
 

Don't forget to make it executable:

# chmod 755 /etc/qemu-ifup

> And start qemu:
> 
> # qemu -boot c -net nic -net tap -hda <path_to_your_disk_image>
> 
> Now the VM should be able to see your LAN and get an IP from DHCP (if
> that's what you use on your LAN)

-- 
accid.net


More information about the freebsd-questions mailing list