Coder Social home page Coder Social logo

isotonik / proxmox-server-scripts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chriswayg/proxmox-server-scripts

0.0 0.0 0.0 29 KB

:x: Various scripts for configuring and administering a Proxmox (Debian) server and VMs

Home Page: https://www.proxmox.com

License: GNU General Public License v2.0

Shell 100.00%

proxmox-server-scripts's Introduction

proxmox-server-scripts

Various scripts for configuring and administering a Proxmox (Debian) server and VMs

Backup and Restore with S3QL

  • s3ql: an init script for mounting the s3ql encryped filesystem for use as a storage directory in Proxmox
  • s3ql_backup.sh: for backing up a whole Proxmox server with s3ql to Amazon S3 storage
  • s3ql_restore.sh: for restoring a whole Proxmox server with 3sql from Amazon S3 storage

Networking in KVM Guests

  • setup_network.sh: for changing static network settings in Debian guest VM after cloning

Automatically remove Proxmox “No Valid Subscription” message on upgrades

The Proxmox “No Valid Subscription” message re-appears after each Proxmox software update, even if you initially patched the pve-manager file. Since Proxmox is free software under the GPL, I do not like the connotation of the message, which makes it sound like one is using unlicenced software. If you want to use the community repository for updates and do not need commercial support, it is completely legitimate to run Proxmox this way. If you want to use the 'enterprise repository', please look into the attractive subscription options.

Check your /etc/apt/sources.list and make sure, that you are actually getting updates from the free Proxmox repository:

echo "deb http://download.proxmox.com/debian wheezy pve-no-subscription" >> /etc/apt/sources.list
  • proxmox_noreminder.sh: the script automatically removes the Proxmox 3.4 “No Valid Subscription” message on upgrades by watching the relevant directory with incron. Incron is watching the directory, as it seems to trigger more reliably than watching only the file. A few files in this directory are replaced during each upgrade, but only one needs to be patched in this edition of Proxmox. The script also patches the Proxmox Support Tab with a more friendly message.

Initially backup & patch the files manually and confirm with diff, that the changes are as expected:

cp /usr/share/pve-manager/ext4/pvemanagerlib.js /usr/share/pve-manager/ext4/pvemanagerlib.js.bak
sed -i -r -e "s/if \(data.status !== 'Active'\) \{/if (false) {/" /usr/share/pve-manager/ext4/pvemanagerlib.js 
sed -i -r -e "s/You do not have a valid subscription for this server/This server is receiving updates from the Proxmox VE No-Subscription Repository/" /usr/share/pve-manager/ext4/pvemanagerlib.js 
sed -i -r -e "s/No valid subscription/Community Edition/" /usr/share/pve-manager/ext4/pvemanagerlib.js

diff /usr/share/pve-manager/ext4/pvemanagerlib.js.bak /usr/share/pve-manager/ext4/pvemanagerlib.js

Install Incron and only allow the root user

apt-get install incron
echo "root" >> /etc/incron.allow

and copy the script:

mkdir -v /etc/incron.scripts
cp proxmox_noreminder.sh /etc/incron.scripts/proxmox_noreminder.sh
chmod +x /etc/incron.scripts/proxmox_noreminder.sh

Add the following in incrontab

incrontab -e
...
/usr/share/pve-manager/ext4/ IN_CREATE /etc/incron.scripts/proxmox_noreminder.sh $#

Test with (in another terminal):

tail -f /var/log/syslog | grep incrond
tail -n 30 -f /var/log/incron.log

Reinstalling pve-manager should trigger incron:

apt-get install --reinstall pve-manager
Note:

Since Proxmox 4.2 the relevant files have been moved from pve-manager/ext4 to pve-manager/ext6. This has not been changed in the script yet.

Disclaimer:

The above scripts & patches may have unforeseen consequences and automatic patching could harm your system. Always backup your Proxmox system before applying such changes! Proxmox may change the code at any time, making the patches useless or even counterproductive. Please make sure you understand the code before applying it to your system. Also, IANAL, and in my opinion the above Proxmox patches are permitted under the GPL, but if want to make sure, please consult a copyright lawyer in your jurisdiction. This disclaimer should not be interpreted as legal advice.


License:

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

proxmox-server-scripts's People

Contributors

chriswayg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.