Showing posts with label Virtualization. Show all posts
Showing posts with label Virtualization. Show all posts

Jun 11, 2025

Proxmox VE : Turn Off "No Valid Subscription" Message

This "No Valid Subscription" message will be displayed on each login in Proxmox VE server. Some Hobbyist may find it annoying at times.

Disabling this message is NOT recommended for Users with valid subscriptions and on Production servers. It is only for Home Lab environment.


1. First, login via SSH to Proxmox VE server.


2. Change the working directory to :-

cd /usr/share/javascript/proxmox-widget-toolkit


3. Make a backup of the following file.

cp proxmoxlib.js proxmoxlib.js.bak


4. Search for the following block of code.


if (res === null || undefined || !res || res
     .data.status.toLowerCase() !== 'active') {
     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;



5. Modify the block of code as show below.


if (false) {
     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;



6. Proceed to save the configuration and exit.


7. Now, restart PVE service as shown below.

systemctl restart pveproxy


8. Next, login back to Proxmox VE Web UI and upon successful login, the "No Valid Subscription" message is longer displayed.








!!! HAPPY COMPUTING !!!

Nov 21, 2024

Proxmox Backup Server (PBS) : Setup No Subscription Repository

For the Proxmox Backup Server (PBS), to use it as a Community Edition. We need to setup the "No Subscriptions" repository.

This methods is only for Hobbyist, Developer and alike, not recommended for Production environment.


1. Login to PBS WebUI and select "Console", then type the following command.

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


2. Comment out the Enterprise Repository by adding a "#" sign at the front.


3. Then add the following line for the No Subscription Repository.

deb http://download.proxmox.com/debian/pbs bookworm pbs-no-subscription

* The "bookworm" is the debian release code name and may change, thus change the name accordingly.


4. Next, is to run the Update.

apt update && apt upgrade -y


5. Finally, restart the server.

reboot



!!! HAPPY COMPUTING !!!

Jul 28, 2024

Proxmox : Graphics Issues During Installation

During the installation of Proxmox VE, you may or may not encounter issues with graphics card. Some graphics card tends to run at a very high resolutions thus your existing Monitor may not able to support such high resolutions.

The solutions is to run Proxmox VE installation in "Terminal Mode" and modify the boot configurations prior to the boot-up process.


1. At the Main Menu screen, select --> Install Proxmox VE (Terminal UI) and press --> E




2. Find the following line "linux" and add "nomodeset" at the end of the line.




3. Press --> [CRTL] + [X] to continue boot.


Now your display should match your monitor's supported resolutions and the installation will continue.


!!! HAPPY COMPUTING !!!


Jul 2, 2024

Proxmox : Delete Existing HDD with Data

Sometimes we just added or swapped a faulty HDD in Proxmox, but the data that resides in that HDD is preventing Proxmox from using it.

This also happens if the HDD was previously used by another Proxmox VE server, as data inside the HDD already marked/flag with that Proxmox server.

To make use of that HDD, we need to first clear the flag.

1. Open --> Shell


2. Run the disk manager.

fdisk /dev/sda

* Assuming the device you wanted to remove the partitions is [sda].


3. It will display a list of available options, press the corresponding number (eg. Delete --> D).


4. To Save and Exit, press --> W


5. Now to remove the flags.

sgdisk --zap-all /dev/sda


6. Reboot the host server.


7. Login back Promox VE WebUI, goto --> Node --> Disk.


8. Select the HDD and click --> Wipe Disk button.


9. Then click --> Initialize GPT button.


10. Now the HDD is ready for use.



!!! HAPPY COMPUTING !!!

Jul 1, 2024

Proxmox : Let's Encrypt SSL Certificate

How to install the FREE Let's Encrypt SSL Certificate for Proxmox VE host.

Pre-requisites.
1. Ensure that your router or firewall have port forwarding to the Proxmox VE server with the following ports :-

        a) 80/tcp
        b) 443/tcp
        c) 8006/tcp

2. You also need a valid or working email account, any free email account will work. The purpose of the email is for Let's Encrypt to send you email notification for the renewal of the SSL certificate after 90 days.


Let's Get Started.

1. Login to your Proxmox server, and select the primary host/node.

2. Browse to --> System --> Certificates.

3. Click --> Add ACME Account.

4. Fill-in the required information :-

        a) Account Name: [Any valid Name will do, such as "demouser"]
        b) E-Mail: [must be a valid email address]

5. Next, click --> Add.

        a) Challenge Type: HTTP
        b) Domain: [a valid Domain name or Dynamic Domain Name]

6. Then, click --> Order Certificates Now.

7. Once all done, close all browsers.

8. Open back the browser but this time use the new domain URL with "HTTPS" protocol, and you should now be able to see the new certificates was installed and active.


!!! HAPPY COMPUTING !!!

