fix(vmware-explorer): better handling of VM import without any storage (#7168)

This commit is contained in:
Florent BEAUCHAMP
2023-11-14 15:14:13 +01:00
committed by GitHub
parent b2348474c3
commit 46ec2dfd56
2 changed files with 5 additions and 0 deletions

View File

@@ -235,6 +235,9 @@ export default class Esxi extends EventEmitter {
return Object.keys(datas).map(id => {
const { config, storage, runtime } = datas[id]
if (storage === undefined) {
throw new Error(`source VM ${id} don't have any storage`)
}
const perDatastoreUsage = Array.isArray(storage.perDatastoreUsage)
? storage.perDatastoreUsage
: [storage.perDatastoreUsage]

View File

@@ -12,6 +12,7 @@
> Users must be able to say: “I had this issue, happy to know it's fixed”
- [Backup/Restore] In case of snapshot with memory, create the suspend VDI on the correct SR instead of the default one
- [Import/ESXi] Handle `Cannot read properties of undefined (reading 'perDatastoreUsage')` error when importing VM without storage (PR [#7168](https://github.com/vatesfr/xen-orchestra/pull/7168))
### Packages to release
@@ -30,6 +31,7 @@
<!--packages-start-->
- @xen-orchestra/backups patch
- @xen-orchestra/vmware-explorer patch
- xo-web patch
<!--packages-end-->