Skip to content

Commit

Permalink
fix(xo-server/vm.import): fix fetching UUID from ref
Browse files Browse the repository at this point in the history
Introduced by 70b0983
Reported by @ydirson

This led to `UUID_INVALID(VM, OpaqueRef:...)` when importing from URL.
  • Loading branch information
julien-f committed Feb 2, 2024
1 parent 092475d commit 5d4723e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.unreleased.md
Expand Up @@ -11,6 +11,8 @@

> Users must be able to say: “I had this issue, happy to know it's fixed”
- [Import/VM] Fix `UUID_INVALID(VM, OpaqueRef:...)` error when importing from URL

### Packages to release

> When modifying a package, add it here with its release type.
Expand All @@ -29,5 +31,6 @@

- @xen-orchestra/immutable-backups patch
- @xen-orchestra/xva patch
- xo-server patch

<!--packages-end-->
2 changes: 1 addition & 1 deletion packages/xo-server/src/api/vm.mjs
Expand Up @@ -1326,7 +1326,7 @@ async function import_({ data, sr, type = 'xva', url }) {
}

const ref = await xapi.VM_import(await hrp(url), sr._xapiRef)
return xapi.call('VM.get_by_uuid', ref)
return xapi.call('VM.get_uuid', ref)
}

return {
Expand Down

0 comments on commit 5d4723e

Please sign in to comment.