Tag: proxmox

Error Starting Proxmox VM: `pve-ssl.pem` is empty

Error Starting Proxmox VM: pve-ssl.pem is empty

Got following error when starting a Proxmox VM with Spice driver.

kvm: warning: Spice: reds.c:2893:reds_init_ssl: Could not load certificates from /etc/pve/local/pve-ssl.pem
kvm: warning: Spice: error:0909006C:PEM routines:get_name:no start line
kvm: warning: Spice: error:140DC009:SSL routines:use_certificate_chain_file:PEM lib
kvm: failed to initialize spice server
TASK ERROR: start failed: QEMU exited with code 1

pve-ssl.pem size

The file size of /etc/pve/local/pve-ssl.pem is 0.

Fix

Standalone server

Regenerate following files using method stated in https://pve.proxmox.com/wiki/Proxmox_SSL_Error_Fixing

/etc/pve/pve-root-ca.pem
/etc/pve/local/pve-ssl.key
/etc/pve/local/pve-ssl.pem

Cluster node

Copy following files from other Proxmox node, normally, /etc/pve/pve-root-ca.pem files are the same.

/etc/pve/nodes/<node_name>/pve-ssl.key
/etc/pve/nodes/<node_name>/pve-ssl.pem

Note: These certificates can be used for all nodes.
Note: /etc/pve/local is a link to nodes/<node_name>

References

Proxmox SSL Error Fixing

Change Subscription of Proxmox VE to `pve-no-subscription`

Change Subscription of Proxmox VE to pve-no-subscription

In order to update PVE, server needs to be under pve-no-subscription

Error

Following error occurred if the subscription hasn't changed.

starting apt-get update
Hit:1 http://security.debian.org bullseye-security InRelease
Hit:2 http://ftp.debian.org/debian bullseye InRelease
Get:3 http://ftp.debian.org/debian bullseye-updates InRelease [39.4 kB]
Err:4 https://enterprise.proxmox.com/debian/pve bullseye InRelease
  401  Unauthorized [IP: 51.79.159.216 443]
Reading package lists...
E: Failed to fetch https://enterprise.proxmox.com/debian/pve/dists/bullseye/InRelease  401  Unauthorized [IP: 51.79.159.216 443]
E: The repository 'https://enterprise.proxmox.com/debian/pve bullseye InRelease' is not signed.
TASK ERROR: command 'apt-get update' failed: exit code 100

Fix

Got to Updates => Repositories, add No-Subscription in the list, and disable pve-enterprise subscription.

References

Package Repositories

Failed to start Corosync Cluster Engine After PVE Reboot

Failed to start Corosync Cluster Engine After PVE Reboot

Error

After reboot PVE, following error occurred.

# systemctl status pve-cluster
...
Jun 26 09:33:26 pve01 pmxcfs[3506]: [quorum] crit: quorum_initialize failed: 2
Jun 26 09:33:26 pve01 pmxcfs[3506]: [quorum] crit: can't initialize service
Jun 26 09:33:26 pve01 pmxcfs[3506]: [confdb] crit: cmap_initialize failed: 2
Jun 26 09:33:26 pve01 pmxcfs[3506]: [confdb] crit: can't initialize service
Jun 26 09:33:26 pve01 pmxcfs[3506]: [dcdb] crit: cpg_initialize failed: 2
Jun 26 09:33:26 pve01 pmxcfs[3506]: [dcdb] crit: can't initialize service
Jun 26 09:33:26 pve01 pmxcfs[3506]: [status] crit: cpg_initialize failed: 2
Jun 26 09:33:26 pve01 pmxcfs[3506]: [status] crit: can't initialize service
...
# journalctl -u corosync.service
...
Jun 26 09:26:17 pve01 corosync[1826]:   [MAIN  ] failed to parse node address 'pve01.xx.xx'
Jun 26 09:26:17 pve01 corosync[1826]:   [MAIN  ] Corosync Cluster Engine exiting with status 8 at main.c:1417.
Jun 26 09:26:17 pve01 systemd[1]: corosync.service: Main process exited, code=exited, status=8/n/a
Jun 26 09:26:17 pve01 systemd[1]: corosync.service: Failed with result 'exit-code'.
Jun 26 09:26:17 pve01 systemd[1]: Failed to start Corosync Cluster Engine.
...

Fix

Change ring0_addr pve01.xx.xx of node in pve01 corosync.conf to IP address.

References

cluster node cant sync after reboot

Change Expected Votes for Proxmox Cluster

Change Expected Votes for Proxmox Cluster

If two or more nodes down in Proxmox cluster, then user can not login to Proxmox web page. In order to login, the number of Expected votes needs to be changed.

This change is only temporary, and cannot be changed to smaller than current Total votes.

Steps

Run following command to check status

pvecm status

Run following command to change Expected votes

pvecm expected 2

Change node vote

Change quorum_votes in file /etc/pve/corosync.conf, to set different quorum vote for each node.

The vote of node can be 0, if this node is only a test node in the cluster.
The vote of node can be more than 1, if the node has more important role, such as TrueNAS running.

References

cluster quorum

Moving Proxmox VE Server to another Machine

Moving Proxmox to another Machine

The reason to move Proxmox VE server to another machine is, I got issue when booting up Proxmox installation USB disk from a MacBook Pro. So I decided to use existing Proxmox VE server USB disk boot from this MacBook Pro.

Requirement

The previous Proxmox Virtual Environment USB disk, must be an UEFI disk, because MacBook Pro is a UEFI machine.

After boot

The network configuration /etc/network/interfaces needs to be changed due to different network interface name.

First, change the interface name, which can be found using ip a command, the two lines need to be updated.

auto lo
iface lo inet loopback

iface enp0s10 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.1.205/24
        gateway 192.168.1.254
        bridge-ports enp0s10
        bridge-stp off
        bridge-fd 0

The WIFI interface can be disabled if it is not used.

#iface wlp1s0 inet manual

References

Proxmox VM migration failed – no local-zfs rpool

Proxmox VM migration failed - no local-zfs rpool

When try to migrate VM from one node to another, following error encountered

Failed to sync data - could not activate storage 'local-zfs', zfs error: cannot import 'rpool': no such pool available

The reason is two nodes have different storage pool

Solution

Change source node storage pool local-zfs as below.

  • Select Datacenter -> Storage
  • Select storage pool local-zfs, and click Edit
  • Change Nodes from All (No restrictions) to the node the stroage belongs to
  • Click OK to save the option

References

Migration of VM between nodes failed - could not activate storage 'local-zfs', zfs error: cannot imp

Add a Proxmox Node to Cluster

Add a Proxmox Node to Cluster

When using UI Web interface to add node into cluster, the following error occurred

ERROR: TFA-enabled login currently works only with a TTY. at /usr/share/perl5/PVE/APIClient/LWP.pm line 100

Solution

Use command line below to add node via Shell

pvecm add <target ip> -link0 <source ip>

If got error on key validation, try node name instead

pvecm add <target_dns_name>

References