virtual network with qemu

Roland Smith rsmith at
Thu May 14 16:31:53 UTC 2009

On Thu, May 14, 2009 at 07:53:32AM +0200, marco.borsatino at wrote:
> Hi to all.
> I'd like to implement a little virtual network using QEMU 0.10.2, but, until now, I have failed.
> This is the situation.
> Host: AMD 64 running FreeBSD 7.2
> #ifconfig
> nfe0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
> 	ether 00:15:f2:44:2d:f9
> 	inet netmask 0xffffff00 broadcast
> 	media: Ethernet autoselect (100baseTX <full-duplex>)
> 	status: active
> plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> metric 0 mtu 1500
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
> 	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 
> 	inet6 ::1 prefixlen 128 
> 	inet netmask 0xff000000 
> I've create an image using the FreeBSD 7.2 DVD:
> #qemu-img create -f qcow2 hda fbsd72.img 10G
> The image has been created.
> #qemu -L /usr/local/share/qemu/ -cdrom /dev/acd0 -m 512 -boot d fbsd72.img
> Alfter a long time, the installation of the guest system has been completed.

It would probably be faster to use a FreeBSD ISO image instead of the
real CD drive. 

> When the installation program asked for information about network
> configuration, as a first step, I chose DHCP configuration and, as
> usualy, the network has been set like this:
> IP
> gateway
> nameserver
> When the installation of the guest PC was finished, I've copied the 
> image to pc01.img, to keep the original untouched. After that I've started qemu like this:
> #qemu -L /usr/local/share/qemu -localtime -net nic,macaddr=00:15:f2:44:2d:01 -net socket,mcast= -hda pc01.img -cdrom /dev/acd0 &
> but the network in the guest system does not work.

Try the following command instead:

qemu -L /usr/local/share/qemu -localtime -net nic -net user -hda pc01.img

[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list