One thing that I wanted to do with the new host was track bandwidth usage upon a per-guest basis.
This should be possible with something like vnstat - however solutions counting traffic by interface name are not a good mesh with Xen - since by default a guest will have an interface with a name like 'vif20.0' - and no means of mapping that to a specific guest.
Each of my guests has been allocated three IPs which are defined like this in the Xen configuration file:
vif = [ 'ip=188.8.131.52 184.108.40.206 220.127.116.11' ]
This works prefectly.
This also works:vif = [ 'ip=18.104.22.168,vifname=foo 22.214.171.124 126.96.36.199' ]
Unfortunately anything else I've tried to give each IP a static interface name fails. I've seen reports of this online but no solutions.
Given a configuration file like this the Xen guest doesn't receive any traffic upon the second + third address:vif = [ 'ip=188.8.131.52,vifname=foo1', 'ip=184.108.40.206,vifname=foo2', 'ip=220.127.116.11,vifname=foo3' ]
Any suggestions welcome.