Difference between revisions of "PVE Tips"

From Da Nerd Mage Wiki
Jump to navigation Jump to search
(Created page with "= Manually installing REAL certs = I keep copies of my certs on a local webserver that acts as a proxy to feed HTTPS connections to various local servers. This makes it fairly trivial to pull certs to various machines that need them.  Also, I'm using wildcard certs, which simplifies life. Step 1: Log into the shell as root.")
 
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
= xterm.js in place of noVNC =
So...
An issue with noVNC...
It kinda sucks for CLI-only VMs. It doesn't allow for copy-pasta.
Solution, [https://silicon.blog/2023/01/12/how-to-enable-copy-and-paste-function-on-your-proxmox-web-console-without-install-additional-software-in-your-vm/ configure the VM to use xterm.js] instead.
The grub edits in that article don't seem to work properly tho...
Instead:
<pre>GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200 earlyprintk=ttyS0,115200 consoleblank=0"
GRUB_TERMINAL="console serial"
GRUB_SERIAL_COMMAND="serial --speed=115200"</pre>
(initially from [https://www.reddit.com/r/Proxmox/comments/15dhkh7/newbie_issue_unable_to_enable_xtermjs_in_debian/ here])
For some reason, Proxmox leaves noVNC as the console in the UI window & it does weird stuff to the console window when you open it. MRIN...
[https://forum.proxmox.com/threads/support-for-xterm-js-console-by-default-for-specific-vm.114734/ FFS...]
To open the console of a VM set up this way, either click the "'''>_ Console'''" button or right-click the VM in the left pane & select "'''>_ Console'''" from the menu.
= Manually installing REAL certs =
= Manually installing REAL certs =


I keep copies of my certs on a local [[Building Web Servers{{!}}webserver]] that acts as a [[Proxy Server Notes{{!}}proxy]] to feed HTTPS connections to various local servers. This makes it fairly trivial to pull certs to various machines that need them.&nbsp; Also, I'm using wildcard certs, which simplifies life.
'''Step 1:''' Log into the servers shell as root. (either through the Web UI or SSH)
'''Step 2:''' Follow along with this list of commands (adjusting appropriately...)
* <code>cd /etc/pve/nodes/</code>
* <code>cd '''NODENAME'''</code>
* <code>cp pveproxy-ssl.key pveproxy-ssl.key.BAK</code>
* <code>cp pveproxy-ssl.pem pveproxy-ssl.pem.BAK</code>
* <code>scp '''USER@WEBSERVER''':/etc/apache2/certs/fullchain_'''YOURDOMAIN.TLD'''.crt pveproxy-ssl.pem</code>
* <code>scp '''USER@WEBSERVER''':/etc/apache2/certs/'''YOURDOMAIN.TLD'''.key pveproxy-ssl.key</code>
* <code>systemctl restart pveproxy</code>
Note: "/etc/apache2/certs" must be readable by '''USER''' & '''USER''' must also have SSH access to '''WEBSERVER'''
'''Step 3:''' Enjoy browsing to the Web UI of your server without being bitched at by your browser.
This will also work just fine with machine-specific certs.&nbsp; You'll need to adjust the filenames of your '''crt''' & '''key''' files.


(these instructions are currently based on a non-clustered server...)


I keep copies of my certs on a local webserver that acts as a proxy to feed HTTPS connections to various local servers. This makes it fairly trivial to pull certs to various machines that need them.&nbsp; Also, I'm using wildcard certs, which simplifies life.
= Convert a physical computer to a proxmox VM =


* [https://pve.proxmox.com/wiki/Advanced_Migration_Techniques_to_Proxmox_VE From the Proxmox documentation]
* [https://forum.proxmox.com/threads/convert-physical-computer-to-proxmox.124490/ From the Proxmox forums]


= Want a GUI on the console screen? =


Step 1: Log into the shell as root.
* <code>apt update</code>
* <code>apt upgrade</code>
* <code>apt install task-cinnamon-desktop</code>

Latest revision as of 09:29, 8 August 2024

xterm.js in place of noVNC

So...

An issue with noVNC...

It kinda sucks for CLI-only VMs. It doesn't allow for copy-pasta.

Solution, configure the VM to use xterm.js instead.

The grub edits in that article don't seem to work properly tho...

Instead:

GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200 earlyprintk=ttyS0,115200 consoleblank=0"
GRUB_TERMINAL="console serial"
GRUB_SERIAL_COMMAND="serial --speed=115200"

(initially from here)

For some reason, Proxmox leaves noVNC as the console in the UI window & it does weird stuff to the console window when you open it. MRIN...

FFS...

To open the console of a VM set up this way, either click the ">_ Console" button or right-click the VM in the left pane & select ">_ Console" from the menu.

Manually installing REAL certs

I keep copies of my certs on a local webserver that acts as a proxy to feed HTTPS connections to various local servers. This makes it fairly trivial to pull certs to various machines that need them.  Also, I'm using wildcard certs, which simplifies life.

Step 1: Log into the servers shell as root. (either through the Web UI or SSH)

Step 2: Follow along with this list of commands (adjusting appropriately...)

  • cd /etc/pve/nodes/
  • cd NODENAME
  • cp pveproxy-ssl.key pveproxy-ssl.key.BAK
  • cp pveproxy-ssl.pem pveproxy-ssl.pem.BAK
  • scp USER@WEBSERVER:/etc/apache2/certs/fullchain_YOURDOMAIN.TLD.crt pveproxy-ssl.pem
  • scp USER@WEBSERVER:/etc/apache2/certs/YOURDOMAIN.TLD.key pveproxy-ssl.key
  • systemctl restart pveproxy

Note: "/etc/apache2/certs" must be readable by USER & USER must also have SSH access to WEBSERVER

Step 3: Enjoy browsing to the Web UI of your server without being bitched at by your browser.

This will also work just fine with machine-specific certs.  You'll need to adjust the filenames of your crt & key files.

(these instructions are currently based on a non-clustered server...)

Convert a physical computer to a proxmox VM

Want a GUI on the console screen?

  • apt update
  • apt upgrade
  • apt install task-cinnamon-desktop