Features/Migration: Difference between revisions

From QEMU
No edit summary
m (formatting, put todo items in sub-topics)
Line 19: Line 19:
== ToDo list ==
== ToDo list ==


* use TLS for communication (Volunteer?)
=== use TLS for communication (Volunteer?) ===


Right now all migration communication are done through clear channels.  If you need to encrypt the channel, you need to use an external program.  The problem with this is the performance loss.  We need to transfer all data to another program, and then to the network.
Right now all migration communication are done through clear channels.  If you need to encrypt the channel, you need to use an external program.  The problem with this is the performance loss.  We need to transfer all data to another program, and then to the network.


* Improve migration bitmap handling (Volunteer?)
=== Improve migration bitmap handling (Volunteer?) ===


** Split bitmap use. We always use all bitmaps, VGA, CODE & Migration, independently of what we are doing.  We could improve it with:
* Split bitmap use. We always use all bitmaps, VGA, CODE & Migration, independently of what we are doing.  We could improve it with:
*** VGA:  only add it to VGA framebuffers
** VGA:  only add it to VGA framebuffers
*** MIGRATION: We only need to allocate/handle it during migration.
** MIGRATION: We only need to allocate/handle it during migration.
*** CODE: Only needed with TCG, no need at all for KVM
** CODE: Only needed with TCG, no need at all for KVM


* KVM migration bitmap (Volunteer?)
=== KVM migration bitmap (Volunteer?) ===
** We could use the native bitmap format, and change/improve kernel to only set bits for dirty pages, not cleaning clean ones.
* We could use the native bitmap format, and change/improve kernel to only set bits for dirty pages, not cleaning clean ones.
** We could change kernel log code to set the bitmap for "used" pages when we start logging, this would allow us to not migration zero pages at all, right now we have to "allocate" the pages, to check that they are zero, and then sent them as zero pages
* We could change kernel log code to set the bitmap for "used" pages when we start logging, this would allow us to not migration zero pages at all, right now we have to "allocate" the pages, to check that they are zero, and then sent them as zero pages


* Abstract QEMUFile use (Google Summer of Code Project)
=== Abstract QEMUFile use (Google Summer of Code Project) ===
''Note this has a lot of overlap with the Visitor/BER patches series of Dave Gilbert that abstracts the format out of QEMUFile''
''Note this has a lot of overlap with the Visitor/BER patches series of Dave Gilbert that abstracts the format out of QEMUFile''


Line 62: Line 62:
Where migration channel has been initialized properly for QEMUFile.  This would make trivial to change the protocol format to anything else.
Where migration channel has been initialized properly for QEMUFile.  This would make trivial to change the protocol format to anything else.


** Continuous VMState testing (GSOC project)
=== Continuous VMState testing (GSOC project) ===
''Note this has overlaps with the fault tolerance/micro checkpoint work and the reverse-emulation/debugging schemes that both take regular snapshots''
''Note this has overlaps with the fault tolerance/micro checkpoint work and the reverse-emulation/debugging schemes that both take regular snapshots''


Add a new flag that during normal operation at random intervals:
Add a new flag that during normal operation at random intervals:
*** stops the VM
* stops the VM
*** saves all device state to a buffer
* saves all device state to a buffer
*** reset all devices
* reset all devices
*** load all device state from that buffer
* load all device state from that buffer


This way, we could test that we can migrate at any moment, and if we have a problem, we know exactly what the device state that caused the problem is.
This way, we could test that we can migrate at any moment, and if we have a problem, we know exactly what the device state that caused the problem is.




* Finish conversion to VMState. Pending things are:
=== Finish conversion to VMState. ===
** send generated fields
Pending things are:
** rebase cpu ports to latest (need previous one)
* send generated fields
** virtio: exist very old version (very old means as of more than 1 year ago).  Problem is how to describe lists easily in VMState
* rebase cpu ports to latest (need previous one)
** slirp: some patches exist, same previous problem, how to handle easily lists.  Slirp is basically list of lists of lists.
* virtio: exist very old version (very old means as of more than 1 year ago).  Problem is how to describe lists easily in VMState
** misc devices: almost all of them don't work on a migrated platform, so we could change them.
* slirp: some patches exist, same previous problem, how to handle easily lists.  Slirp is basically list of lists of lists.
* misc devices: almost all of them don't work on a migrated platform, so we could change them.


* Protocol changes
=== Protocol changes ===


** Add size + checksum to sections.  This is one incompatible change and needs further thought.
* Add size + checksum to sections.  This is one incompatible change and needs further thought.
** Make embedded sections real sections, with headers.  This will allow us to version internal state.
* Make embedded sections real sections, with headers.  This will allow us to version internal state.
** Unit testing.  In colaboration with qdev, allow devices to be tested alone with old/new migration versions/subsections.
* Unit testing.  In colaboration with qdev, allow devices to be tested alone with old/new migration versions/subsections.
* Change to BER/ASN.1?


