I've created a Windows XP image and I'm booting it with qemu. When using "user mode networking" via
-net user, my guest os (windows xp) gets the 10.0.2.15 IP assigned and I can ping 10.0.2.2 so Windows drivers are installed correctly.
Unfortunately I'm unable to access anything else. I read tutorials and I found that "user mode networking" doesn't forward connections to internet, and I've to use either TAP device, or Bridge device.
I'm unfamiliar with these devices and the tutorials are very confusing and complicated.
One of tutorials suggested that I use qemu-bridge-helper. I configured /etc/qemu/bridge.conf to allow br0 bridge device and created the br0 device via
brctl addbr br0.
I followed the tutorials and booted my winxp this way:
qemu-system-x86_64 --enable-kvm -m 2048 \ -drive file=winxp.img,if=virtio \ -net nic,model=virtio \ -net bridge,br=br0
The image boots nicely but I don't get an IP address. The reason is that Windows is configured to use DHCP but "br0" is not providing a DHCP address as it's just a bridge interface (somehow tied with tap0 but I'm not sure what that means).
My question is - how do I configure "br0" to give addresses to winxp over DHCP? Do I've to run a dhcp server on tap0 interface? How is br0, tap0 and eth0 related? (eth0 is my static IP interface, the only internet interface.)
My second question is - is there an easier way to configure all of this to allow simple internet access to guest os?