Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

Let user know the total, external, internal network I/O data traffic for individual virtual machine.

...

For now, user can get a external data traffic for a virtual network from virtual router. Moreover, as
As user we also want to know the data traffic for a virtual machine, including external and internal data traffic.

Target Branch

4.2

Feature Specifications

  • Agent manager get and report the total and external network I/O network usage of VM from hypervisor.
  • Agent managet manager get and report the network I/O external network usage of VM from virtual router.
  • store the network network I/O statistics into db
  • analyse the network usage in usage server.

Use cases

TBD

Architecture and Design description

  • add vm_statistics_network table in cloud database.
  • Agent manager get the total I/O from hypervisor.
  • Agent manager get the external I/O from virtual router.
  • change APIs
  • change cloud-usage server

Web Services APIs

...

  • deal with deployVM, destroyVM, stopRouter, startRouter, restartNetwork.

Hypervisors

KVM

Changes

new tables in database

  • cloud.vm_network_statistics
  • cloud_usage.vm_network_statistics
  • cloud_usage.usage_vm_network

changes in cloud-api

  • com.cloud.vm.VmNetworkStats (new)
  • com.cloud.agent.api.VmNetworkStatsEntry (new)
  • com.cloud.agent.api.GetVmNetworkStatsAnswer (new)
  • com.cloud.agent.api.GetVmNetworkStatsCommand (new)
  • com.cloud.agent.api.NetworkUsageAnswer
  • com.cloud.agent.api.NetworkUsageCommand

new classes in cloud-core

  • com.cloud.user.VmNetworkStatisticsVO
  • com.cloud.user.dao.VmNetworkStatisticsDao
  • com.cloud.user.dao.VmNetworkStatisticsDaoImpl

changes in cloud-server

  • com.cloud.network.router.VirtualNetworkApplianceManagerImpl.NetworkUsageTask
  • com.cloud.network.router.VirtualNetworkApplianceManagerImpl.NetworkStatsUpdateTask
  • com.cloud.network.router.VirtualNetworkApplianceManagerImpl.prepareStop
  • com.cloud.network.router.VirtualNetworkApplianceManagerImpl.processStopOrRebootAnswer
  • com.cloud.configuration.DefaultComponentLibrary.populateDaos
  • com.cloud.vm.UserVmManager
  • com.cloud.vm.UserVmManagerImpl.finalizeDeployment
  • com.cloud.vm.UserVmManagerImpl.finalizeExpunge
  • com.cloud.user.dao.VmNetworkStatisticsDao (new)
  • com.cloud.user.dao.VmNetworkStatisticsDaoImpl (new)
  • com.cloud.api.commands.GetUsageRecordsCmd

changes in cloud-plugin-hypervisor-kvm

  • com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.execute(NetworkUsageCommand)
  • com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.execute(GetVmNetworkStatsCommand) (new)

changes in cloud-usage

  • com.cloud.usage.dao.UsageDao
  • com.cloud.usage.dao.UsageDaoImpl
  • com.cloud.usage.dao.UsageVmNetworkDao (new)
  • com.cloud.usage.dao.UsageVmNetworkDaoImpl (new)
  • com.cloud.usage.UsageVmNetworkVO (new)
  • com.cloud.usage.parser.VmNetworkUsageParser (new)
  • com.cloud.usage.UsageTypes
  • com.cloud.usage.UsageManagerImpl.parse(UsageJobVO, long, long)
  • com.cloud.usage.UsageManagerImpl.createVmNetworkHelperEntry (new)

changes in scripts

  • patches/systemvm/debian/config/opt/cloud/bin/netusage.sh

changes in configuration

  • usage/conf/usage-components.xml.in

UI flow

None.

References

Appendix

  • Appendix A:
  • Appendix B: