[pve-devel] [PATCH 12/19] phase3 : don't destroy local copy

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Mar 9 17:04:42 CET 2017


The patch semantics are OK, imo.
But I'm not sure if the default behavior should be the one where we let 
the source VM fully intact,
I'm mean a (wrongful) start could result in conflicts like duplicate IP 
addresses or similar.

I would think that at leas an option to delete the source VM, on 
successful migration would be nice,
maybe even opt out.

On 02/22/2017 02:33 PM, Alexandre Derumier wrote:
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
>   PVE/QemuMigrate.pm | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
> index 13952cb..7bd0d6f 100644
> --- a/PVE/QemuMigrate.pm
> +++ b/PVE/QemuMigrate.pm
> @@ -924,6 +924,8 @@ sub phase3 {
>       my $volids = $self->{volumes};
>       return if $self->{phase2errors};
>   
> +    return if $self->{opts}->{externalcluster};
> +
>       # destroy local copies
>       foreach my $volid (@$volids) {
>   	eval { PVE::Storage::vdisk_free($self->{storecfg}, $volid); };





More information about the pve-devel mailing list