Removing the Proxmox 3.1 subscription nag dialog

Written by

in

Proxmox is a pretty nice virtualisation solution for the medium enterprise. It’s bigger than Virtualbox, smaller than Openstack, and easy to implement on both as single machine or a whole cluster. Unfortunately, the developers are struggling to pay the bills. So with the 3.1 release they have followed the path of “Subscription versus Community.” Users without a subscription are now treated to this dialog every time they login:

You do not have a valid subscription for this server. Please visit www.proxmox.com to get a list of available options.

Thankfully, this is easily fixed. Apply this patch to /usr/share/pve-manager/ext4/pvemanagerlib.js. Then logout from Proxmox, clear your browser’s cache, and login again.

If you trust me (ha ha!), just run this from your server:

wget http://www.tolaris.com/blog/wp-content/uploads/2013/08/no_subscription_popup_pvemanagerlib.js-3.1.patch -O - | patch -p0

Update 2013-08-28: I posted this to the Proxmox forums. A staff member edited it to remove the patch.

Comments

29 responses to “Removing the Proxmox 3.1 subscription nag dialog”

  1. brian Avatar
    brian

    Thanks for posting this here. Like so many others I don’t really like the way the Proxmox staff went about implementing this new subscription plan. And deleting posts that show how to circumvent the nag messages when you only want to use the pve-no-subscription repository isn’t doing much to make them look any better.
    I hope they weather this storm and come out on the other side with their heads screwed on straight without destroying the community. Proxmox is great!

  2. Jean-Marc Avatar
    Jean-Marc

    Hi !

    Thanks, great patch for a great software! :-)
    Unfortunately, it doesn’t work “as is” anymore. I had to apply it manually…

    1. Tyler Wagner Avatar

      I won’t be able to post a new patch for a few days. If you have a copy of the pre-patched file, run this and post it here:

      diff -ruN pvemanagerlib.js.orig pvemanagerlib.js

      1. Odd Stråbø Avatar

        Get:6 http://download.proxmox.com/debian/ wheezy/pve-no-subscription pve-manager amd64 3.1-4 [1,296 kB]

        Patch still works as is.

        Thanks for the patch!

  3. Christophe Nouvel Avatar
    Christophe Nouvel

    Thanks,

    Manually applied.

    Works great on my test cluster (on Mac OS X, 2 nodes + DRBD in virtualbox!!)

    Christophe.

  4. Andrew Wyatt Avatar
    Andrew Wyatt

    Here’s another patch that just removes the check:

    $ diff -rupN pvemanagerlib.js /usr/share/pve-manager/ext4/pvemanagerlib.js
    --- pvemanagerlib.js	2013-09-10 11:17:02.000000000 -0500
    +++ /usr/share/pve-manager/ext4/pvemanagerlib.js	2013-09-10 11:21:56.000000000 -0500
    @@ -107,8 +107,6 @@ Ext.define('PVE.Utils', { statics: {
     	'p': gettext('Premium')
         },
     
    -    noSubKeyHtml: 'You do not have a valid subscription for this server. Please visit www.proxmox.com to get a list of available options.',
    -
         kvm_ostypes: {
     	other: gettext('Other OS types'),
     	wxp: 'Microsoft Windows XP/2003',
    @@ -446,23 +444,7 @@ Ext.define('PVE.Utils', { statics: {
     	    },
     	    success: function(response, opts) {
     		var data = response.result.data;
    -
    -		if (data.status !== 'Active') {
    -		    Ext.Msg.show({
    -			title: '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();
    -		}
    +		orig_cmd();
     	    }
     	});
         },
    1. Tyler Wagner Avatar

      That’s a better solution for the code, but the reason I chose the “false &&” method is because it made minimal changes to the code. This means the patch is more likely to work going forward. Any change made by the Proxmox team to that code stanza in a later release will break your patch.

  5. Andrew Wyatt Avatar
    Andrew Wyatt

    Very true. Since I use proxmox though I’ll most likely just maintain the patch. I’m thinking about pulling their sources and setting up a pre-patched debian repository for Proxmox at SourceForge. That’s a lot of effort though when I can just add a checksum || patch to rc.local. :)

    1. Luca Avatar

      If that’s too much effort, just share the script you use for patching from rc.local on github.

  6. Ted Chen Avatar
    Ted Chen

    Thanks for posting the patch.

  7. nour Avatar
    nour

    would you please attach the full content of the file as I accidentally removed the file with no backup!

    1. Tyler Wagner Avatar

      This should be identical to the original /usr/share/pve-manager/ext4/pvemanagerlib.js from Proxmox 3.1. I didn’t actually keep an unpatched file, so I reversed the patch with -R just to upload it for you.

  8. GOZALO MARQUEZ BENITEZ Avatar

    Hola, en el website http://pve.proxmox.com tienes una forma facil y simple de quitar el mensaje de error por carecer de suscripción. Sólo es necesario editar el archivo pve-enterprise.list, que se encuentra en el directorio /etc/apt/sources.list.d y comentar la linea que hace referencia a enterprise.proxmox.com.

    Saludos,

    Gonzalo Márquez

    nano /etc/apt/sources.list.d/pve-enterprise.list

    # deb https://enterprise.proxmox.com/debian wheezy pve-enterprise

    Hi, on the website http://pve.proxmox.com have an easy and simple way to remove the error message for lack of subscription. You only need to edit the file pve-enterprise.list, located in the / etc / apt / sources.list.d and comment the line that refers to enterprise.proxmox.com.

    See you,

    Gonzalo Márquez

    1. Tyler Wagner Avatar

      Thanks for the bilingual reply, Gonzalo! So the proxmox packages in the enterprise repo don’t have this dialog? Or does the license check merely check for the presence of the repository?

      Gracias por la respuesta bilingüe, Gonzalo! Así que los paquetes Proxmox en la empresa repo no tienen este diálogo? ¿O es que la comprobación de la licencia simplemente comprobar la presencia del repositorio?

  9. Tim B Avatar
    Tim B

    Just applied the patch to my install. So much less annoying now.

    I get why they want to boost sales of the support package, but they could have made it less annoying – a simple obvious red bar across the top of every page would have got the point across with less pain. It is, after all, other people’s freely given work they rely on underneath all this.

  10. ison Avatar

    thanks is working now

  11. […] sorry here the source of patch :  patch proxmox-ve 3.1 […]

  12. James Avatar

    Hi,

    I wrote a post on manually making changes to the file, just in case the patch doesn’t work.

    http://www.jamescoyle.net/how-to/614-remove-the-proxmox-no-subscription-message

    Cheers,

    James.

  13. Methil Avatar
    Methil

    Patch still working with pvemanager 3.1-24

    Might want to update the patch file to reflect the new line position

    patch file say line 447, now it is line 489.

    patching file /usr/share/pve-manager/ext4/pvemanagerlib.js
    Hunk #1 succeeded at 479 with fuzz 2 (offset 32 lines).

    1. Tyler Wagner Avatar

      Thanks for the report. As long as the patch applies cleanly, I’m not worried about the line number. That changes every release, which is why diff/patch has this feature.

  14. nobody Avatar
    nobody

    Here is a Sed one liner making backup and changes to the file:

    sed -i"_pve-manager_3.1-24" '/^[ ,\t]*if (data.status !== '\'Active\'')/s/(data.status !== '\'Active\'')/(false)/' /usr/share/pve-manager/ext4/pvemanagerlib.js

    Thanks

    1. Tyler Wagner Avatar

      Thanks for the tip. I’ve not seen the backup file argument to ‘sed -i’ before.

      I’ve added [pre] tags to your comment.

      Patch does this kind of thing better than sed. For instance, yours would change any instance of a line like this, anywhere in the file. Patch will change only the instance nearest the expected line number, using the nearby lines as a guide, and will fail safe with output if something goes wrong.

      1. Oleg Gritskov Avatar
        Oleg Gritskov

        Nice this sed “one liner” works perfect on proxmox 3.3

        sed -i"_pve-manager_orig" '/^[ ,\t]*if (data.status !== '\'Active\'')/s/(data.status !== '\'Active\'')/(false)/' /usr/share/pve-manager/ext4/pvemanagerlib.js
        1. Tyler Wagner Avatar

          Nice, thanks. Is the patch no longer applying to Proxmox 3.3? Or do you not have patch installed?

          1. Oleg Gritskov Avatar
            Oleg Gritskov

            I do not have any patches, I am using clear proxmox 3.3 and “sed one liner” by nobody just to remove nag.

          2. Oleg Gritskov Avatar
            Oleg Gritskov

            sorry, misunderstood you, patch doesn’t work because lib from 3.3 have other line numbers

            1. Tyler Wagner Avatar

              Did you test the patch, Oleg? Patch does not depend on line numbers. It will find the line by context. The patch applies to my 3.3 install just fine.

              root@host1:# patch -p0 < /root/software/proxmox/no_subscription_popup_pvemanagerlib.js-3.1.patch
              patching file /usr/share/pve-manager/ext4/pvemanagerlib.js
              Hunk #1 succeeded at 459 with fuzz 2 (offset 12 lines).
  15. […] auch gegen die Nerv-Anzeige lässt sich etwas tun. Der folgende absichtlich minimal gehaltene Patch von Tyler J. Wagner deaktiviert sie und wird wie […]

Leave a Reply

Your email address will not be published. Required fields are marked *

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