Commit Graph

36 Commits

Author SHA1 Message Date
Alexandre Derumier
d560409207 forbid offline migration of a non shared volume if it's a clone
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-15 07:52:53 +01:00
Dietmar Maurer
0302101cf1 remove expected_downtime from migration status 2013-02-13 10:47:54 +01:00
Stefan Priebe
19168b91ae QemuMigrate: phase2_cleanup misses migrate_cancel
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2013-01-02 06:36:53 +01:00
Stefan Priebe
865ef13278 implement dynamic migration_downtime
changelog:

- increment counter also if remaining memory equal 0 (qemu 1.4 migration code)
- only increment coutner and set down_time if memory transfert have occured. (to avoid too fast downtime increment)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-12-31 07:20:56 +01:00
Alexandre Derumier
135007c099 add downtime && expected_downtime query-migrate info
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-12-27 12:45:56 +01:00
Alexandre Derumier
ab399b7c5d add error log for qm start of the target vm.
Can be usefull to see what's wrong if target vm doesn't start (missing storage, missing bridge,...)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-12-27 12:44:34 +01:00
Alexandre Derumier
3beb415bd7 move qmp migrate_set_down && migrate_set_speed to qemumigrate
so we can set the values when the vm is running
also use int() to get json working

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-12-27 12:43:39 +01:00
Dietmar Maurer
d5769dc253 migrate volumes used inside snapshots including vmstate
Introduce new helper function foreach_volid()
2012-09-25 08:09:50 +02:00
Dietmar Maurer
a06c7f7ec4 fix check for non-shared disks 2012-09-25 07:26:34 +02:00
Dietmar Maurer
972511a06a migrate: disable xbzrle for now.
This is not stable, and sometimes cause endless migration (migration never stops).
2012-08-31 11:02:47 +02:00
Dietmar Maurer
94235c592c avoid warning about uninitialized value 2012-08-30 12:15:07 +02:00
Dietmar Maurer
b0b756c14d migrate: tolerate query-migrate errors 2012-08-30 09:28:24 +02:00
Alexandre Derumier
e18b0b9964 livemigrate : activate xbzrle cache
This help migrate for vm with of lot of memory access (like database)

live migration tests working:

kvm 1.2 -> kvm 1.2  (xbzrle set on both side)
kvm 1.1 -> kvm 1.2 (xbzrle on target)
kvm 1.1 -> kvm 1.1 (xbzrle not set, qmp command try to set xbzrle but fail)

failing migration

kvm 1.2 -> kvm 1.1 fail, but this is expected.

I tested with a memory benchmark running on the vm with 4GB ram

without xbzrle : migration take 10min, with many network hang
with xbzrle : migration take 1min, no hang

I display xbzrle counters for debug purpose, we can remove them later

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-29 07:55:21 +02:00
Dietmar Maurer
af30308f36 we call vm_stop to target host,
to be sure that kvm process is killed (but it should kill itself),
and deactivate volumes

I slightly modified this patch (orig. from Alexandre) so that it apply cleanly.
2012-08-23 10:28:41 +02:00
Alexandre Derumier
e52bd94c7e live migration: reduce sleep when remaining memory is low
Reduce sleep to 0.3s when remaining memory is lower than the average transfert in 1 iteration.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-23 07:37:59 +02:00
Dietmar Maurer
f5eb281ad3 cleanup: detete trailing whitespace 2012-08-23 07:36:48 +02:00
Alexandre Derumier
b67900f17a put target vm in singlestep mode and resume it only when config is moved
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-23 07:32:21 +02:00
Alexandre Derumier
7e8dcf2cb0 add migratedfrom param to start vm with conf file an another node
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-23 07:18:36 +02:00
Alexandre Derumier
c04b5b04de implement phase2_cleanup
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-23 07:17:15 +02:00
Alexandre Derumier
b8d208023b move config file in phase3, when live migration is finished
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-23 07:16:45 +02:00
Dietmar Maurer
373ea5798a migrate: only scan available storages 2012-07-16 10:20:36 +02:00
Dietmar Maurer
522c8f97d7 code cleanup, bump version to 2.0-44 2012-07-16 07:00:28 +02:00
Alexandre Derumier
80b2cbd1b9 migrate: syncdisk : avoid scanning shared storage
Currently we get list from PVE::Storage (for unused volumes), from all storage.
If something goes wrong with the network on host and thenwe can't communicate with a network shared storage(sheepdog,rbd,..),
the vdisk_list die (timeout) and we cannot migrate the vm on another kvm host.(online or offline).

We don't need to scan shared storage, as they are no disk to sync.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-16 06:52:35 +02:00
Dietmar Maurer
a05b47a8a8 migrate: fix warning about uninitialized values
And display acurate byte values instead of KB
2012-07-13 12:37:19 +02:00
Alexandre Derumier
5a7835f572 convert migrate monitor commands to qmp
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:38:34 +02:00
Dietmar Maurer
1858638fe3 replace change_config_nolock with update_config_nolock
We now use cfs_file_write() in order to avoid race conditions between
file IO and cfs operations (read after write works now).
2012-02-02 14:18:41 +01:00
Dietmar Maurer
97439670bc online migration fix: close tunnel later, wait for connection close 2012-01-17 11:25:44 +01:00
Dietmar Maurer
17eed025b3 use PVE::Tools::run_with_timeout 2011-12-15 11:29:01 +01:00
Dietmar Maurer
d68afb26bf improve error message 2011-12-08 10:07:19 +01:00
Dietmar Maurer
72afda82a1 fix migration tunnel 2011-12-08 09:32:09 +01:00
Dietmar Maurer
46a84fd400 replace logmsg() with $self->log() 2011-12-07 11:25:20 +01:00
Dietmar Maurer
16e903f2dc use new AbstractMigrate.pm 2011-12-07 06:36:20 +01:00
Dietmar Maurer
4bb5a31707 cleanup error messages 2011-11-29 12:43:34 +01:00
Dietmar Maurer
ff1a2432c8 activate LVM LVs more carefully
And remove syslog whenever possible (we run most commands as tasks, so
the output is loged anyways)
2011-11-25 08:08:27 +01:00
Dietmar Maurer
e6c3b671bf fix online migration 2011-09-15 08:31:17 +02:00
Dietmar Maurer
3ea94c60d2 move code from qmigrate into PVE/QemuMigrate.pm
and make migrate a subcommand of qm
2011-09-14 13:33:34 +02:00