Migration: Trying to make it more robust Red Hat Juan Quintela KVM - - PowerPoint PPT Presentation

migration trying to make it more robust
SMART_READER_LITE
LIVE PREVIEW

Migration: Trying to make it more robust Red Hat Juan Quintela KVM - - PowerPoint PPT Presentation

Migration: Trying to make it more robust Red Hat Juan Quintela KVM Forum 2014 D usseldorf Abstract This talk shows what are the things we have done to improve migration to make it less fragile. 1 / 23 Agenda 1 What have we done? 2 What


slide-1
SLIDE 1

Migration: Trying to make it more robust

Red Hat Juan Quintela KVM Forum 2014 D¨ usseldorf Abstract

This talk shows what are the things we have done to improve migration to make it less fragile.

1 / 23

slide-2
SLIDE 2

Agenda

1 What have we done? 2 What are the future plans? 3 Anything else you need? 4 Questions

2 / 23

slide-3
SLIDE 3

Section 1 What have we done?

3 / 23

slide-4
SLIDE 4

What have we done?

Bitmap Logging (GSOC)

Sanidhya: GSOC student Dump dirty bitmap to log file How much we want to do it The period This allows to study how much one work load is dirtying memory, and have an idea of how long it is going to take to migrate.

4 / 23

slide-5
SLIDE 5

What have we done?

VMState continuous testing (GSOC)

Sanidhya: GSOC student What is migration? dump memory through the network stop guest dump device state continue on target

5 / 23

slide-6
SLIDE 6

What have we done?

VMState continuous testing (II)

What if we do in a loop stop guest dump device state to memory reset guest devices load device state continue

6 / 23

slide-7
SLIDE 7

What have we done?

VMState continuous testing (III)

Why? We have more problems with devices than with memory We can repeat this as much as we want, on the same load If there is any problem, we really know the state of the device that is causing us problems Really the infrastructure was there already Problems, as usual, are on the details

7 / 23

slide-8
SLIDE 8

What have we done?

Migration Checker (Amit)

Presented on KVM Forum last year Integrated since Output device state meta data in json We can compare the output of two qemus and see if they are the same/compatible

8 / 23

slide-9
SLIDE 9

What have we done?

VMState Validate (mst)

Aserts To make sure that the values that we got make sense how to add the asserts example

V M S T A T EV A L I D A T E(”num timers in range”, hpet validate num timers),

9 / 23

slide-10
SLIDE 10

What have we done?

VMState Testing

there were no test for VMState false, Eduardo created the tests for some types added tests for every VMState* type

  • r I removed it

10 / 23

slide-11
SLIDE 11

What have we done?

VMState Testing(II)

A simplification? You call this a simplification? raw diff

git diff origin/master | diffstat . . . . . vmstate.c | 98 + 127 files changed, 2671 insertions(+), 955 deletions(−)

11 / 23

slide-12
SLIDE 12

What have we done?

VMState Testing(III)

We added tests for all VMState macro. If we remove that file, simplification shows tests

wc −l tests/test− vmstate.c 2301 tests/test− vmstate.c

12 / 23

slide-13
SLIDE 13

Section 2 What are the future plans?

13 / 23

slide-14
SLIDE 14

What are the future plans?

Generated fields

tests

{ .name = ”fpcr”, .version id = 0, . size = sizeof(uint64 t), .info =& vmstate fpcr, . flags = VMS SINGLE, . offset = 0 },

14 / 23

slide-15
SLIDE 15

What are the future plans?

Generated fields (II)

current

# define VMSTATEINT64( f , s , v )...

proposed

# define VMSTATEINT64G( f , s , v, read, write)

x users that can be converted

# define V M S T A T EU I N T 8E Q U A L( f , s) \ # define V M S T A T EV A L I D A T E(....)

15 / 23

slide-16
SLIDE 16

What are the future plans?

Move to visitors

current

void qemu put be64(QEMUFile ∗f , uint64 t v);

current

fops− > put be64(opaque, fops, v);

We already have QEMUFile, writing to a buffer and would be needed for any change in format that we see fit.

16 / 23

slide-17
SLIDE 17

What are the future plans?

Format

Put here your preferred rant here.

17 / 23

slide-18
SLIDE 18

What are the future plans?

Optional sections

Patch just posted as RFC ... OK, this morning...

18 / 23

slide-19
SLIDE 19

What are the future plans?

Optional sections

Patch just posted as RFC ... OK, this morning...

18 / 23

slide-20
SLIDE 20

What are the future plans?

One last thing

We have done it wrong until now! What inter-version migration should we be allowing current: qemu-old -M pc to qemu-new -M pc What is pc? Really what we are doing is the equivalent of qemu-2.1 -M pc-2.1 to qemu-2.2 -M pc-2.2

  • r qemu-2.0 -M pc-2.0 to qemu-2.2 -M pc-2.2
  • r .... you get the idea

19 / 23

slide-21
SLIDE 21

What are the future plans?

One last thing

We have done it wrong until now! What inter-version migration should we be allowing current: qemu-old -M pc to qemu-new -M pc What is pc? Really what we are doing is the equivalent of qemu-2.1 -M pc-2.1 to qemu-2.2 -M pc-2.2

  • r qemu-2.0 -M pc-2.0 to qemu-2.2 -M pc-2.2
  • r .... you get the idea

19 / 23

slide-22
SLIDE 22

What are the future plans?

One last thing

We have done it wrong until now! What inter-version migration should we be allowing current: qemu-old -M pc to qemu-new -M pc What is pc? Really what we are doing is the equivalent of qemu-2.1 -M pc-2.1 to qemu-2.2 -M pc-2.2

  • r qemu-2.0 -M pc-2.0 to qemu-2.2 -M pc-2.2
  • r .... you get the idea

