fix(vhd-lib): use parent locator of root disk in VhdSynthetic

This commit is contained in:
Florent Beauchamp
2021-12-02 13:45:56 +01:00
committed by Julien Fontanet
parent 949b17dee6
commit ff806a3ff9

View File

@@ -1,4 +1,5 @@
import * as UUID from 'uuid'
import cloneDeep from 'lodash/cloneDeep.js'
import { asyncMap } from '@xen-orchestra/async-map'
import { VhdAbstract } from './VhdAbstract'
import { DISK_TYPES, FOOTER_SIZE, HEADER_SIZE } from '../_constants'
@@ -19,6 +20,7 @@ export class VhdSynthetic extends VhdAbstract {
// TODO: set parentLocatorEntry-s in header
return {
...vhd.header,
parentLocatorEntry: cloneDeep(rootVhd.header.parentLocatorEntry),
tableOffset: FOOTER_SIZE + HEADER_SIZE,
parentTimestamp: rootVhd.header.parentTimestamp,
parentUnicodeName: rootVhd.header.parentUnicodeName,