[pve-devel] [PATCH V2 qemu-server] Add LVM and LVMThin to QemuMigration

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Jun 8 15:13:23 CEST 2016


> Wolfgang Link <w.link at proxmox.com> hat am 8. Juni 2016 um 14:59 geschrieben:
>  
>  	    # if file, check if a backing file exist
> -	    if (!($scfg->{type} eq 'dir' || $scfg->{type} eq 'zfspool') && (!$sharedvm)) {
> -		my (undef, undef, undef, $parent) = PVE::Storage::volume_size_info($self->{storecfg}, $volid, 1);
> -		die "can't migrate '$volid' as it's a clone of '$parent'" if $parent;
> +	    if ($scfg->{type} eq 'dir' || $scfg->{type} eq 'zfspool' || $scfg->{type} eq 'lvmthin')  {
> +		#if a basename exists there must be a parrent.
> +		my $basename = (PVE::Storage::parse_volname($self->{storecfg}, $volid))[3];
> +		die "can't migrate '$volid' as it's a clone of '$basename'" if $basename;
>  	    }
>  	}
>  

that last check also needs the " && (!sharedvm)" check in the new version, because VMs with only shared disks are allowed to be linked clones (the disks are not moved anyway in that case).

also "s/parrent/parent/" ;) the old outdated comment in front of the if should probably also be removed, the new one describes the situation better imho




More information about the pve-devel mailing list