19 / 23

slide-23
SLIDE 23

What are the future plans?

One last thing

We have done it wrong until now! What inter-version migration should we be allowing current: qemu-old -M pc to qemu-new -M pc What is pc? Really what we are doing is the equivalent of qemu-2.1 -M pc-2.1 to qemu-2.2 -M pc-2.2

  • r qemu-2.0 -M pc-2.0 to qemu-2.2 -M pc-2.2
  • r .... you get the idea

19 / 23

slide-24
SLIDE 24

What are the future plans?

One last thing

We have done it wrong until now! What inter-version migration should we be allowing current: qemu-old -M pc to qemu-new -M pc What is pc? Really what we are doing is the equivalent of qemu-2.1 -M pc-2.1 to qemu-2.2 -M pc-2.2

  • r qemu-2.0 -M pc-2.0 to qemu-2.2 -M pc-2.2
  • r .... you get the idea

19 / 23

slide-25
SLIDE 25

What are the future plans?

One last thing

We have done it wrong until now! What inter-version migration should we be allowing current: qemu-old -M pc to qemu-new -M pc What is pc? Really what we are doing is the equivalent of qemu-2.1 -M pc-2.1 to qemu-2.2 -M pc-2.2

  • r qemu-2.0 -M pc-2.0 to qemu-2.2 -M pc-2.2
  • r .... you get the idea

19 / 23

slide-26
SLIDE 26

What are the future plans?

One last thing

We have done it wrong until now! What inter-version migration should we be allowing current: qemu-old -M pc to qemu-new -M pc What is pc? Really what we are doing is the equivalent of qemu-2.1 -M pc-2.1 to qemu-2.2 -M pc-2.2

  • r qemu-2.0 -M pc-2.0 to qemu-2.2 -M pc-2.2
  • r .... you get the idea

19 / 23

slide-27
SLIDE 27

What are the future plans?

One last thing

We have done it wrong until now! What inter-version migration should we be allowing current: qemu-old -M pc to qemu-new -M pc What is pc? Really what we are doing is the equivalent of qemu-2.1 -M pc-2.1 to qemu-2.2 -M pc-2.2

  • r qemu-2.0 -M pc-2.0 to qemu-2.2 -M pc-2.2
  • r .... you get the idea

19 / 23

slide-28
SLIDE 28

What are the future plans?

Why not limit the problem?

Machine type should be the same for migration to work qemu-2.1 -M pc-2.1 to qemu-2.2 -M pc-2.1 qemu-2.0 -M pc-2.0 to qemu-2.2 -M pc-2.0 This is testable, we only allow a limited number of interversion migrations This is basically what we do on Red Hat We can make a policy when some version compatiblity is dropped Worst case: ship old and new device

20 / 23

slide-29
SLIDE 29

What are the future plans?

Why not limit the problem?

Machine type should be the same for migration to work qemu-2.1 -M pc-2.1 to qemu-2.2 -M pc-2.1 qemu-2.0 -M pc-2.0 to qemu-2.2 -M pc-2.0 This is testable, we only allow a limited number of interversion migrations This is basically what we do on Red Hat We can make a policy when some version compatiblity is dropped Worst case: ship old and new device

20 / 23

slide-30
SLIDE 30

What are the future plans?

Why not limit the problem?

Machine type should be the same for migration to work qemu-2.1 -M pc-2.1 to qemu-2.2 -M pc-2.1 qemu-2.0 -M pc-2.0 to qemu-2.2 -M pc-2.0 This is testable, we only allow a limited number of interversion migrations This is basically what we do on Red Hat We can make a policy when some version compatiblity is dropped Worst case: ship old and new device

20 / 23

slide-31
SLIDE 31

What are the future plans?

Why not limit the problem?

Machine type should be the same for migration to work qemu-2.1 -M pc-2.1 to qemu-2.2 -M pc-2.1 qemu-2.0 -M pc-2.0 to qemu-2.2 -M pc-2.0 This is testable, we only allow a limited number of interversion migrations This is basically what we do on Red Hat We can make a policy when some version compatiblity is dropped Worst case: ship old and new device

20 / 23

slide-32
SLIDE 32

What are the future plans?

Why not limit the problem?

Machine type should be the same for migration to work qemu-2.1 -M pc-2.1 to qemu-2.2 -M pc-2.1 qemu-2.0 -M pc-2.0 to qemu-2.2 -M pc-2.0 This is testable, we only allow a limited number of interversion migrations This is basically what we do on Red Hat We can make a policy when some version compatiblity is dropped Worst case: ship old and new device

20 / 23

slide-33
SLIDE 33

What are the future plans?

Why not limit the problem?

Machine type should be the same for migration to work qemu-2.1 -M pc-2.1 to qemu-2.2 -M pc-2.1 qemu-2.0 -M pc-2.0 to qemu-2.2 -M pc-2.0 This is testable, we only allow a limited number of interversion migrations This is basically what we do on Red Hat We can make a policy when some version compatiblity is dropped Worst case: ship old and new device

20 / 23

slide-34
SLIDE 34

What are the future plans?

Why not limit the problem?

Machine type should be the same for migration to work qemu-2.1 -M pc-2.1 to qemu-2.2 -M pc-2.1 qemu-2.0 -M pc-2.0 to qemu-2.2 -M pc-2.0 This is testable, we only allow a limited number of interversion migrations This is basically what we do on Red Hat We can make a policy when some version compatiblity is dropped Worst case: ship old and new device

20 / 23

slide-35
SLIDE 35

Section 3 Anything else you need?

21 / 23

slide-36
SLIDE 36

Section 4 Questions

22 / 23

slide-37
SLIDE 37

The end.

Thanks for listening.

23 / 23