diff --git a/package.json b/package.json index 953a40d75..5de2a0840 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "tmp": "^0.0.31", "uuid": "^3.0.1", "ws": "^3.0.0", - "xen-api": "^0.14.0", + "xen-api": "^0.14.1", "xml2js": "~0.4.17", "xo-acl-resolver": "^0.2.3", "xo-collection": "^0.4.1", diff --git a/src/xapi/index.js b/src/xapi/index.js index a22adde94..f06114809 100644 --- a/src/xapi/index.js +++ b/src/xapi/index.js @@ -662,7 +662,8 @@ export default class Xapi extends XapiBase { await this.call('VM.hard_shutdown', $ref) } - await this.barrier('VM', $ref) + // ensure the vm record is up-to-date + vm = await this.barrier('VM', $ref) return Promise.all([ this.call('VM.destroy', $ref), diff --git a/yarn.lock b/yarn.lock index 9742822c9..049648f58 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7093,9 +7093,9 @@ xdg-basedir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" -xen-api@^0.14.0: - version "0.14.0" - resolved "https://registry.yarnpkg.com/xen-api/-/xen-api-0.14.0.tgz#93bfb9f35daca1092237f1a0dfb211005a8e7916" +xen-api@^0.14.1: + version "0.14.1" + resolved "https://registry.yarnpkg.com/xen-api/-/xen-api-0.14.1.tgz#1b70226cf98f19353e789baf1d7ec4d73d9137a1" dependencies: babel-polyfill "^6.23.0" blocked "^1.2.1"