Removing the Proxmox 3.1 subscription nag dialog

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.

Tags:

  1. brian’s avatar

    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!

    Reply

  2. Jean-Marc’s avatar

    Hi !

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

    Reply

    1. Tyler Wagner’s 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

      Reply

      1. Odd Stråbø’s 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!

        Reply

      2. Christophe Nouvel’s avatar

        Thanks,

        Manually applied.

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

        Christophe.

        Reply

      3. Andrew Wyatt’s avatar

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

        Reply

        1. Tyler Wagner’s 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.

          Reply

        2. Andrew Wyatt’s avatar

          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. :)

          Reply

          1. Luca’s avatar

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

            Reply

          2. Ted Chen’s avatar

            Thanks for posting the patch.

            Reply

          3. nour’s avatar

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

            Reply

            1. Tyler Wagner’s 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.

              Reply

            2. GOZALO MARQUEZ BENITEZ’s 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

              Reply

              1. Tyler Wagner’s 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?

                Reply

              2. Tim B’s avatar

                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.

                Reply

              3. ison’s avatar

                thanks is working now

                Reply

              4. James’s 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.

                Reply

              5. Methil’s avatar

                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).

                Reply

                1. Tyler Wagner’s 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.

                  Reply

                2. nobody’s avatar

                  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

                  Reply

                  1. Tyler Wagner’s 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.

                    Reply

                    1. Oleg Gritskov’s avatar

                      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

                      Reply

                      1. Tyler Wagner’s avatar

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

                        Reply

                        1. Oleg Gritskov’s avatar

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

                          Reply

                        2. Oleg Gritskov’s avatar

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

                          Reply

                          1. Tyler Wagner’s 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).

                            Reply

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.