SolusVM no bandwidth stats on VPS/VM on Xen 4 slave

So I installed SolusVM Slave on a Xen 4 box and everything was working fine (create, reboot, delete, modify VPS/VM) except no bandwidth stats for the individual VMs.

I opened a ticket with SolusVM and it was not apparent what the problem was (to them) so they had me check various things:

1) Please can you run upcp on your Master in SSH

I did that, same results, no bandwidth counting on slave VPS/VM. So they suggest:

In a VPS on a Xen slave please download a large file such as a CentOS DVD and let me know if this counts.

Same thing, so I get frustrated and completely wipe out the Master, reinstall using the

backup database/restore procedure here: http://wiki.solusvm.com/index.php/Moving_The_SolusVM_Master

And everything the same. And now from Solus:

Can you paste me this file please on your master: /usr/local/solusvm/log/bandwidth.log

So it showed no bandwidth counting on the Xen VPS.

I need to see your xen scripts, iptables config and a full output of iptables on the server.

Which showed no bandwidth counting.

I need the output of iptables -L -nxv

Which showed:

3352959 4971885604 ACCEPT     all  —  *      *       0.0.0.0/0            0.0.0.0/0           PHYSDEV match –physdev-out vifvm101.0 –physdev-is-bridged
0        0 ACCEPT     udp  —  *      *       0.0.0.0/0            0.0.0.0/0           PHYSDEV match –physdev-in vifvm101.0 –physdev-is-bridged udp spt:68 dpt:67
0        0 ACCEPT     all  —  *      *       0.0.0.0/0            0.0.0.0/0           PHYSDEV match –physdev-out vifvm101.0 –physdev-is-bridged
1514200 82967656 ACCEPT     all  —  *      *       192.1.1.183         0.0.0.0/0           PHYSDEV match –physdev-in vifvm101.0 –physdev-is-bridged
36405 54415322 ACCEPT     all  —  *      *       0.0.0.0/0            0.0.0.0/0           PHYSDEV match –physdev-out vifvm101.0 –physdev-is-bridged
0        0 ACCEPT     udp  —  *      *       0.0.0.0/0            0.0.0.0/0           PHYSDEV match –physdev-in vifvm101.0 –physdev-is-bridged udp spt:68 dpt:67
0        0 ACCEPT     all  —  *      *       0.0.0.0/0            0.0.0.0/0           PHYSDEV match –physdev-out vifvm101.0 –physdev-is-bridged
15135   814960 ACCEPT     all  —  *      *       192.1.1.183         0.0.0.0/0           PHYSDEV match –physdev-in vifvm101.0 –physdev-is-bridged
26217  3811598 ACCEPT     all  —  *      *       0.0.0.0/0            0.0.0.0/0           PHYSDEV match –physdev-out vifvm103.0 –physdev-is-bridged
0        0 ACCEPT     udp  —  *      *       0.0.0.0/0            0.0.0.0/0           PHYSDEV match –physdev-in vifvm103.0 –physdev-is-bridged udp spt:68 dpt:67
0        0 ACCEPT     all  —  *      *       0.0.0.0/0            0.0.0.0/0           PHYSDEV match –physdev-out vifvm103.0 –physdev-is-bridged
3731   546174 ACCEPT     all  —  *      *       192.1.1.184         0.0.0.0/0           PHYSDEV match –physdev-in vifvm103.0 –physdev-is-bridged
10170503 15208761930 ACCEPT     all  —  *      *       0.0.0.0/0            0.0.0.0/0           PHYSDEV match –physdev-out vifvm102.0 –physdev-is-bridged
0        0 ACCEPT     udp  —  *      *       0.0.0.0/0            0.0.0.0/0           PHYSDEV match –physdev-in vifvm102.0 –physdev-is-bridged udp spt:68 dpt:67
0        0 ACCEPT     all  —  *      *       0.0.0.0/0            0.0.0.0/0           PHYSDEV match –physdev-out vifvm102.0 –physdev

So Solus said:

You need to remove the mangle rules. They are stopping data passing over the bridge.

Which sounds reasonable so I:

iptables -F -t mangle

And it stays the same so I say: “What mangle rules?”

And they, in effect, tell me to clear iptables (iptables -F) and then let the Solus process redo them (in 15 minutes) which I did and now iptables is letting bandwidth to go through.

So I searched for the root cause of where those iptables lines were coming from as a

restart brought them back, found them in xen scripts:

# cd /etc/xen/scripts/
# grep physdev *
network-bridge:    iptables -A FORWARD -m physdev –physdev-in ${pdev} -j ACCEPT
vif-common.sh:  iptables “$c” FORWARD -m physdev –physdev-is-bridged –physdev-in “$dev” \
vif-common.sh:  iptables “$c” FORWARD -m physdev –physdev-is-bridged –physdev-out “$dev” \

# rpm -qa | grep xen
xen-libs-4.1.0-2.el5
kernel-xen-2.6.18-238.9.1.el5
xen-4.1.0-2.el5

I commented out those lines and now on a restart the SolusVM Master is able to read bandwidth stats from the individual VPS/VM.

Leave a Reply

Your email address will not be published. Required fields are marked *