From Fedora Project Wiki

Revision as of 19:57, 14 July 2009 by Rjones (talk | contribs)

Host information and statistics

Summary

Allow a virtual machine to see information and statistics from the host operating system, under narrow and strictly controlled conditions and only at the discretion of the host administrator.

Owner

Current status

  • Targeted release: Fedora 12
  • Last updated: 2009-07-14
  • Percentage of completion: 20%

Detailed Description

Allow a virtual machine to look at host information (such as number of physical, not just virtual CPUs), and statistics like the load on the host. Users have asked for this primarily as a diagnostic tool -- for example, poor performance of a virtual machine might be caused by excessive load on the host.

Normally we try to isolate virtual machines from accessing any such details from the host, and there are very good reasons for that too, such as security of the host, commercial confidentiality, and the privacy of other virtual machines running on the host. As a result, at the moment there is no mechanism for accessing host information.

We propose to add a feature which allows the host administrator, at their discretion, and only of limited data to limited virtual machines, to export host information and statistics to virtual machines.

Administrators will need to:

  • explicitly enable this feature,
  • select the virtual machines and/or data they wish to be seen in guests,
  • select the frequency that guests can ask for data.

The mechanism will be a daemon running on the host which collects the statistics (see below for what). The information will be exported to guests over a spare (virtual) serial port or through the qemu/kvm vmchannel feature, whichever is available.

Guests will request information by sending a plain text command to the serial port, and will receive information in the form of a simple, plain text message. No special drivers or software are required by the guest.

Configuration

Because the details of configuration are lengthy and technical, they are on a separate wiki page: Features/Hostinfo/Configuration

List of information collected

See: Features/Hostinfo/StatsCollected

Guest to host communication

See: Features/Hostinfo/Sockets

Query protocol

See: Features/Hostinfo/Protocol for the protocol which guest programs will use to query host information.

Benefit to Fedora

This is a feature which RHEL customers have asked for, but we believe that Fedora users who use Fedora in VM hosting scenarios will also find this a useful service to offer to selected customers.

Scope

Changes will be made as required to virt-install and the Virtual Machine Manager program to allow this to be enabled easily.

The work also involves writing the secure daemon.

We do not anticipate any changes will be needed to qemu, KVM, Xen, the kernel or libvirt.

Test Plan

(Test plan to be written)

User Experience

  1. System administrators will have the ability, through configuration files and the graphical virt-manager, to enable this feature for selected virtual machines.
  2. Virtual machines where the feature is enabled will be able to collect host information by using standard tools (minicom etc) to connect to their serial port.

Dependencies

None.

Contingency Plan

None - this is a completely standalone feature.

Documentation

(To be written)

Release Notes

(To be written)

Comments and Discussion