vzmigrate: fix for --snapshot

Apparently, option -s|--snapshot (added in commit 85d5266) was not
working properly (or at all). The problem is top_delta (the one
to be excluded from rsync and migrated using ploop copy) was determined
before the snapshot is done.

Fix by moving get_ploop_info() call to right after vzctl snapshot.
The only downside is if ploop proc is weird and get_ploop_info() fails,
there is more to rollback. As it shouldn't happen regularly, we don't
care much about longer rollback.

https://bugzilla.openvz.org/2907

Reported-by: Pavel Odintsov <pavel.odintsov@gmail.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed