qemu 0.8.1 and tun/tap networking

qemu’s documentation isn’t really crystal clear, and I lost a lot of time with this today.

The way you can link your guest system and your host system has changed between qemu 0.7 and 0.8, with the introduction of Virtual LANs. They are mandatory: you always have to use one, even if you only want to use one qemu instance.

When running qemu, you have to specify both endpoints :

  • the one to the host system (using -net tap)
  • the one to the guest system (using -net nic)

A working command line to start qemu looks like qemu -net nic -net tap -hda ….