@xen-orchestra/backups 0.43.1 → 0.43.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,10 +39,12 @@ export const FullXapi = class FullXapiVmBackupRunner extends AbstractXapi {
39
39
  const vdis = await exportedVm.$getDisks()
40
40
  let maxStreamLength = 1024 * 1024 // Ovf file and tar headers are a few KB, let's stay safe
41
41
  for (const vdiRef of vdis) {
42
- const vdi = await this._xapi.getRecord(vdiRef)
43
- // at most the xva will take the physical usage of the disk
44
- // the resulting stream can be smaller due to the smaller block size for xva than vhd, and compression of xcp-ng
45
- maxStreamLength += vdi.physical_utilisation
42
+ const vdi = await this._xapi.getRecord('VDI', vdiRef)
43
+
44
+ // the size a of fully allocated vdi will be virtual_size exaclty, it's a gross over evaluation
45
+ // of the real stream size in general, since a disk is never completly full
46
+ // vdi.physical_size seems to underevaluate a lot the real disk usage of a VDI, as of 2023-10-30
47
+ maxStreamLength += vdi.virtual_size
46
48
  }
47
49
 
48
50
  const sizeContainer = watchStreamSize(stream)
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "type": "git",
9
9
  "url": "https://github.com/vatesfr/xen-orchestra.git"
10
10
  },
11
- "version": "0.43.1",
11
+ "version": "0.43.2",
12
12
  "engines": {
13
13
  "node": ">=14.18"
14
14
  },