** Change to BER/ASN.1?
=== Improve testing ===
* Add testing for all VMSTATE_FOO() macros and interpreter
** Patches posted, pending integration


* Improve testing
* How to be sure that ideas we are compatible (or not) with previous versions
** Add testing for all VMSTATE_FOO() macros and interpreter
** Amit is working on that with a tester that outputs the code from all devices, and check what is different from two versions.


Patches posted, pending integration
=== Define target machine in the monitor ===
 
** How to be sure that ideas we are compatible (or not) with previous versions
 
Amit is working on that with a tester that outputs the code from all devices, and check what is different from two versions.
 
* Define target machine in the monitor
This would allow us to sent the configuration through the migration channel.  This needs very big changes in qemu, but we are heading on that direction.
This would allow us to sent the configuration through the migration channel.  This needs very big changes in qemu, but we are heading on that direction.


* Fault Tolerance (David Gilbert)
=== Fault Tolerance (David Gilbert) ===


Adapting QEMU To fault tolerance.
Adapting QEMU To fault tolerance.

Revision as of 05:30, 29 April 2014

Summary

Migration roadmap.

Owner

  • Name: Juan Quintela
  • Email: quintela@redhat.com

Detailed Summary

This page describes what are the changes planned for migration and who is supposed to do each of the changes. If you want to collaborate on any of the items don't doubt to contact me directly or asking on the qemu mailing list.

Status

This is the roadmap, features are integrated upstream as they are done.

ToDo list

use TLS for communication (Volunteer?)

Right now all migration communication are done through clear channels. If you need to encrypt the channel, you need to use an external program. The problem with this is the performance loss. We need to transfer all data to another program, and then to the network.

Improve migration bitmap handling (Volunteer?)

  • Split bitmap use. We always use all bitmaps, VGA, CODE & Migration, independently of what we are doing. We could improve it with:
    • VGA: only add it to VGA framebuffers
    • MIGRATION: We only need to allocate/handle it during migration.
    • CODE: Only needed with TCG, no need at all for KVM

KVM migration bitmap (Volunteer?)

  • We could use the native bitmap format, and change/improve kernel to only set bits for dirty pages, not cleaning clean ones.
  • We could change kernel log code to set the bitmap for "used" pages when we start logging, this would allow us to not migration zero pages at all, right now we have to "allocate" the pages, to check that they are zero, and then sent them as zero pages

Abstract QEMUFile use (Google Summer of Code Project)

Note this has a lot of overlap with the Visitor/BER patches series of Dave Gilbert that abstracts the format out of QEMUFile

We can change QEMUFile use to something like:

struct MigrationChannel {
    void *opaque;
    uint32 get_uint32(struct MigrationChannel *)
    int put_uint32(structMigrationCHannel *)
/* the same for all the basic types */
}

And then change all ocurrences of:

qemu_get_sbe32(f, &foo);

into

foo = MC->get_uint32(MC);

Where migration channel has been initialized properly for QEMUFile. This would make trivial to change the protocol format to anything else.

Continuous VMState testing (GSOC project)

Note this has overlaps with the fault tolerance/micro checkpoint work and the reverse-emulation/debugging schemes that both take regular snapshots

Add a new flag that during normal operation at random intervals:

  • stops the VM
  • saves all device state to a buffer
  • reset all devices
  • load all device state from that buffer

This way, we could test that we can migrate at any moment, and if we have a problem, we know exactly what the device state that caused the problem is.


Finish conversion to VMState.

Pending things are:

  • send generated fields
  • rebase cpu ports to latest (need previous one)
  • virtio: exist very old version (very old means as of more than 1 year ago). Problem is how to describe lists easily in VMState
  • slirp: some patches exist, same previous problem, how to handle easily lists. Slirp is basically list of lists of lists.
  • misc devices: almost all of them don't work on a migrated platform, so we could change them.

Protocol changes

  • Add size + checksum to sections. This is one incompatible change and needs further thought.
  • Make embedded sections real sections, with headers. This will allow us to version internal state.
  • Unit testing. In colaboration with qdev, allow devices to be tested alone with old/new migration versions/subsections.
  • Change to BER/ASN.1?

Improve testing

  • Add testing for all VMSTATE_FOO() macros and interpreter
    • Patches posted, pending integration
  • How to be sure that ideas we are compatible (or not) with previous versions
    • Amit is working on that with a tester that outputs the code from all devices, and check what is different from two versions.

Define target machine in the monitor

This would allow us to sent the configuration through the migration channel. This needs very big changes in qemu, but we are heading on that direction.

Fault Tolerance (David Gilbert)

Adapting QEMU To fault tolerance.

Code

The code still not merged is currently kept in several branches of this git repository: