Table of Contents
Proxmox - Install Proxmox
Objective
To have at least 2 disks:
- Disk1. Proxmox to be installed on one physical hard drive.
- Disk2. For Virtual Machines.
Download Proxmox
- Navigate to https://www.proxmox.com/en/downloads and download the ISO for the Proxmox Virtual Environment.
- Write the ISO to a USB stick.
Install Proxmox
Login to Proxmox
Using a web-browser on a separate PC, navigate to the IP Address used for Proxmox with :8006 as the port.
Login.
NOTE: The username is root.
displays:
Remove Subscription Message
- ssh to the proxmox server.
ssh root@192.168.1.95
- Change directory:
cd /usr/share/javascript/proxmox-widget-toolkit/
- Create a backup of you proxmoxlib.js:
cp proxmoxlib.js proxmoxlib.js.bak
- Edit proxmoxlib.js:
vi proxmoxlib.js
- Search for:
Ext.Msg.show({ title: gettext('No valid subscription'),
- Replace with:
void({ title: gettext('No valid subscription'),
- Restart preproxy service:
systemctl restart pveproxy.service
- Check it is working:
grep -n -B 1 'No valid sub' proxmoxlib.js
NOTE: After this clear the browser cache and restart the browser.
Another way to remove the subscription issue:
sed -i.bak "s/me.updateActive(data)/me.updateCommunity(data)/g" /usr/share/pve-manager/js/pvemanagerlib.js
Disable the Subscription Repo
Proxmox, by default, updates from a subscription-based repo.
Change this to a free, Community supported repo:
cd /etc/apt/sources.list.d cp pve-enterprise.list pve-enterprise.list.bak vi pve-enterprise.list
Comment out the line by placing a hash in front.
- /etc/apt/sources.list.d/pve-enterprise.list
#deb https://enterprise.proxmox.com/debian/pve buster pve-enterprise
Setup Community Subscription Repo
Configure the Free Community Repository.
vi /etc/apt/sources.list
and populate as:
- /etc/apt/sources.list
deb http://ftp.debian.org/debian buster main contrib deb http://ftp.debian.org/debian buster-updates main contrib # PVE pve-no-subscription repository provided by proxmox.com, # NOT recommended for production use deb http://download.proxmox.com/debian/pve buster pve-no-subscription # security updates deb http://security.debian.org/debian-security buster/updates main contrib
Fix ZFS module not loading
/sbin/modprobe zfs
Update the system
apt update
Distro upgrade
apt dist-upgrade
Setup a Dark Theme
Github Repo for this Project: https://github.com/Weilbyte/PVEDiscordDark
Download the Python Script & Run
wget https://raw.githubusercontent.com/Weilbyte/PVEDiscordDark/master/PVEDiscordDark.py python3 PVEDiscordDark.py
Update System Locals
Occasionally the Proxmox install does not configure the locales correctly.
Check the locals
pveversion
returns:
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_US.UTF-8", LC_ALL = (unset), LC_ADDRESS = "en_GB.UTF-8", LC_NAME = "en_GB.UTF-8", LC_MONETARY = "en_GB.UTF-8", LC_PAPER = "en_GB.UTF-8", LC_IDENTIFICATION = "en_GB.UTF-8", LC_TELEPHONE = "en_GB.UTF-8", LC_MEASUREMENT = "en_GB.UTF-8", LC_TIME = "en_GB.UTF-8", LC_NUMERIC = "en_GB.UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to a fallback locale ("en_US.UTF-8"). pve-manager/6.4-8/185e14db (running kernel: 5.4.106-1-pve)
NOTE: If only the last line in this return is shown, then the locale settings are fine.
Otherwise some warning messages will be seen; and they will need fixing.
Fix the locale settings
export LANGUAGE=en_GB.UTF-8 export LC_ALL=en_GB.UTF-8
NOTE: Do not worry if a warning is seen:
-bash: warning: setlocale: LC_ALL: cannot change locale (en_GB.UTF-8)
Continue fixing…
locale-gen en_GB.UTF-8
returns:
Generating locales (this might take a while)... en_US.UTF-8... done Generation complete.
NOTE: Even though en_GB is wanted, this last return message still shows en_US.
Continue fixing…
dpkg-reconfigure locales
- Select only the en_GB.UTF-8 option, by pressing the space bar to mark it.
- Remove the check from other options, specifically the en_US.UTF-8 option.
- Click OK.
- On the next screen, select the en_GB.UTF-8 option.
- Click OK.
NOTE: This should successfully generate the en_GB-UTF-8 locales.
Test the locale is working
pveversion
returns:
pve-manager/6.4-8/185e14db (running kernel: 5.4.106-1-pve)
NOTE: Only a single line should be returned.
Initialize a Physical Hard Disk for Creating Virtual Machines
- Navigate to Datacenter → pve.
- Expand the Disks menu.
- Click the LVM menu.
- Click on Create: Volume Group.
- Disk: Select the hard drive that you want to use to dedicate to virtual machines.
- Name: VM1. Enter a suitable name.
- Add Storage: Checked.
- Click the Create button.
- This should show Done!.
NOTE: If an error is received about No Disks Unused:
- SSH into the Proxmox server.
- Assuming the disk is /dev/sdb
- fdisk /dev/sdb
- Delete the partitions.
- Command (m for help): d
- repeat the d for as many partitions are on the disk.
- Write the changes
- Command (m for help): w
If the disk had an old LVM partition on it and shows /dev/mapper when running lsblk -f, then try these:
wipefs -a -f /dev/sdc partprobe /dev/sdc pvesm scan
- gdisk /dev/sdc
- then x for extra commands.
- then z for zap.
sgdisk --zap-all /dev/sdc
A reboot might be needed of Proxmox to show the fresh results.
NOTE: ZFS could be used instead of LVM.
ZFS usually requires more disks to really take advantage of it, and is not easy to add additional disks, so if there is less than 4 drives just for the VMs then probably not ideal to use ZFS.
Initializing a physical hard disk for uploading operating system ISO images (Optional)
NOTE: If you only have one unused drive, skip this step and upload your operating system ISOs to the installation drive by navigating to Datacenter → pve → local (pve) → Content → Upload.
One approach is to change the view to the Folder View, and select the local (pve).
- Click on ISO Images.
- Click Upload.
- Select the ISO image to upload.
- Navigate to Datacenter → pve.
- Select the Disks menu.
- Select the Directory menu.
- Click on Create: Directory.
- Disk: Select the hard drive that you want to use to hold any ISO images.
- Filesystem: ext4.
- Name: ISO1. Enter a suitable name.
- Add Storage: Checked.
- Click the Create button.
- This should show Done!.
NOTE: The ISO storage entry should appear in the main Proxmox menu on the left.
ISO images can be uploaded to this drive by clicking on this storage entry with the name you just created, then going to Content, and then pressing Upload.