How to remove subscription notification from Proxmox 4.2

This guide will show you how to easily remove the “No Valid Subscription” nag from Proxmox 4.2 that pops up every time you log in.

NOTE: This guide does not apply to Proxmox VE 5.*. You can remove the nag in newer releases via my updated guide here.

Introduction and Disclaimer

In order to apply this “hack” to a Proxmox installation, you require SSH or console access with administrative/sudo privileges. This guide assumes that you have the appropriate privileges. (If you’re reading this guide then, let’s face it, you probably do).

By following this guide you agree that you do so at your own risk. I take no responsibility for any damage that occurs as a result of this guide.

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

/usr/share/pve-manager/ext6/

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) Comment out every line but the last instance of orig_cmd(); so that it appears as below:

//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();
//}

6) Restart the node – make sure you shut down your running VMs properly first!

7) 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 nag! Do note that this may be overwritten by subsequent updates. If you update your machine and the nag returns simply follow this guide again.

Leave a Reply