feat(Xapi#moveVdi): do nothing if already on the correct SR
Fxies vatesfr/xo-web#2158
This commit is contained in:
parent
a39e6846fe
commit
dbbf6d8c1f
@ -1635,6 +1635,10 @@ export default class Xapi extends XapiBase {
|
||||
const vdi = this.getObject(vdiId)
|
||||
const sr = this.getObject(srId)
|
||||
|
||||
if (vdi.SR === sr.$ref) {
|
||||
return // nothing to do
|
||||
}
|
||||
|
||||
debug(`Moving VDI ${vdi.name_label} from ${vdi.$SR.name_label} to ${sr.name_label}`)
|
||||
try {
|
||||
await this.call('VDI.pool_migrate', vdi.$ref, sr.$ref, {})
|
||||
|
Loading…
Reference in New Issue
Block a user