Remove Proxmox “No Valid Subscription” message
Update #3 (2021-12-22): As pointed out on this page a method that works from 5.1 up to latest 7.x. I've tested this with 7.1-8 successfully:
sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service
Update #2 (2017-04-03): janus57, Michael S. and Marcel G. pointed out, that there are new ways to disable the message. First by still modifying appropriate files - see in the first Link to the Comments - which i've tested by myself on a new 4.4-13 or by leading Proxmox to believe that it has a valid subscription - see the second Link in the Comments - which i haven't tested by myself but it looks like it's working. I don't know if it has any other negative implications, so use whichever method you prefer! Thanks for the continious help from all others in the comments that help this guide to stay up to date!
Update #1 (2017-01-23): Simon Arons (thank you!) has posted a one-liner which patches Promox 4.4-X versions. I haven't tried it but there are success stories, so you should give it a try. For your convenience, here it is:
sed -i.bak "s/data.status !== 'Active'/false/g" /usr/share/pve-manager/ext*/pvemanagerlib.js
If you're trying out Proxmox in your Homelab it is very annoying to see this "No valid Subscription" message unless you've purchased a subscription from Promox which i really recommend. You support them to keep up the development of Proxmox VE and have access to support and the enterprise repository.
Nevertheless when trying out Promox or using it for free in your Homelab you can easily get rid of that message after each login by modifying a js file.
This file may get overwritten by an update and you have to reapply this fix afterwards.
Apply the fix using SSH/Console
For this fix you need access to the command-line via SSH or the Console in the WebUI.
I've tested this fix on the most recent Proxmox 4.2. At first go to the folder and backup the file we need to change first:
cp /usr/share/pve-manager/ext6/pvemanagerlib.js /usr/share/pve-manager/ext6/pvemanagerlib.js.bck
Then we modify it by completely removing the Subscription check. As of this writing the line where the check starts is 510. The block looks like this
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();
}
just replace it with this block to disable the check even if you have a valid subscription:
//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();
//}
You can see that we only leave the orig_cmd();
thing uncommented.
Save this file and reload your Promox WebUI in the browser. Now the check should be gone.
Credits
Credits go to James Coyle for his initial post on this for an older Proxmox version
Disclaimer
I am NOT responsible for any damage this change may do to your system. Use this Fix at YOUR OWN RISK!