@@ -1948,18 +1948,26 @@ private SnapshotDetailsVO handleSnapshotDetails(long csSnapshotId, String value)
19481948 /**
19491949 * Return expected MigrationOptions for a linked clone volume live storage migration
19501950 */
1951- protected MigrationOptions createLinkedCloneMigrationOptions (VolumeInfo srcVolumeInfo , VolumeInfo destVolumeInfo , String srcVolumeBackingFile , String srcPoolUuid , Storage .StoragePoolType srcPoolType ) {
1951+ protected MigrationOptions createLinkedCloneMigrationOptions (VolumeInfo srcVolumeInfo , VolumeInfo destVolumeInfo , String srcVolumeBackingFile , StoragePoolVO srcPool ) {
1952+ String srcPoolUuid = srcPool .getUuid ();
1953+ Storage .StoragePoolType srcPoolType = srcPool .getPoolType ();
1954+ Long srcPoolClusterId = srcPool .getClusterId ();
19521955 VMTemplateStoragePoolVO ref = templatePoolDao .findByPoolTemplate (destVolumeInfo .getPoolId (), srcVolumeInfo .getTemplateId (), null );
19531956 boolean updateBackingFileReference = ref == null ;
19541957 String backingFile = !updateBackingFileReference ? ref .getInstallPath () : srcVolumeBackingFile ;
1955- return new MigrationOptions (srcPoolUuid , srcPoolType , backingFile , updateBackingFileReference , srcVolumeInfo .getDataStore ().getScope ().getScopeType ());
1958+ ScopeType scopeType = srcVolumeInfo .getDataStore ().getScope ().getScopeType ();
1959+ return new MigrationOptions (srcPoolUuid , srcPoolType , backingFile , updateBackingFileReference , scopeType , srcPoolClusterId );
19561960 }
19571961
19581962 /**
19591963 * Return expected MigrationOptions for a full clone volume live storage migration
19601964 */
1961- protected MigrationOptions createFullCloneMigrationOptions (VolumeInfo srcVolumeInfo , VirtualMachineTO vmTO , Host srcHost , String srcPoolUuid , Storage .StoragePoolType srcPoolType ) {
1962- return new MigrationOptions (srcPoolUuid , srcPoolType , srcVolumeInfo .getPath (), srcVolumeInfo .getDataStore ().getScope ().getScopeType ());
1965+ protected MigrationOptions createFullCloneMigrationOptions (VolumeInfo srcVolumeInfo , VirtualMachineTO vmTO , Host srcHost , StoragePoolVO srcPool ) {
1966+ String srcPoolUuid = srcPool .getUuid ();
1967+ Storage .StoragePoolType srcPoolType = srcPool .getPoolType ();
1968+ Long srcPoolClusterId = srcPool .getClusterId ();
1969+ ScopeType scopeType = srcVolumeInfo .getDataStore ().getScope ().getScopeType ();
1970+ return new MigrationOptions (srcPoolUuid , srcPoolType , srcVolumeInfo .getPath (), scopeType , srcPoolClusterId );
19631971 }
19641972
19651973 /**
@@ -1982,9 +1990,9 @@ protected void setVolumeMigrationOptions(VolumeInfo srcVolumeInfo, VolumeInfo de
19821990
19831991 MigrationOptions migrationOptions ;
19841992 if (MigrationOptions .Type .LinkedClone .equals (migrationType )) {
1985- migrationOptions = createLinkedCloneMigrationOptions (srcVolumeInfo , destVolumeInfo , srcVolumeBackingFile , srcPoolUuid , srcPoolType );
1993+ migrationOptions = createLinkedCloneMigrationOptions (srcVolumeInfo , destVolumeInfo , srcVolumeBackingFile , srcPool );
19861994 } else {
1987- migrationOptions = createFullCloneMigrationOptions (srcVolumeInfo , vmTO , srcHost , srcPoolUuid , srcPoolType );
1995+ migrationOptions = createFullCloneMigrationOptions (srcVolumeInfo , vmTO , srcHost , srcPool );
19881996 }
19891997 migrationOptions .setTimeout (StorageManager .KvmStorageOnlineMigrationWait .value ());
19901998 destVolumeInfo .setMigrationOptions (migrationOptions );
0 commit comments