fix handle multiple disks per vm

This commit is contained in:
Florent Beauchamp
2022-12-19 10:49:22 +01:00
parent ac8b03bc11
commit 405f1d2bbf
2 changed files with 4 additions and 3 deletions

View File

@@ -101,7 +101,7 @@ export default class VhdEsxiRaw extends VhdAbstract {
let nextChunkLength = Math.min(VHD_BLOCK_LENGTH, length)
const progress = setInterval(() => {
console.log("reading blocks", pos / VHD_BLOCK_LENGTH, "/", length)
console.log("reading blocks", pos / VHD_BLOCK_LENGTH, "/", length/ VHD_BLOCK_LENGTH)
}, 30 * 1000)
while (nextChunkLength > 0) {

View File

@@ -171,7 +171,7 @@ export default class MigrateVm {
chainsByNodes[disk.node].push(disk)
})
})
let userdevice = 0
for (const node in chainsByNodes) {
const chainByNode = chainsByNodes[node]
console.log({chainByNode})
@@ -186,7 +186,7 @@ export default class MigrateVm {
console.log('vdi created')
await xapi.VBD_create({
userdevice: String(0),
userdevice: String(userdevice),
VDI: vdi.$ref,
VM: vm.$ref,
})
@@ -209,6 +209,7 @@ export default class MigrateVm {
// for now we don't handle snapshots
break
}
userdevice ++
}
console.log('disks created')
// remove the importing in label