From Fedora Project Wiki
(Created page with '= KVM Stable Guest ABI = == Summary == Allow guest virtual machines to be presented with the same ABI across QEMU upgrades. This is particularily important ...')
 
(add some links)
Line 124: Line 124:
== Documentation ==
== Documentation ==


FIXME: add links to the various upstream discussions.
== Documentation ==
 
* Izik's [http://lists.gnu.org/archive/html/qemu-devel/2007-11/msg00620.html patch] (November 2007)
* Markus's [http://lists.gnu.org/archive/html/qemu-devel/2009-01/msg01480.html patch series] (Jan 2009)
* Markus's [http://lists.gnu.org/archive/html/qemu-devel/2009-02/msg00766.html machine description format RFC] (February 2009)
* Markus's [http://lists.gnu.org/archive/html/qemu-devel/2009-04/msg01946.html tenth iteration of his machine description patches] (April 2009)
* First thread where [http://lists.gnu.org/archive/html/qemu-devel/2009-05/msg01491.html saveabi] idea came up (May 2009)
* Most recent [http://lists.gnu.org/archive/html/qemu-devel/2009-06/msg00735.html discussion] (June 2009)


== Release Notes ==
== Release Notes ==

Revision as of 14:14, 15 June 2009

KVM Stable Guest ABI

Summary

Allow guest virtual machines to be presented with the same ABI across QEMU upgrades.

This is particularily important for Windows guests where a guest ABI change may require Windows installs to be reactivated.

See also Features/KVM Stable PCI Addresses.

Owner

Current status

  • Targeted release: Fedora 12
  • Last updated: 2009-06-15
  • Percentage of completion: 0%

TODO

  • Settle on one of the proposed solutions upstream
  • Implement the qemu side
  • Implement the libvirt side
  • Testing

Completed

None.

Detailed Description

KVM guests are presented with an emulated hardware platform that includes (e.g. a CPU model, APIC, PIT, ACPI tables, IDE/USB/VGA controllers, NICs etc.). When QEMU is updated to a new version, some aspects of this platform may change as new hardware capabilities are added to that platform.

From the guest OS point of view, this is equivalent to updating a physical hardware platform and may, in the case of Windows, require the OS install to be activated. To avoid such issues, guest machines should transparently continue to run on their original platform, even when QEMU is upgraded.

A number of solutions are being discussed upstream.

Solution 1 :: Don't Change the ABI

An obvious solution to the problem is to not change the default ABI in QEMU. New features could be added to QEMU, but they would have to be explicitly requested.

Pros:

  1. Simple for QEMU and libvirt
  2. Possible to implement for Fedora 12

Cons:

  1. Makes it more difficult for new guests to benefit from QEMU improvements

Solution 2 :: ABI Version Number

The idea here is that when a guest is run for the first time, it uses the latest available ABI and libvirt should take not of the ABI version number for future use.

Various options for specifying the ABI version have been suggested (e.g. -M pc1, --abi 0.10 or an item in a config file). How libvirt would query for the latest ABI version would probably depend on what option for selecting a version is settled on, but it could be as simple as a /usr/share/qemu/machines/pc.dt symlink.

Pros:

  1. Simple, both for QEMU and libvirt
  2. Possible to implement for Fedora 12

Cons:

  1. Makes back-porting of ABI changes to older versions more difficult

Solution 3 :: Device Versions in a Config File

Similar to solution 2, except each device has a version number which can be specified in a config file.

See also solution 3 in Features/KVM Stable PCI Addresses for how libvirt would need to be able to merge guest configuration changes into a qemu config file.

Pros:

  1. Also solves the stable PCI addresses issue

Cons:

  1. Significant work still required in QEMU
  2. Very complex solution for libvirt
  3. Highly unlikely to be in place for Fedora 12

Solution 4 :: Device Versions in a Compat Hints File

Similar again, except a monitor command would be used to dump the device versions to an opaque file format. This would mean libvirt would not need to modify a configuration file.

See also solution 4 in Features/KVM Stable PCI Addresses.

Pros:

  1. Also solves the stable PCI addresses issue
  2. Straightforward solution for libvirt

Cons:

  1. Upstream not keen on adding both compat hints and machine description formats
  2. Quite unlikely to be ready for Fedora 12

Benefit to Fedora

This feature would remove a significant issue with Fedora's virtualization support of Windows.

Scope

Each of the proposed solutions requires work in both QEMU and libvirt. No other Fedora packages would be affected.

How To Test

Upgrade to a new version of QEMU which has ABI changes and check that these changes are not visible to existing guests.

User Experience

It should be possible to upgrade QEMU without causing Window's guests to require reactivation.

Dependencies

The main dependency is agreeing upstream on the QEMU part of the solution.

Contingency Plan

No contingency plan required; if one of the solutions is not implemented, the feature will not be available and nothing else will be affected.

Documentation

Documentation

Release Notes

KVM guests in Fedora 12 now have a stable ABI, reducing the chance that Windows guests will require reactivation when QEMU is upgraded in future.

Comments and Discussion