(was Re: nat does not work with hvm)
Hello there,
Sorry for resurrecting such an old discussion, but I just stumbled upon the same problem.
2007/4/14, Keir Fraser <[email protected]>:
Quoted 4 lines · Erdem Bayer
Quoted 1 line
Also should there also be a qemu-ifdown script to undo the changes?
Not needed. Everything should tear down automatically when the qemu process dies.
That is only partially correct. The interface gets removed, yet all iptables rules associated with it remain. Over time (reboots) many bogus rules accumulate, which never get removed.
I checked the source for qemu-dm and found no reference to qemu-ifdown.
Anyway, the problem I have myself is that qemu-ifup does not know to what VM the newly created tun device belongs. This way I cannot associate special forwarding rules for certain VMs which survive reboots as the tun device has not the same ID as the VM.
I created a workaround in qemu-ifup which first removes any firewall rules associated with the tap device and then creates the new rules.
This is esthetically unpleasing. :-)
Are there plans to improve this situation, or is it already solved in the HEAD branch?
--
Christoph