Remove subscription notification from Proxmox VE 5.0, 5.1 and 5.2

This guide will show you how to easily remove the “No Valid Subscription” popup from Proxmox VE 5.0, 5.1 and 5.2 that pops up every time you log in.

Steps

1) Log in to your Proxmox machine via SSH or via the VNC console available from within the web UI.

2)Navigate to the following directory where the PVE manager configuration files are stored

Proxmox 5.0

/usr/share/pve-manager/js/

Proxmox 5.1

/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js

3) Make a backup of the Javascript file pvemanagerlib.js

cp pvemanagerlib.js pvemanagerlib.js.bkp

4) Now open the file you just backed up with your favourite editor and find the following lines of code:

if (data.status === 'Active') {
    Ext.Msg.show({
      title: gettext('No valid subscription'),
      icon: Ext.Msg.WARNING,
      msg: PVE.Utils.noSubKeyHtml,
      buttons: Ext.Msg.OK,
      callback: function(btn) {
          if (btn !== 'ok') {
              return;
          }
          orig_cmd();
      }
    });
} else {
    orig_cmd();
}

5) Replace the first if() string with if(false), like so:

if (false) {
    Ext.Msg.show({
      title: gettext('No valid subscription'),
      icon: Ext.Msg.WARNING,
      msg: PVE.Utils.noSubKeyHtml,
      buttons: Ext.Msg.OK,
      callback: function(btn) {
          if (btn !== 'ok') {
              return;
          }
          orig_cmd();
      }
    });
} else {
    orig_cmd();
}

6) Navigate back to your web UI (log out first if you’re still logged in) and hard refresh your browser. Log back in, no more popup! Do note that this may be overwritten by subsequent updates. If you update your machine and the popup returns simply follow this guide again.

Proxmox 5.2

1)

--- /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js.bak	2018-05-14 12:06:33.000000000 +0300
+++ /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js	2018-07-25 23:55:45.513350604 +0300
@@ -350,6 +350,8 @@ Ext.define('Proxmox.Utils', { utilities:
 		var data = response.result.data;

 		if (data.status !== 'Active') {
+
+		    /*************************************************
 		    Ext.Msg.show({
 			title: gettext('No valid subscription'),
 			icon: Ext.Msg.WARNING,
@@ -362,6 +364,8 @@ Ext.define('Proxmox.Utils', { utilities:
 			    orig_cmd();
 			}
 		    });
+		    ************************************************/
+		    orig_cmd();
 		} else {
 		    orig_cmd();
 		}

2)

--- /usr/share/pve-manager/js/pvemanagerlib.js.bak	2018-05-14 15:04:15.000000000 +0300
+++ /usr/share/pve-manager/js/pvemanagerlib.js	2018-07-25 23:39:29.990884809 +0300
@@ -31676,6 +31676,7 @@ Ext.define('PVE.dc.Support', {
 		success: function(response, opts) {
 		    var data = response.result.data;

+		/***********************************
 		    if (data.status === 'Active') {
 			if (data.level === 'c') {
 			    me.updateCommunity(data);
@@ -31685,6 +31686,8 @@ Ext.define('PVE.dc.Support', {
 		    } else {
 			me.updateInactive(data);
 		    }
+		**********************************/
+
 		}
 	    });
 	};

3 Comments

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.