Limit the download speed of KVM based VM
I have an infrastructure similar to the below.
vm > kvm guest > firewall > router
Issue is that the VM sometimes download burst of data from internet and entire network hangs up. So, I want to shape the internet traffic. My link speed is 8 MB/s and its desirable to give a maximum of 2MB/s for the VM, but, not beyond that.
My question is, if I use "tc" within the VM to limit inbound and outbound traffic, will it shape the traffic from internet to the VM ? My understanding is that, it will not, since it will queue up the download data at the maximum speed possible till the KVM guest and restriction applies only between the VM and KVM guest.
If I'm correct, what should be done to shape the internet download traffic throughout without the VM utilizing all the internet bandwidth for downloading data ?