Skip to content

Commit

Permalink
fix(xo-server/vm.convertToTemplate): handle VBD_IS_EMPTY (#6808)
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-f authored May 12, 2023
1 parent 3def66d commit 73d88cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

> Users must be able to say: “I had this issue, happy to know it's fixed”
- [VM] Fix `VBD_IS_EMPTY` error when converting to template [Forum#61653](https://xcp-ng.org/forum/post/61653) (PR [#6808](https://github.com/vatesfr/xen-orchestra/pull/6808))

### Packages to release

> When modifying a package, add it here with its release type.
Expand All @@ -27,4 +29,6 @@
<!--packages-start-->

- xo-server patch

<!--packages-end-->
3 changes: 2 additions & 1 deletion packages/xo-server/src/api/vm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,8 @@ export async function convertToTemplate({ vm }) {

// Attempts to eject all removable media
const ignoreNotRemovable = error => {
if (error.code !== 'VBD_NOT_REMOVABLE_MEDIA') {
const { code } = error
if (code !== 'VBD_IS_EMPTY' && code !== 'VBD_NOT_REMOVABLE_MEDIA') {
throw error
}
}
Expand Down

0 comments on commit 73d88cc

Please sign in to comment.