@@ -1949,18 +1949,26 @@ private SnapshotDetailsVO handleSnapshotDetails(long csSnapshotId, String value)
1949
1949
/**
1950
1950
* Return expected MigrationOptions for a linked clone volume live storage migration
1951
1951
*/
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 ();
1953
1956
VMTemplateStoragePoolVO ref = templatePoolDao .findByPoolTemplate (destVolumeInfo .getPoolId (), srcVolumeInfo .getTemplateId (), null );
1954
1957
boolean updateBackingFileReference = ref == null ;
1955
1958
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 );
1957
1961
}
1958
1962
1959
1963
/**
1960
1964
* Return expected MigrationOptions for a full clone volume live storage migration
1961
1965
*/
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 );
1964
1972
}
1965
1973
1966
1974
/**
@@ -1983,9 +1991,9 @@ protected void setVolumeMigrationOptions(VolumeInfo srcVolumeInfo, VolumeInfo de
1983
1991
1984
1992
MigrationOptions migrationOptions ;
1985
1993
if (MigrationOptions .Type .LinkedClone .equals (migrationType )) {
1986
- migrationOptions = createLinkedCloneMigrationOptions (srcVolumeInfo , destVolumeInfo , srcVolumeBackingFile , srcPoolUuid , srcPoolType );
1994
+ migrationOptions = createLinkedCloneMigrationOptions (srcVolumeInfo , destVolumeInfo , srcVolumeBackingFile , srcPool );
1987
1995
} else {
1988
- migrationOptions = createFullCloneMigrationOptions (srcVolumeInfo , vmTO , srcHost , srcPoolUuid , srcPoolType );
1996
+ migrationOptions = createFullCloneMigrationOptions (srcVolumeInfo , vmTO , srcHost , srcPool );
1989
1997
}
1990
1998
migrationOptions .setTimeout (StorageManager .KvmStorageOnlineMigrationWait .value ());
1991
1999
destVolumeInfo .setMigrationOptions (migrationOptions );
0 commit comments