![]() |
![]() |
Subject: | Monitoring vnet interfaces |
Author: | [Not Specified] |
Posted: | 2014-06-03 08:42 |
We use KVM for virtualization. When we spin up new VMs a vnet interface is created for that VM. The default speed that the vnet interface is configured with is 10Mbps. That has no affect on the actual network speed of the VM its just what it gets set with. The problem is that I get alerts any time the VM pushes more than 10Mbps of traffic. Has anyone found a solution for this I was trying to get libvirt to set the interface speed of the vnet interface to 1000Mbps up vm creation/start but was unable to find any option to set the speed.
All ideas are welcome. Thank you in advance.
Subject: | Wiki Article |
Author: | [Not Specified] |
Posted: | 2014-06-03 09:56 |
Take a look at this wiki article, it includes a script to change the speed of an interface inside zenoss!
http://wiki.zenoss.org/ZenDMD_Tip_-_Change_Interface_Speed
Hydruid
Subject: | I saw that |
Author: | [Not Specified] |
Posted: | 2014-06-03 10:40 |
I saw that and it is cool. But I am trying to avoid having to run that script every time we add a new VM to our network.
Subject: | Im gonna try this. How can I |
Author: | [Not Specified] |
Posted: | 2014-06-03 10:50 |
Im gonna try this. How can I test to make sure that it wont mess anything up I tried uncommenting the print lines and comment the interface.speed and commit lines. It printed out the interface name and speed ~30 times. I just want to make sure it is not going to change the speed on ~30 interfaces.
Subject: | take a VM snapshot before |
Author: | [Not Specified] |
Posted: | 2014-06-03 11:07 |
take a VM snapshot before running it or spin up a dev server to see what happens :P
Hydruid
Subject: | Got it to work |
Author: | [Not Specified] |
Posted: | 2014-06-03 11:25 |
I had to make a change though. As is it was going to try to change the vnet0 interface for every device in zenoss. Even devices without vnet0. I made the following change to get it to only change a single device:
d = dmd.Devices.findDevice(DEVICE)
for dev in d.Devices.getSubDevices():
if dev == d: (<-- added this line)
value = d.getProperty(dev)
for interface in d.os.interfaces():
if INTERFACE == interface.id:
print ('interface.id = %s' % interface.id)
print ('interface.speed = %s' % interface.speed)
interface.speed = float(SPEED)
commit ()
Subject: | Did it work as intended? If |
Author: | [Not Specified] |
Posted: | 2014-06-03 11:43 |
Did it work as intended If so I'll update the wiki post!
Hydruid
Subject: | Success |
Author: | [Not Specified] |
Posted: | 2014-06-03 12:47 |
It did. It worked great. Thank you.
Subject: | Awesome! I will double |
Author: | [Not Specified] |
Posted: | 2014-06-03 13:09 |
Awesome! I will double confirm and update the wiki post! Thank you.
Hydruid
Subject: | I confirmed that it functions |
Author: | [Not Specified] |
Posted: | 2014-06-04 13:31 |
I confirmed that it functions properly and updated the wiki!
Hydruid
< |
Previous [SOLVED] Zenperfsnmp failing on cloned servers |
Next [Solved] Graph Data Order |
> |