fix(xo-web/home/vm): bulk intra pool migration: fix map VDI -> SR (#5578)
See xoa-support#3355 See xoa-support#3248
This commit is contained in:
parent
90cafa126f
commit
258ae64568
@ -23,6 +23,7 @@
|
||||
- [Host] Restart toolstack: fix `ECONNREFUSED` error (PR [#5553](https://github.com/vatesfr/xen-orchestra/pull/5553))
|
||||
- [VM migration] Intra-pool: don't automatically select migration network if no default migration network is defined on the pool (PR [#5564](https://github.com/vatesfr/xen-orchestra/pull/5564))
|
||||
- [New SR] Fix `lun.LUNid.trim is not a function` error [#5497](https://github.com/vatesfr/xen-orchestra/issues/5497) (PR [#5581](https://github.com/vatesfr/xen-orchestra/pull/5581))
|
||||
- [Home/vm] Bulk intra pool migration: fix VM VDIs on a shared SR wrongly migrated to the default SR (PR [#3987](https://github.com/vatesfr/xen-orchestra/pull/3987))
|
||||
|
||||
### Packages to release
|
||||
|
||||
|
@ -121,16 +121,16 @@ export default class MigrateVmsModalBody extends BaseComponent {
|
||||
const { doNotMigrateVdi, doNotMigrateVmVdis, migrationNetworkId, networkId, smartVifMapping, srId } = this.state
|
||||
|
||||
// Map VM --> ( Map VDI --> SR )
|
||||
// 2021-02-16: Fill the map (VDI -> SR) with *all* the VDIs to avoid unexpectedly migrating them to the wrong SRs:
|
||||
// - Intra-pool: a VDI will only be migrated to the selected SR if the VDI was on a local SR.
|
||||
// - Inter-pool: all VDIs will be migrated to the selected SR.
|
||||
const mapVmsMapVdisSrs = {}
|
||||
forEach(vbdsByVm, (vbds, vm) => {
|
||||
if (doNotMigrateVmVdis[vm]) {
|
||||
return
|
||||
}
|
||||
const mapVdisSrs = {}
|
||||
forEach(vbds, vbd => {
|
||||
const vdi = vbd.VDI
|
||||
if (!vbd.is_cd_drive && vdi) {
|
||||
mapVdisSrs[vdi] = doNotMigrateVdi[vdi] ? this._getObject(vdi).SR : srId
|
||||
mapVdisSrs[vdi] = doNotMigrateVmVdis[vm] || doNotMigrateVdi[vdi] ? this._getObject(vdi).$SR : srId
|
||||
}
|
||||
})
|
||||
mapVmsMapVdisSrs[vm] = mapVdisSrs
|
||||
|
Loading…
Reference in New Issue
Block a user