Proxmox Post-Install
Here are the scripts used in this video:
Proxmox Helper Script:
Run this script on your Proxmox Instance using the terminal:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/post-pve-install.sh)"
Running the Proxmox Post-Install Script Manually
If you would like to run these manually instead of using the helper script, follow the instructions below/.
Modify Proxmox Repository Configuration
First, log in to your Proxmox server using SSH. Open a terminal and connect using:
ssh root@Your-Proxmox-IP-Address
Example:
ssh root@10.10.10.61
Navigate to the repository configuration directory:
cd /etc/apt/sources.list.d/
Disable the Proxmox PVE Enterprise Repository
Edit the enterprise repository file:
nano pve-enterprise.sources
Add the following line at the end of the file:
Enabled: false
Te file should look like this:
Types: deb
URIs: https://enterprise.proxmox.com/debian/pve
Suites: trixie
Components: pve-enterprise
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
Enabled: false
Re-enable the repository, simply remove the Enabled: false line
Disable the Ceph Enterprise Repository
Edit the Ceph repository file:
nano ceph.sources
Add Enabled: false:
It should look like this:
Types: deb
URIs: https://enterprise.proxmox.com/debian/ceph-squid
Suites: trixie
Components: enterprise
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
Enabled: false
To re-enable it, remove the Enabled: false line:
Enable the Ceph No-Subscription Repository (Optional)
You can use the no-subscription Ceph repository instead:
Types: deb
URIs: http://download.proxmox.com/debian/ceph-squid
Suites: trixie
Components: no-subscription
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
Add the Proxmox No-Subscription Repository
Create a new repository file:
touch proxmox.sources
nano proxmox.sources
Paste the following content:
Types: deb
URIs: http://download.proxmox.com/debian/pve
Suites: trixie
Components: pve-no-subscription
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
Updating Proxmox
The helper script usually prompts you to update the system automatically. If not, you can manually update after configuring repositories:
apt update && apt dist-upgrade -y
Removing the Subscription Nag Message
This step is optional but commonly requested.
Navigate to the Proxmox JavaScript directory:
cd /usr/share/javascript/proxmox-widget-toolkit
Create a backup of the file before editing:
cp proxmoxlib.js proxmoxlib.js.bak
edit the file:
nano proxmoxlib.js
Press CTRL + W, search for:
No valid subscription
Locate the following block:
checked_command: function (orig_cmd) {
Proxmox.Utils.API2Request({
url: '/nodes/localhost/subscription',
method: 'GET',
failure: function (response, opts) {
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
},
success: function (response, opts) {
let res = response.result;
if (
res === null ||
res === undefined ||
!res ||
res.data.status.toLowerCase() == 'NoMoreNagging'
) {
Ext.Msg.show({
title: gettext('No valid subscription'),
icon: Ext.Msg.WARNING,
message: Proxmox.Utils.getNoSubKeyHtml(res.data.url),
buttons: Ext.Msg.OK,
callback: function (btn) {
if (btn !== 'ok') {
return;
}
orig_cmd();
},
});
} else {
orig_cmd();
}
},
});
},
Replace it with:
checked_command: function (orig_cmd) {
orig_cmd();
},
Restart the Proxmox web service:
systemctl restart pveproxy
This removes the subscription warning banner.
Turning Cluster Features off
You can turn off the Cluster Features with the following commands:
systemctl stop pve-ha-lrm
systemctl disable pve-ha-lrm
systemctl stop pve-ha-crm
systemctl disable pve-ha-crm
To turn it back on using the following commands:
systemctl enable pve-ha-lrm systemctl start pve-ha-lrm systemctl enable pve-ha-crm systemctl start pve-ha-crm
Turn off Corosync
Use the following command:
systemctl stop corosync
systemctl disable corosync
To turn it back on use the following commands:
systemctl enable corosync
systemctl start corosync
Modify the Default Storage Partitions
By default, Proxmox will format your storage into a Local Volume and a Local-LVM Volume. The Local Volume is able to store ISO Files, Backup Files and Container Templates but not Virtual Machine disk files for either VMs or Contains and the Local-LVM Storage can store Virtual Machine Disk but not ISO Files, Backup Files and Container Templates.
So what we can do is remove the Local-LVM partition and add that space to the Local Partition:
Back in my command line, I will enter the command:
root@pm1:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data pve twi-a-tz-- 17.71g 0.00 1.58
root pve -wi-ao---- <25.03g
swap pve -wi-ao---- <7.38g
We can see that my data partition is 17.71g and my root partition is 25.05g. SO we can remove the data partition with the following command:
root@pm1:~# lvremove /dev/pve/data
Do you really want to remove active logical volume pve/data? [y/n]: y
Logical volume "data" successfully removed.
Then we'll do another lvs
root@pm1:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root pve -wi-ao---- <25.03g
swap pve -wi-ao---- <7.38g
We can see that the data partition is now gone. So next, we'll extend the root partition to take up the space that the data partition left back. Then we'll do a lvs command to confirm that the root partition indeed took up the remaining space.
root@pm1:~# lvextend -l +100%FREE /dev/pve/root
Size of logical volume pve/root changed from <25.03 GiB (6407 extents) to 52.12 GiB (13343 extents).
Logical volume pve/root successfully resized.
root@pm1:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root pve -wi-ao---- 52.12g
swap pve -wi-ao---- <7.38g
Configuration
Verify CPU Virtualization Support
lscpu | egrep "Virtualization|Vendor
You should see one of the following:
- VT-x --> Intel
- AMD-V --> AMD
Intel CPU Configuration
echo "options kvm-intel nested=Y" > /etc/modprobe.d/kvm-intel.conf
modprobe -r kvm_intel
modprobe kvm_intel
Verify it worked:
cat /sys/module/kvm_intel/parameters/nested
AMD CPU Configuration
echo "options kvm-amd nested=1" > /etc/modprobe.d/kvm-amd.conf
modprobe -r kvm_amd
modprobe kvm_amd
Verify
cat /sys/module/kvm_amd/parameters/nested