diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md
index 102416538..6a6d87f1a 100644
--- a/CHANGELOG.unreleased.md
+++ b/CHANGELOG.unreleased.md
@@ -13,6 +13,8 @@
> Users must be able to say: “I had this issue, happy to know it's fixed”
+- [Licenses] Remove "Bind license" button for proxies whose corresponding VM cannot be found (PR [#6472](https://github.com/vatesfr/xen-orchestra/pull/6472))
+
### Packages to release
> When modifying a package, add it here with its release type.
diff --git a/packages/xo-web/src/common/intl/messages.js b/packages/xo-web/src/common/intl/messages.js
index 2807b7c25..2d91a808f 100644
--- a/packages/xo-web/src/common/intl/messages.js
+++ b/packages/xo-web/src/common/intl/messages.js
@@ -2448,6 +2448,7 @@ const messages = {
premiumLicense: 'Premium license',
trialLicenseInfo: 'You are currently in a {edition} trial period that will end on {date, date, medium}',
proxyMultipleLicenses: 'This proxy has more than 1 license!',
+ proxyUnknownVm: 'Unknown proxy VM.',
// ----- proxies -----
deployProxyDisabled: 'Only available to XOA users',
diff --git a/packages/xo-web/src/xo-app/proxies/index.js b/packages/xo-web/src/xo-app/proxies/index.js
index f17e26fb4..89c58eb6e 100644
--- a/packages/xo-web/src/xo-app/proxies/index.js
+++ b/packages/xo-web/src/xo-app/proxies/index.js
@@ -145,6 +145,14 @@ const COLUMNS = [
{
name: _('license'),
itemRenderer: (proxy, { isAdmin, licensesByVmUuid }) => {
+ if (proxy.vmUuid === undefined) {
+ return (
+
+ {_('proxyUnknownVm')} {_('contactUs')}
+
+ )
+ }
+
const licenses = licensesByVmUuid[proxy.vmUuid]
// Proxy bound to multiple licenses
diff --git a/packages/xo-web/src/xo-app/xoa/licenses/proxies.js b/packages/xo-web/src/xo-app/xoa/licenses/proxies.js
index eba3818f1..55350eb76 100644
--- a/packages/xo-web/src/xo-app/xoa/licenses/proxies.js
+++ b/packages/xo-web/src/xo-app/xoa/licenses/proxies.js
@@ -32,6 +32,14 @@ class ProxyLicensesForm extends Component {
const { licenseId } = this.state
const licenses = userData.licensesByVmUuid[item.vmUuid]
+ if (item.vmUuid === undefined) {
+ return (
+
+ {_('proxyUnknownVm')} {_('contactUs')}
+
+ )
+ }
+
// Proxy bound to multiple licenses
if (licenses?.length > 1) {
return (