fix(Xapi#importVdiContent): find first attached PBD (#279)
This commit is contained in:
parent
4778274c97
commit
ee1105b6dd
@ -2164,14 +2164,17 @@ export default class Xapi extends XapiBase {
|
||||
vdi: vdi.$ref
|
||||
}
|
||||
|
||||
const host = vdi.$SR.$PBDs[0].$host
|
||||
const pbd = find(vdi.$SR.$PBDs, 'currently_attached')
|
||||
if (!pbd) {
|
||||
throw new Error('no valid PBDs found')
|
||||
}
|
||||
|
||||
const task = this._watchTask(taskRef)
|
||||
await Promise.all([
|
||||
stream.checksumVerified,
|
||||
task,
|
||||
put(stream, {
|
||||
hostname: host.address,
|
||||
hostname: pbd.$host.address,
|
||||
method: 'put',
|
||||
path: '/import_raw_vdi/',
|
||||
query
|
||||
|
Loading…
Reference in New Issue
Block a user