[pve-devel] [PATCH qemu-server 0/4] improve local disk and error handling for migration

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Jun 24 09:46:33 CEST 2016


this patch series has two main parts:
- mark local volumes with their origin (storage, snapshot or config) instead of 1
- test all local volumes and collect errors, then die with a complete error message
instead of dying upon the first error

example output for a VM that exercises almost all the possible error conditions:

# qm migrate 104 node1 --online
Jun 23 16:18:59 starting migration of VM 104 to node 'node1' (10.0.0.11)
Jun 23 16:18:59 copying disk images
Jun 23 16:19:00 found local disk '/dev/pve/vm-104-test' (in current VM config)
Jun 23 16:19:00 found local disk 'local-lvm:vm-104-disk-1' (in current VM config)
Jun 23 16:19:00 found local disk 'local-lvm:vm-104-test' (via storage)
Jun 23 16:19:00 found local disk 'local:iso/alpine-3.3.1-x86_64.iso' (in current VM config)
Jun 23 16:19:00 found local disk 'zfs:vm-104-disk-1' (via storage)
Jun 23 16:19:00 found local disk 'zfs:vm-107-test2' (in current VM config)
Jun 23 16:19:00 can't migrate local disk '/dev/pve/vm-104-test': local file/device
Jun 23 16:19:00 can't migrate local disk 'local-lvm:vm-104-disk-1': non-migratable snapshot exists
Jun 23 16:19:00 can't migrate local disk 'local:iso/alpine-3.3.1-x86_64.iso': local cdrom image
Jun 23 16:19:00 can't migrate local disk 'zfs:vm-107-test2': owned by other VM (owner = VM 107)
Jun 23 16:19:00 can't migrate local cdrom drive
Jun 23 16:19:00 ERROR: Failed to sync data - can't migrate VM - check log
Jun 23 16:19:00 aborting phase 1 - cleanup resources
Jun 23 16:19:00 ERROR: migration aborted (duration 00:00:01): Failed to sync data - can't migrate VM - check log
migration aborted

the first part ("found local disk"..) is displayed every time, the second
("can't migrate local"..) only if migration is aborted.

this allows users to quickly determine why the migration failed, which was
rather unintuitive before when the only information displayed was
"ERROR: Failed to sync data - can't do online migration - VM uses local disks"

Fabian Grünbichler (4):
  collect and log origin of found local volumes
  switch order of disk checks
  add comments and rename volhash
  collect errors from all local volumes

 PVE/QemuMigrate.pm | 93 ++++++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 73 insertions(+), 20 deletions(-)

-- 
2.1.4





More information about the pve-devel mailing list