Support of KVM Hypervisor Using VCB Customization
The purpose of this chapter is to present a possible solution on how to achieve device and fault management support for the KVM Hypervisor in the Prime Network. This can be accomplished via VCB Customizations.
Topics include:
Problem Statement
- Currently Prime Network does not support KVM Hypervisor. Therefore, when the user models it, Prime Network discovers it as an ‘Unsupported’ VNE.
- In case Prime Network supports KVM Hypervisor via VCB, then there occurs a problem with unsupported traps. If KVM Hypervisor sends a trap (for example, VM suspend traps), then Prime Network will consider it an unsupported trap and will display it under ‘Standard’ traps in Prime Network Events Application.
Background
Prime Network detects specific device type using its SysOID. Prime Network discovers the KVM Hypervisor as Unsupported because it does not have its SysOID and raises ‘Device Unsupported’ ticket.
To overcome this problem, user should configure the SysOID of KVM Hypervisor via VCB Customization.
Prime Network needs to know the snmpTrapOID of a trap to categorize it. Else, the trap will be shown as unsupported ‘Standard’ trap.
VCB allows configuration of end-to-end trap information in order to support it in Prime Network.
Solution
VNE Customization Builder (VCB) Tool of Prime Network provides solutions to overcome both the problems of unsupported device types and unsupported traps via simple customization. KVM Hypervisor will be supported using GenericUVNE template and modeled as a generic device. No virtualization specific inventory will be discovered. KVM-specific traps can then be supported using VCB Events customization.
Let us see about those customizations in detail.
VCB Customization for Device Type Support
Step 1 Login to VCB. Go to VNE Customization Builder > VNE Drivers
Step 2 Click Configure Device Types.
Step 3 Click Add Row.
Step 4 Choose Category as ‘Server’. Define Device Type and Device Series. Click Save.
Step 5 Newly added device type appears. Click close.
Step 6 Click ‘Add Row’ in VNE Drivers.
Step 7 Enter the device SysOID under SysOID.
Steps to Get SysOID via PN:
a. Model KVM Server. Choose ‘Auto Detect’ as Type and ‘Product’ as Scheme.
Note In case if multiple IPs are configured in KVM Server, identify the IP address that is used to send traps and add that IP address under Events Tab & Restart VNE. This is required only if the IP used to send traps is different from the management/VNE IP.
b. Add the VNE to Map. Open the properties for Device Unsupported Ticket to get the SysOID of the device.
c. Copy the SysOID from the details section.
d. Now Paste the SysOID here.
Step 8 Choose Server > KVM > KVM Hypervisor as Device Type.
Step 9 Click Save. Newly added SysOID details appears.
Step 10 Restart VNE.
Step 11 Device is supported and VNE enters into operational state.
VCB Customization for Supporting Traps
Step 1 Login to VCB. Go to VNE Customization Builder > Events > Traps.
Step 2 Click Add Row.
Step 3 Enter Event Name.
Step 4 Get SNMPTrapOID value from received unsupported traps and map it to Oid:
a. Go to Standard Tab of Event Vision
b. Double click on any of the received unsupported Traps to see Event Properties.
c. Go to Trap Tab.
d. Right Click on the snmpTrapOID row and click Properties.
e. Copy the SNMP value.
f. Paste the copied SNMP Value in ‘Oid‘text box. Then click ‘Next’ button.
Step 5 Enter the Events details such as description, severity, ticketable or not in Step 2.
a. Determine the event types from libvirt MIB using libvirtGuestState property.
b. Configure all the VM status in Step 2 and Click Next.
Step 6 Select ‘value’ for Identify subtypes by following the below steps:
a. Get the VM status Varbind Oid and map here. Go to Standard traps of Event Vision. Double click on any of the received unsupported traps. Go to Trap tab.
b. Right Click on ‘.1.3.6.1.4.1.12345.1.1.1.3.2’ OID which maps to VM status and select properties.
c. Copy the Snmp Oid and map it to Varbind Oid.
d. Map the Snmp Value which will uniquely identify each of the VM status and Click Next.
Step 7 Map the Location details in Association Step.
a. Choose ‘Managedelement Key’ as Source Type.
b. Choose ‘Value’ as Instance Identifier Location.
c. Get the Location Varbind Oid from received traps and map here. Go to Standard traps of Event Vision. Double click on any of the received unsupported traps. Go to Trap tab.
d. Right Click on.1.3.6.1.4.1.12345.1.1.1.2.0 Oid which maps to location and click select properties.
e. Copy the Snmp Oid and map it to Instance Identifier Varbind Oid and Click ‘Next’.
Step 8 Click ‘Next’ on Expedite Step.
Step 9 Choose ‘Product’ as Scheme and ‘Generic UVNE Trap Event Group Rules’ as Group.
Step 10 Click ‘Finish’.
Step 11 Newly added trap oid appears.
Step 12 Generate VM Suspend traps:
[root@clvs-cvg-kvm-06 ~]# virsh suspend cvg-vm07-lnx
Domain cvg-vm07-lnx suspended
Step 13 PN receives suspended traps as V2 Trap.
Adding Soft Properties for KVM Hypervisor
Cisco Prime Network enables user to add required soft properties for KVM Hypervisor. Prime Network has provision to display soft properties in both scalar (using snmp or Telnet/SSH) and table format (using snmp).
This feature can be used to enhance the Generic UVNE Model with device specific inventory.
Let us see examples for adding Soft Properties for KVM Hypervisor using above stated methods.
Scalar Type
This topic lists the steps to add soft properties in scalar format using snmp or Telnet/SSH.
Using SNMP
Let us consider host resource mibs hrSystemNumUsers and hrSystemProcesses as required scalar soft properties for KVM Hypervisor.
Step 1 Right click Managed Element > Management > Soft Properties Management.
Step 2 Click New Element button.
Step 3 In General tab, enter Name and Label. Select ‘property’ as Type and ‘status’ as Polling Rate.
Step 4 In Parsing Tab, select, use SNMP get (OID. Enter OID for hrSystemProcesses, and click OK.
Step 5 Repeat Steps 2, 3 and 4 to add hrSystemNumUsers soft property.
Step 6 Click Close, if done with addition of all required soft properties.
Step 7 Close and re-open Inventory Window to see the added soft properties.
Using Telnet/SSH
Prerequisites
To enable Telnet/SSH protocol for KVM Hypervisor Server, update the device avm registry with below configuration using runreg tool command and restart the VNE.
runRegTool.sh -gs localhost set 127.0.0.1 <DeviceAVM>/agents/da/<VNE Name>/ips/<VNEIP>/protocols/telnet/connection/class "com.sheer.net.protocols.telnet.SocketConnection"
runRegTool.sh -gs localhost set 127.0.0.1 <DeviceAVM>/agents/da/<VNE Name>/ips/<VNEIP>/protocols/telnet/connection/explicitly-ask-for-pty "true"
runRegTool.sh -gs localhost add 127.0.0.1 <DeviceAVM>/agents/da/<VNE Name>/ips/<VNEIP>/protocols/telnet/connection/transport
runRegTool.sh -gs localhost set 127.0.0.1 <DeviceAVM>/agents/da/<VNE Name>/ips/<VNEIP>/protocols/telnet/connection/transport/pty-support enable
runRegTool.sh -gs localhost set 127.0.0.1 <DeviceAVM>/agents/da/<VNE Name>/ips/<VNEIP>/protocols/telnet/connection/transport/pty-type xterm
For instance, if vne is modelled under avm666 with VNE name -clvs-cvg-kvm-06 and device IP -10.76.82.103, then update avm666.xml file with the below commands:
runRegTool.sh -gs localhost set 127.0.0.1 avm666/agents/da/clvs-cvg-kvm-06/ips/10.76.82.103/protocols/telnet/connection/class "com.sheer.net.protocols.telnet.SocketConnection"
runRegTool.sh -gs localhost set 127.0.0.1 avm666/agents/da/clvs-cvg-kvm-06/ips/10.76.82.103/protocols/telnet/connection/explicitly-ask-for-pty "true"
runRegTool.sh -gs localhost add 127.0.0.1 avm666/agents/da/clvs-cvg-kvm-06/ips/10.76.82.103/protocols/telnet/connection/transport
runRegTool.sh -gs localhost set 127.0.0.1 avm666/agents/da/clvs-cvg-kvm-06/ips/10.76.82.103/protocols/telnet/connection/transport/pty-support enable
runRegTool.sh -gs localhost set 127.0.0.1 avm666/agents/da/clvs-cvg-kvm-06/ips/10.76.82.103/protocols/telnet/connection/transport/pty-type xterm
After running the above commands, the corresponding registry should have the following entries:
Procedure
Let us consider Libvirt Version Info as required scalar soft property to be displayed for KVM Hypervisor using Telnet/SSH:
Step 1 Right-click Managed Element > Management > Soft Properties Management.
Step 2 Click New Element button.
Step 3 In General tab, enter Name and Label. Select ‘property’ as Type and ‘System’ as Polling Rate.
Step 4 In Parsing tab, select Use Telnet/SSH. Enter the Telnet command and click OK.
Step 5 Click Close, if done with addition of all required soft properties.
Step 6 Close and re-open Inventory Window to see the added soft properties.
Table Type
This topic lists steps to add soft properties in table format using snmp.
Add ‘Storage Device Details’ Soft Properties for KVM Hypervisor
Step 1 Right click Managed Element > Management > Soft Properties Management.
Step 2 Click New Element button.
Step 3 In General tab, enter Name and Label. Select ‘Table’ as Type and ‘status’ as Polling Rate.
Step 4 In Parsing tab, select Use SNMP get (OID). Enter Parent OID. In this case, hrStorageEntry OID.
Step 5 Click Add.
Step 6 Enter Column Title and sub oid as Column Data. In this case, Enter ‘Name’ as column title and ‘3’ as Column Data. Click OK.
Step 7 Repeat Steps 5 and 6 to add required Storage Soft Properties.
Step 8 Click OK, if all the required soft properties added.
Step 9 Close and Re-open Inventory Window to see the added Soft Properties.
Add ‘VM Details’ Soft Properties for KVM Hypervisor
Step 1 Right Click on Physical Inventory > Management > Soft Properties Management.
Step 2 Click New Element button.
Step 3 In General tab, enter Name and Label. Select ‘Table’ as Type and ‘status’ as Polling Rate.
Step 4 In Parsing tab, select Use SNMP get(OID). Enter Parent OID. In this case, libvirtMIB OID. Click New Element button.
Step 5 Add all the required VM Soft Properties using Add option. Click OK.
Step 6 Close and Re-open Inventory Window to see the added VM Details Soft Properties.
Applying Soft Properties to all KVM Hypervisor VNEs
Step 1 Right click added Soft Properties > Hierarchy Manager.
Step 2 Copy the Existing Hierarchy using Copy option.
Step 3 Select the New Hierarchy Location for which the Soft Property needs to be applied. Paste using Paste Icon.
Step 4 Click Close.
Step 5 Restart all affected VNE’S for which the soft properties are applied.