VMmanager: Database structure

From ISPWiki
Jump to: navigation, search
Hierarchy: VMmanager KVM ->OTHER
VMmanager Cloud ->OTHER

This article deals with the MySQL database structure.

The default name of the database is vmmgr. The id field in each table is the external key. Possible values for Boolean fields are on/off. Restart VMmanager upon data change.


counters

This table is used for statistics calculation.

device

This table describes devices assigned to the virtual machine (virtual disks and iso images).

  • vm - вvirtual machine
  • type - type. 0 - hard drive, 1 - cdrom
  • controller - bus. ide/virtio
  • info - information
  • targetdev - device. hda/hdb, etc.
  • filepath - path to the image, if any

diskday

The table contains information on disk operations per days

  • time = 24 hours

diskhr

The table contains information on disk operations per hours

  • time = hour

diskmin

The table contains information about disk operations per minute

  • count - information for special purposes.
  • rd_req - namber of reading requests (io)
  • time = 300 sec

hostnode

The table contains description of cluster nodes

  • name - node name
  • ip - IP address of the cluster node
  • status - virtual machine can/cannot be added automatically
  • uid - uid libvirt of the server. It enables to prevent adding of the same node twicely.

hostpool

Information on storages on the cluster node.

  • hostnode - cluster node
  • metapool - storage template
  • capacity - storage size in MB
  • available - free space

interface

Network interface of virtual machines

  • vm - virtual machine
  • network - URL to the network
  • mac - MAC-address of the interface

ip

IP addresses of virtual machines

iscsilun

iscsitarget

metapool

Description of the template storage

  • name - template name
  • type - storage type. logical/netfs/iscsi/dir

The rest of the fields correspond to the names of libvirt parameters for storages.

network

The table contains network description.

  • name - network name
  • type - network type bridge/nat/route
  • bridge - bridged netwrorking name
  • main - status of the primary bridged networking

preset

Virtual machines templates. All the fields correspond to the interface.

statday

The tables contains statistical information per days

stathr

The tables contains statistical information per hours

statmin

The tables contains statistical information per minutes

user

The table describes all users of the control panel

  • name - username
  • password - password md5-hash
  • level - user role: 29 for administrator, 16 for user.
  • enabled - active/not active

vds

Information about imported VPS

vdsmgr

Access details to VDSmanager from the Import module.

vm

Description of virtual machines

  • name - name of the virtual machine
  • hostnode - cluster node
  • ip - primary IP address
  • mem - available RAM in MiB
  • vcpu - number of available CPU kernels
  • cputune - cgroup weight
  • vsize - main disk size. It is used only when creating a virtual machine
  • user - owner
  • vmi - OS template
  • state - status running/stopped
  • osinstalled - OS status (whether it is installed or not)
  • opkey - key for checking the installation information
  • password - VNC password
  • needrebootcount - number of reboots required for OS installation
  • needreboot - virtual machine should be rebooted
  • domain - domain name
  • migrate - migration in progress
  • imported - virtual machine was imported from VDSmanager

volume

The table with virtual disks.

  • name - disk name
  • hostnode - cluster node where it is located
  • user - owner
  • pool - pool name
  • size - size in MB
  • vm - virtual machine to which the disk is assigned
  • bus - bus
  • dev - device
  • device - URL to the device table
  • filepath - path to the image, if any