Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions @xen-orchestra/vmware-explorer/esxi.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -30,6 +31,7 @@
<!--packages-start-->

- @xen-orchestra/backups patch
- @xen-orchestra/vmware-explorer patch
- xo-web patch

<!--packages-end-->