These two scripts are called when you start a qemu or kvm virtual machine. I removed the openvpn –mktun and –rmtun commands because qemu handles it for you.
TUN is for IP tunneling. TAP is for Ethernet tunneling. Check out vtun if you’re looking to get networking working in qemu or kvm for virtual tunnels over tcp/ip networks with traffic shaping, compression, and encryption. vtun also supports serial and pipe tunnels.
You’ve probably found an endless supply of URLs where people complain that they can’t get anything to boot with qemu-system-ppc and many supposed guides to follow that work. It’s almost impossible to find functional examples of how to run qemu-system-ppc without a kernel panic, core dump, or ending up in bios limbo. So here’s one way I came up with that works for me.
So you want to setup networking so virtual machines will have access to the outside world through your hosts network connection. To do this you’ll need to share your host’s external interface with virtual machines through a bridge. A bridge can join two network segments and be used to inspect all Ethernet frames that pass between them. Create a bridge and a tunnel interface. Assign the tunnel and your host’s Ethernet interface to the bridge. Connect the bridge to the outside world. Your host uses the network card in promiscuous mode to handle packets for other interfaces connected to the bridge.
QEMU is a generic and open source machine emulator and virtualizer. When used as a machine emulator, QEMU can run OSes and programs made for one machine architecture on a different machine architecture. This is different than VMware, VirtualBox, or Hyper-V where you’re running different operating systems on the same architecture.