@@ -1937,18 +1937,26 @@ private SnapshotDetailsVO handleSnapshotDetails(long csSnapshotId, String value)
19371937 /**
19381938 * Return expected MigrationOptions for a linked clone volume live storage migration
19391939 */
1940- protected MigrationOptions createLinkedCloneMigrationOptions (VolumeInfo srcVolumeInfo , VolumeInfo destVolumeInfo , String srcVolumeBackingFile , String srcPoolUuid , Storage .StoragePoolType srcPoolType ) {
1940+ protected MigrationOptions createLinkedCloneMigrationOptions (VolumeInfo srcVolumeInfo , VolumeInfo destVolumeInfo , String srcVolumeBackingFile , StoragePoolVO srcPool ) {
1941+ String srcPoolUuid = srcPool .getUuid ();
1942+ Storage .StoragePoolType srcPoolType = srcPool .getPoolType ();
1943+ Long srcPoolClusterId = srcPool .getClusterId ();
19411944 VMTemplateStoragePoolVO ref = templatePoolDao .findByPoolTemplate (destVolumeInfo .getPoolId (), srcVolumeInfo .getTemplateId (), null );
19421945 boolean updateBackingFileReference = ref == null ;
19431946 String backingFile = !updateBackingFileReference ? ref .getInstallPath () : srcVolumeBackingFile ;
1944- return new MigrationOptions (srcPoolUuid , srcPoolType , backingFile , updateBackingFileReference , srcVolumeInfo .getDataStore ().getScope ().getScopeType ());
1947+ ScopeType scopeType = srcVolumeInfo .getDataStore ().getScope ().getScopeType ();
1948+ return new MigrationOptions (srcPoolUuid , srcPoolType , backingFile , updateBackingFileReference , scopeType , srcPoolClusterId );
19451949 }
19461950
19471951 /**
19481952 * Return expected MigrationOptions for a full clone volume live storage migration
19491953 */
1950- protected MigrationOptions createFullCloneMigrationOptions (VolumeInfo srcVolumeInfo , VirtualMachineTO vmTO , Host srcHost , String srcPoolUuid , Storage .StoragePoolType srcPoolType ) {
1951- return new MigrationOptions (srcPoolUuid , srcPoolType , srcVolumeInfo .getPath (), srcVolumeInfo .getDataStore ().getScope ().getScopeType ());
1954+ protected MigrationOptions createFullCloneMigrationOptions (VolumeInfo srcVolumeInfo , VirtualMachineTO vmTO , Host srcHost , StoragePoolVO srcPool ) {
1955+ String srcPoolUuid = srcPool .getUuid ();
1956+ Storage .StoragePoolType srcPoolType = srcPool .getPoolType ();
1957+ Long srcPoolClusterId = srcPool .getClusterId ();
1958+ ScopeType scopeType = srcVolumeInfo .getDataStore ().getScope ().getScopeType ();
1959+ return new MigrationOptions (srcPoolUuid , srcPoolType , srcVolumeInfo .getPath (), scopeType , srcPoolClusterId );
19521960 }
19531961
19541962 /**
@@ -1971,9 +1979,9 @@ protected void setVolumeMigrationOptions(VolumeInfo srcVolumeInfo, VolumeInfo de
19711979
19721980 MigrationOptions migrationOptions ;
19731981 if (MigrationOptions .Type .LinkedClone .equals (migrationType )) {
1974- migrationOptions = createLinkedCloneMigrationOptions (srcVolumeInfo , destVolumeInfo , srcVolumeBackingFile , srcPoolUuid , srcPoolType );
1982+ migrationOptions = createLinkedCloneMigrationOptions (srcVolumeInfo , destVolumeInfo , srcVolumeBackingFile , srcPool );
19751983 } else {
1976- migrationOptions = createFullCloneMigrationOptions (srcVolumeInfo , vmTO , srcHost , srcPoolUuid , srcPoolType );
1984+ migrationOptions = createFullCloneMigrationOptions (srcVolumeInfo , vmTO , srcHost , srcPool );
19771985 }
19781986 migrationOptions .setTimeout (StorageManager .KvmStorageOnlineMigrationWait .value ());
19791987 destVolumeInfo .setMigrationOptions (migrationOptions );
0 commit comments