If the memory of guest OS is changed constantly, the live migration
can not be ended ever for ever.
We can use the command 'virsh migrate-setmaxdowntime' to control the
live migration. But the value of maxdowntime is diffcult to calculate
because it depends on the transfer speed of network and constantly
changing memroy size. We need a easy way to control the live migration.
This patch set add the support of auto cold migration fallback on
timeout. With this patch set, when we migrate the guest OS, we can
specify a timeout. If the live migration timeouts, the migration will
fallback to cold migration.
Test of this patchset on Linux:
Env:
a. The size of guest OS's memory: 1GB
b. The transfer speed of network: about 100Mb/s
c. The size of constantly changing memory: more than 900MB
1. migrate without timeout
# virsh migrate --live RHEL6RC qemu+ssh://<dest IP>/system tcp://<dest
IP>:49152
The migration does not end after 12 hours.
2. migrate with timeout(30 minutes):
# date
Fri Dec 17 15:35:24 CST 2010
# virsh migrate --live --timeout 1800 RHEL6RC qemu+ssh://<dest IP>/system
tcp:<dest IP>:49152
# date
Fri Dec 17 16:05:51 CST 2010
v3:
- use the existing virEventXXXTimeout() APT to implement timer
v2:
- implement timer for Windows
- implement dynamic timers
Wen Congyang (2):
timer impl
auto cold migration fallback at timeout
tools/Makefile.am | 1 +
tools/timer.c | 170 +++++++++++++++++++++++++++++++++++++++++++++++++++++
tools/timer.h | 38 ++++++++++++
tools/virsh.c | 69 +++++++++++++++++++++
4 files changed, 278 insertions(+), 0 deletions(-)
create mode 100644 tools/timer.c
create mode 100644 tools/timer.h