Edit : 3-Jul-2024 : I've noticed that after installing the SSL Certificate, any new VM creation will caused the installation to failed. Unsure what is the problems, maybe VLAN issue ?

But after removing the SSL Certificate & restarted the Host server, everything seems to be working back to normal.





Jun 27, 2024

Proxmox : PCIe Passthrough

How to passthrough a PCIe or On-Board device/controller in Proxmox VE v.8.2.4.

At times you might want to passthrough certain devices or controller to a VM Guest for full access and control. This can be a GPU, RAID Controller, NIC etc. This is very useful in scenario such as testing a NAS (TrueNAS).

Pre-requisites :-

1. System CPU must support IOMMU (I/O Memory Management Unit) interrupt remapping. Usually this is called Intel VT-d or AMD-Vi or similar names. Most newer Mainboard and CPU already have such features.

2. This passthrough methods means the entire device or controller is no longer in use by Proxmox VE itself and only manage by the VM Guest. This means you cannot passthrough a controller where the "Boot-Pool" is connected. It must be a separate controller or device.


Scenario :-

My test system or home lab system is a HP Z800 WorkStation series with the following hardware configurations, if your system is newer than mine then most probably it will works too :-

  • Dual Intel Xeon X5660 2.80Ghz, 6-Cores, 12-Threads, 12MB-Cache.
  • 96GB DDR3 1333Mhz ECC RAM.
  • Intel 5520 Chipset.
  • On-board Intel Matrix 6-ports SATA/RAID Controller.
  • On-board LSI 1068E 8-ports SAS/SATA Controller.
  • LSI 9212-4i SAS/SATA 4-ports PCIe Controller.

The "LSI 9212-4i SAS/SATA 4-ports PCIe Controller" is where Proxmox VE is installed, thus I cannot passthrough this controller.


Let's Get Started :-

1. Login to the Proxmox VE's WebUI.


2. Select the Node, in this case I have only a single node.


3. Open --> Shell


4. Verify that your system have IOMMU enabled.

 dmesg | grep -e DMAR -e IOMMU -e AMD-Vi

The results should shows "DMAR: IOMMU enabled" OR "DMAR: Intel(R) Virtualization Technology for Directed I/O". If either of these is missing then you need to check your BIOS/UEFI whether those virtualization technology are enabled.


5. Edit the "Kernel" file.

nano /etc/kernel/cmdline

Add the following line to the file.

root=ZFS=rpool/ROOT/pve-1 boot=zfs intel_iommu=on

If your CPU is and AMD type, then add "amd_iommu=on" to it.


6. Next is to edit the "Modules" file.

nano /etc/modules

Add the following into the file.

vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd


7. Now we also need to edit the "GRUB" file.

nano /etc/default/grub

Look for the following line and append the line as shown.

GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"

If your CPU is and AMD type, then add "amd_iommu=on" to it.


8. Once all done, we need to refresh the "Proxmox" boot.

proxmox-boot-tool refresh


9. Update the "initfamfs" also.

update-initramfs -u -k all


10. Next is to update "GRUB" also.

update-grub


11. Finally, we need to REBOOT the Proxmox VE host server.


12. After reboot, verify the "IOMMU" configuration.

dmesg | grep -e DMAR -e IOMMU -e AMD-Vi

Results :-
DMAR: IOMMU enabled OR DMAR: Intel(R) Virtualization Technology for Directed I/O


13. Verify "vfio" configuration.

lsmod | grep vfio

Results :-
vfio_pci          49152    0
vfio_virqfd          16384    1 vfio_pci
irqbypass                  16384    2 vfio_pci,kvm
vfio_iommu_type1   32768    0
vfio                           32768    2 vfio_iommu_type1,vfio_pci


14. Verify "Interrupt Remapping" configuration.

dmesg | grep 'remapping'

Results :-
AMD-Vi: Interrupt remapping enabled OR DMAR-IR: Enabled IRQ remapping in 2xapic mode (only for older CPU model)

If you encounter an error message on the remapping interrupts, type the following command and reboot the Proxmox server again.

echo "options vfio_iommu_type1 allow_unsafe_interrupts=1" > /etc/modprobe.d/iommu_unsafe_interrupts.conf



15. Now you can create a VM and passthrough a PCIe device to that VM. Take note you need to ensure the "Machine = q35" else it will not work.

Also note that the device must not be in the same IOMMU Group, if the device is in the same group of another device then high chances it will not work or the entire group will also be passthrough to the VM.


For more information :-
!!! HAPPY COMPUTING !!!


Dec 26, 2023

TrueNAS : Create a Virtual Machine (VM)

Did you know that TrueNAS can function like a Hypervisor ? TrueNAS itself can have containerization of Virtual Machine (VM).

Although its not a full scale Hypervisor (Tier-1), sometimes we just need to temporarily test an application or operating system. So it is very useful to be able to run a VM inside TrueNAS.



!!! HAPPY COMPUTING !!!