@@ -1949,18 +1949,26 @@ private SnapshotDetailsVO handleSnapshotDetails(long csSnapshotId, String value)
19491949 /**
19501950 * Return expected MigrationOptions for a linked clone volume live storage migration
19511951 */
1952- protected MigrationOptions createLinkedCloneMigrationOptions (VolumeInfo srcVolumeInfo , VolumeInfo destVolumeInfo , String srcVolumeBackingFile , String srcPoolUuid , Storage .StoragePoolType srcPoolType ) {
1952+ protected MigrationOptions createLinkedCloneMigrationOptions (VolumeInfo srcVolumeInfo , VolumeInfo destVolumeInfo , String srcVolumeBackingFile , StoragePoolVO srcPool ) {
1953+ String srcPoolUuid = srcPool .getUuid ();
1954+ Storage .StoragePoolType srcPoolType = srcPool .getPoolType ();
1955+ Long srcPoolClusterId = srcPool .getClusterId ();
19531956 VMTemplateStoragePoolVO ref = templatePoolDao .findByPoolTemplate (destVolumeInfo .getPoolId (), srcVolumeInfo .getTemplateId (), null );
19541957 boolean updateBackingFileReference = ref == null ;
19551958 String backingFile = !updateBackingFileReference ? ref .getInstallPath () : srcVolumeBackingFile ;
1956- return new MigrationOptions (srcPoolUuid , srcPoolType , backingFile , updateBackingFileReference , srcVolumeInfo .getDataStore ().getScope ().getScopeType ());
1959+ ScopeType scopeType = srcVolumeInfo .getDataStore ().getScope ().getScopeType ();
1960+ return new MigrationOptions (srcPoolUuid , srcPoolType , backingFile , updateBackingFileReference , scopeType , srcPoolClusterId );
19571961 }
19581962
19591963 /**
19601964 * Return expected MigrationOptions for a full clone volume live storage migration
19611965 */
1962- protected MigrationOptions createFullCloneMigrationOptions (VolumeInfo srcVolumeInfo , VirtualMachineTO vmTO , Host srcHost , String srcPoolUuid , Storage .StoragePoolType srcPoolType ) {
1963- return new MigrationOptions (srcPoolUuid , srcPoolType , srcVolumeInfo .getPath (), srcVolumeInfo .getDataStore ().getScope ().getScopeType ());
1966+ protected MigrationOptions createFullCloneMigrationOptions (VolumeInfo srcVolumeInfo , VirtualMachineTO vmTO , Host srcHost , StoragePoolVO srcPool ) {
1967+ String srcPoolUuid = srcPool .getUuid ();
1968+ Storage .StoragePoolType srcPoolType = srcPool .getPoolType ();
1969+ Long srcPoolClusterId = srcPool .getClusterId ();
1970+ ScopeType scopeType = srcVolumeInfo .getDataStore ().getScope ().getScopeType ();
1971+ return new MigrationOptions (srcPoolUuid , srcPoolType , srcVolumeInfo .getPath (), scopeType , srcPoolClusterId );
19641972 }
19651973
19661974 /**
@@ -1983,9 +1991,9 @@ protected void setVolumeMigrationOptions(VolumeInfo srcVolumeInfo, VolumeInfo de
19831991
19841992 MigrationOptions migrationOptions ;
19851993 if (MigrationOptions .Type .LinkedClone .equals (migrationType )) {
1986- migrationOptions = createLinkedCloneMigrationOptions (srcVolumeInfo , destVolumeInfo , srcVolumeBackingFile , srcPoolUuid , srcPoolType );
1994+ migrationOptions = createLinkedCloneMigrationOptions (srcVolumeInfo , destVolumeInfo , srcVolumeBackingFile , srcPool );
19871995 } else {
1988- migrationOptions = createFullCloneMigrationOptions (srcVolumeInfo , vmTO , srcHost , srcPoolUuid , srcPoolType );
1996+ migrationOptions = createFullCloneMigrationOptions (srcVolumeInfo , vmTO , srcHost , srcPool );
19891997 }
19901998 migrationOptions .setTimeout (StorageManager .KvmStorageOnlineMigrationWait .value ());
19911999 destVolumeInfo .setMigrationOptions (migrationOptions );
0 commit comments