On Thu, Aug 30, 2012 at 09:12:19AM +0300, John Basila wrote: > When running multiple instances of QEMU from the same image file > (using -snapshot) and connecting each instance to a dedicated TAP > device, the Guest OS will most likely not be able to communicate > with the outside world as all packets leave the Guest OS from the > same IP and thus the Host OS will have difficulty returning the > packets to the correct TAP device/Guest OS. Stateless Static > Network Address Translation or SSNAT allows the QEMU to map the > network of the Guest OS to the network of the TAP device allowing > a unique IP address for each Guest OS that ease such case. > The only mandatory argument to the SSNAT is the Guest OS network > IP, the rest will be figured out from the underlying TAP device. > > Signed-off-by: John Basila <jbas...@checkpoint.com> > --- > net/tap.c | 369 > +++++++++++++++++++++++++++++++++++++++++++++++++++++- > qapi-schema.json | 5 +- > qemu-options.hx | 10 ++- > 3 files changed, 381 insertions(+), 3 deletions(-)
This does not work with vhost=on because the host<->guest packet processing happens in vhost_net.ko instead of in QEMU. Use iptables on the host to NAT the tap interface. Stefan