fix(xo-server/vm.convertToTemplate): handle VBD_IS_EMPTY (#6808)

Fixes https://xcp-ng.org/forum/post/61653
This commit is contained in:
Julien Fontanet
2023-05-12 09:12:41 +02:00
committed by GitHub
parent 3def66d968
commit 73d88cc5f1
2 changed files with 6 additions and 1 deletions

View File

@@ -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.
@@ -27,4 +29,6 @@
<!--packages-start-->
- xo-server patch
<!--packages-end-->

View File

@@ -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
}
}