How to Fix “Cluster Not Ready – No Quorum?” in Proxmox

Purpose

This document will delineate the steps necessary to work around a situation where your Proxmox cluster will not allow you to interact with it due to lack of quorum between the hosts.

Assumptions

This document assumes that the nodes in the cluster are all online with proper certificates, network connectivity, and that the administrator intents to properly resolve the quorum issue following these steps.

This guide is not intended to be a permanent solution, but rather a work-around.

Cause

This occurs when the cluster quorum is not configured correctly –or– when a cluster member is offline. The intended function of the cluster is to not work if the quorum does not receive the adequate number of votes from the cluster to begin. You can manually set the number of expected quorum.

Step 1 – Override expected number of quorum votes

You can manually set the number of expected quorum votes by running this command:

pvecm expected #

where # is the number of votes you wish to make the quorum use to determine if the cluster is quorate.

Only manually override this if the node that is offline is about to be deleted from the cluster.

Following use of this command, the cluster should achieve quorum and allow you to interact with it. It is recommended that you remove the problem node from the cluster following the procedure.


Additional Information

https://pve.proxmox.com/wiki/Cluster_Manager

https://forum.proxmox.com/threads/cluster-and-quorum.7786/

https://www.jm.technology/post/proxmox_quorum_april_2019/

Proxmox Node Cannot Update Packages via apt-get

A brief how-to-fix for Proxmox community edition environments where nodes will not update packages successfully using apt-get.

Problem

A virtualization host/node running Proxmox (whether clustered or not) will fail to update packages via apt-get and produce the below error messages in the task queue:

Environment

Proxmox Virtualization Environment (confirmed for versions 6.2 and newer) running the free/community editions without and enterprise subscription.

Cause

The cause of this issue results from not having a Proxmox Enterprise subscription/license. These errors are caused by apt-get attempting to procure updates from the subscription enterprise proxmox repository, but because the node or cluster does not have a valid enterprise subscription, the update fails and produces an error.

Solution

Access the shell for the node/virtualization host producing the error and run the following command:

cp /etc/apt/sources.list.d/pve-enterprise.list /etc/apt/sources.list.d/pve-enterprise.list.backup && echo -e "#$(cat /etc/apt/sources.list.d/pve-enterprise.list)" > /etc/apt/sources.list.d/pve-enterprise.list

This command copies the repository sources list, renames the original as a backup so the system does not use it, then comments out the line of the list for the enterprise repository.

Once this command runs successfully, you should be able to either (a) wait for the scheduled updates to try to run again or (b) manually search for and install updates using apt-get update/upgrade. Either way, no errors should be produced.


Additional Reading

https://dannyda.com/2020/06/19/how-to-fix-proxmox-pve6-1-26-1-7-update-failedfailed-to-fetch-401-unauthorized-task-error-command-apt-get-update-failed-exit-code-100/

Installing Ubiquiti UniFi Controller on Linux Debian 10

Prerequisites

If you’re installing on Linux, be sure you have the following ahead of time:

  • A current Debian or Ubuntu OS with root access – The steps will use Debian 10
  • An account for unifi.ui.com

And that’s it. Everything else will be handled during the install process.

Installing the Controller

To get the controller installed on Linux you have many options. Ubiquiti has some instructions on how to install the controller on their website but it only covers the install for a couple of specific versions of Linux. To use Debian, use the script that has been posted on the Unifi forums by member AmazedMender16.

To start the install, first ssh into the Debian server or access the server from the console. Log in either as root or as another user that has root access and then run su.

Update the apt repos.

apt-get update

Next, install the ca-certificates and wget packages.

apt-get update && apt-get install ca-certificates wget -y

Download and run the Unifi Controller installer script. This script will handle the install of the dependencies and controller software for many different distros of Linux including the Debian 10 server we are using.

wget https://get.glennr.nl/unifi/install/install_latest/unifi-latest.sh1 bash unifi-latest.sh

You will be prompted for a few things while the script runs. First, it will ask if you want to keep the script downloaded after the install. In most cases this is not required, so you should enter n and then press enter.

Ensuring the Unifi controller software is kept up to date

You may receive a prompt to update packages during the install. Enter y and then press enter.

Confirming it’s OK to update packages

Finally, you will be prompted to add the apt repo for Unifi to update the controller from apt. Enter y and press enter as this will make upgrades serviceable through apt.

Adding the Unifi Network Controller repo to apt

Once the install completes, the script will output the version of the controller installed and the URL to use to start configuring the controller.

Configuring the Controller

Once you have the controller software installed on whatever server you are using the setting will be the same.

Go to the web address https://<ServerIP&gt;:8443/ and you will be presented with the controller’s web portal.

Using PowerShell to Add a Network Printer for All Users of a Computer

Purpose

This brief article details the commands necessary to use PowerShell to add/install/map a network printer for all users of a computer.

Prerequisites

The below actions require the executing user to have administrative rights to the workstation in question.

Solution

Establish a Remote PowerShell session

In an elevated PowerShell session (running as administrator), run the following command;

Enter-PsSession -ComputerName HOSTNAME.FQDN

where HOSTNAME.FQDN is the fully-qualified domain name of the workstation in question.

Example: desktop01.yourdomain.com

You can actually execute this process using the short name of the computer instead of the FQDN.

Remove the network printer for all users

Once you’ve entered the remote PowerShell session successfully, run the following commands in sequence;

RUNDLL32 PRINTUI.DLL,PrintUIEntry /ga /n\\PRINTSERVER\Shared-printer

where PRINTSERVER is the NETBIOS name of your print server from which the printer is shared and Shared-printer is the shared name of the printer you’d like to add/install/map.

When this is complete, the network printer should be uninstalled/removed for all users on that workstation. This can be verified by having users logon and check their Devices and Printers window.

Using PowerShell to Remove a Network Printer for All Users of a Computer

Purpose

This brief article details the commands necessary to use PowerShell to remove a network printer for all users of a computer.

Prerequisites

The below actions require the executing user to be an administrator of the remote workstation, or a Domain Administrator.

Solution

Establish a Remote PowerShell session

In an elevated PowerShell session (running as administrator), run the following command;

Enter-PsSession -ComputerName HOSTNAME.FQDN

where HOSTNAME.FQDN is the fully-qualified domain name of the workstation in question.

Example: desktop01.yourdomain.com

You can actually perform these commands without using the FQDN, and using the short name instead.

Remove the network printer for all users

Once you’ve entered the remote PowerShell session successfully, run the following commands in sequence;

Get-WmiObject -Class Win32_Printer | where{$_.Name -eq ‘\\PRINTSERVER\Shared-printer‘}

where PRINTSERVER is the NETBIOS name of your print server from which the printer is shared and Shared-printer is the shared name of the printer you’d like to remove. This command will return the printer that you’d like to remove, if it is installed for the user running the command. Even if the user running the command does not have this printer installed, this process will still work as intended.

Get-WmiObject -Class Win32_Printer | where{$_.Name -eq ‘\\PRINTSERVER\Shared-printer‘}| foreach{$_.delete()}

again, where PRINTSERVER is the NETBIOS name of your print server from which the printer is shared and Shared-printer is the shared name of the printer you’d like to remove.

When this is complete, the network printer should be uninstalled/removed for all users on that workstation. This can be verified by having users logon and check their Devices and Printers window.