update guides
BIN
guides/Kodi/kodi1.png
Normal file
After Width: | Height: | Size: 108 KiB |
BIN
guides/Kodi/kodi2.png
Normal file
After Width: | Height: | Size: 96 KiB |
BIN
guides/Kodi/kodi3.png
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
guides/Kodi/kodi4.jpeg
Normal file
After Width: | Height: | Size: 87 KiB |
85
guides/Kodi_LXC.md
Normal file
@ -0,0 +1,85 @@
|
||||
---
|
||||
title: "Install Kodi in an LXC and Connect it to a Monitor/TV Using GPU Acceleration"
|
||||
description: "Learn how to install Kodi in an LXC container on Proxmox, utilize GPU acceleration, and connect it to your TV, turning your Proxmox server into an all-in-one media center."
|
||||
---
|
||||
|
||||
# Install Kodi in an LXC and Connect it to a Monitor/TV Using GPU Acceleration
|
||||
|
||||
In this guide, we'll see how we can easily install Kodi in an LXC container using our Proxmox resources and connect it to our television using GPU acceleration, turning our Proxmox server into an all-in-one server.
|
||||
|
||||
We'll use the script created by user [mrrudy](https://github.com/mrrudy).
|
||||
|
||||
To be able to use a keyboard, mouse, or any USB controller after installation, we must install the container with privileges.
|
||||
|
||||
```bash
|
||||
bash -c "$(wget -qLO - https://raw.githubusercontent.com/mrrudy/proxmoxHelper/main/ct/kodi-v1.sh)"
|
||||
```
|
||||
|
||||
Be patient, it takes time to install.
|
||||
Access to tty7 means we can now connect our monitor or TV.
|
||||
|
||||
### Keyboard, Mouse, or USB Controller
|
||||
|
||||
The keyboard, mouse, or USB controllers are /dev/input devices. To add them to the LXC, we need to know their code:
|
||||
|
||||
```bash
|
||||
ls -l /dev/input
|
||||
```
|
||||
|
||||

|
||||
|
||||
In my case, the code is 13.
|
||||
|
||||
We add to our LXC configuration:
|
||||
For example, 102 is the id of my Kodi container
|
||||
|
||||
```bash
|
||||
nano /etc/pve/lxc/102.conf
|
||||
```
|
||||
|
||||
Add these lines:
|
||||
|
||||
```
|
||||
lxc.cgroup2.devices.allow = c 13:* rwm
|
||||
lxc.mount.entry: /dev/input dev/input none bind,optional,create=dir
|
||||
```
|
||||
|
||||

|
||||
|
||||
When we're done, we restart Proxmox:
|
||||
|
||||
```bash
|
||||
reboot
|
||||
```
|
||||
|
||||
### Updating Kodi
|
||||
|
||||
Inside the container's console:
|
||||
|
||||
```bash
|
||||
sudo add-apt-repository ppa:team-xbmc/ppa
|
||||
```
|
||||
|
||||
```bash
|
||||
sudo apt install kodi kodi-bin
|
||||
```
|
||||
|
||||
When it's finished, we restart, and when it boots up, we'll have Kodi updated.
|
||||
|
||||
### Images
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
We can learn more about configuring an LXC with Intel GPU on [Konpat's blog](https://blog.konpat.me/dev/2019/03/11/setting-up-lxc-for-intel-gpu-proxmox.html).
|
||||
|
||||
## Support the Author
|
||||
|
||||
<div style="display: flex; justify-content: center; align-items: center;">
|
||||
<a href="https://ko-fi.com/G2G313ECAN" target="_blank" style="display: flex; align-items: center; text-decoration: none;">
|
||||
<img src="https://raw.githubusercontent.com/MacRimi/HWEncoderX/main/images/kofi.png" alt="Support me on Ko-fi" style="width:175px; margin-right:65px;"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
If you found this tutorial helpful and useful, you can buy me a Ko-fi! Thank you! 😊
|
112
guides/backup_cloud.md
Normal file
@ -0,0 +1,112 @@
|
||||
---
|
||||
title: "Proxmox Backup Cloud"
|
||||
description: "Set up a simple backup service in Proxmox VE using your personal cloud storage provider (Google Drive, Mega, Dropbox, OneDrive, etc.) as an additional datastore, using rclone for secure backups without scripts."
|
||||
---
|
||||
|
||||
# Proxmox Backup Cloud
|
||||
|
||||
In this tutorial, we'll set up a simple backup service in our personal cloud storage provider (Google Drive, Mega, Dropbox, OneDrive, etc.), adding it as an additional datastore using rclone. We'll store our backups securely without using any scripts.
|
||||
|
||||
## Preparation:
|
||||
|
||||
Connect to Proxmox via your preferred SSH client or from Proxmox's own Shell. Create a new directory in the /mnt folder. You can name it whatever helps you identify it; for example, if you're using Google Drive, you might call it gdrive. Here's how to do it:
|
||||
|
||||
```bash
|
||||
mkdir /mnt/gdrive
|
||||
```
|
||||
|
||||
Now let's add this directory to our datastore.
|
||||
|
||||
We'll do it like this:
|
||||
|
||||

|
||||
|
||||
Next, we specify the name gdrive, the directory we created, and for content, we choose VZDump File.
|
||||
|
||||

|
||||
|
||||
Click on Add, and as we can see, it adds the new directory to our datastore.
|
||||
|
||||

|
||||
|
||||
## Using rclone for cloud mounting:
|
||||
|
||||
Although the directory called gdrive is in our datastore, it's obviously not yet mounted in the cloud. For this, we'll use [rclone](https://rclone.org).
|
||||
|
||||
One detail to keep in mind is that rclone has changed the way it authorizes the [service that links to our cloud](https://rclone.org/remote_setup/). To do this, we need to connect via our SSH client and run the following code, changing the user to your Proxmox user (which is likely root if you haven't changed it) and the corresponding Proxmox IP address:
|
||||
|
||||
```bash
|
||||
ssh -L localhost:53682:localhost:53682 root@ip_proxmox
|
||||
```
|
||||
|
||||
Now let's install rclone:
|
||||
|
||||
```bash
|
||||
apt-get update
|
||||
apt-get install rclone
|
||||
```
|
||||
|
||||
Follow the steps. You can use the rclone [guide](https://rclone.org/docs/) for your cloud provider.
|
||||
|
||||
Important: When we reach this point, we'll say "y". It will give us a localhost-type address that we can open and authorize when creating the link with Proxmox.
|
||||
|
||||
```
|
||||
Use web browser to automatically authenticate rclone with remote?
|
||||
* Say Y if the machine running rclone has a web browser you can use
|
||||
* Say N if running rclone on a (remote) machine without web browser access
|
||||
If not sure try Y. If Y failed, try N.
|
||||
y) Yes
|
||||
n) No
|
||||
y/n> y
|
||||
```
|
||||
|
||||
Once we have rclone configured, we just need to mount it. We can create a folder in our personal cloud called PBC.
|
||||
|
||||
To mount rclone in Proxmox and link it to that folder, we'll do it like this:
|
||||
|
||||
```bash
|
||||
rclone mount gdrive:/PBC /mnt/gdrive --allow-other --allow-non-empty
|
||||
```
|
||||
|
||||
- gdrive:/PBC is the folder in our cloud.
|
||||
- /mnt/gdrive is the Proxmox directory we added to our datastore.
|
||||
|
||||
## Automating rclone mounting
|
||||
|
||||
If we want rclone to start on each Proxmox boot, we can use a crontab to do it. Here's how:
|
||||
|
||||
```bash
|
||||
crontab -e
|
||||
```
|
||||
|
||||
Next, it will ask us which type of editor we want to use to edit the file. I indicate option 1, which corresponds to Nano, as it's the console editor that seems simplest and most intuitive to use.
|
||||
Once inside the editor, we just need to add this line as shown in the image:
|
||||
|
||||
```
|
||||
@reboot rclone mount gdrive:/PBC /mnt/gdrive --allow-other --allow-non-empty
|
||||
```
|
||||
|
||||

|
||||
|
||||
To finish, press the key combination control + X
|
||||
Indicate "Y" + enter, and with this, we now have rclone mounted in our Proxmox with automatic startup and linked to our cloud.
|
||||
|
||||
Now we just need to check if we make a backup and select our gdrive as the destination disk.
|
||||
|
||||

|
||||
|
||||
We'll verify that when the backup is finished, it will be exactly where we wanted it, in our cloud.
|
||||
|
||||

|
||||
|
||||
## Things to keep in mind
|
||||
|
||||
The backups that Proxmox makes, unlike Proxmox Backup Server, are not incremental. Therefore, depending on the space we have in our cloud, the number of copies we make, and their size, we could run out of space quickly.
|
||||
To avoid this, we can add a copy purge system based on the parameters we want.
|
||||
For example, we can keep only the last 5 copies as shown in the image.
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
If you found this tutorial helpful and useful, you can buy me a Ko-fi! Thank you! 😊
|
BIN
guides/backup_cloud/imagen1.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
guides/backup_cloud/imagen2.png
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
guides/backup_cloud/imagen3.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
guides/backup_cloud/imagen4.png
Normal file
After Width: | Height: | Size: 104 KiB |
BIN
guides/backup_cloud/imagen5.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
guides/backup_cloud/imagen6.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
guides/backup_cloud/imagen7.png
Normal file
After Width: | Height: | Size: 34 KiB |
@ -1,12 +0,0 @@
|
||||
# Ejemplo de Guía Adicional
|
||||
|
||||
Este es el contenido de la guía de ejemplo. Aquí puedes escribir el contenido de tu guía utilizando Markdown.
|
||||
|
||||
## Sección 1
|
||||
|
||||
Contenido de la sección 1...
|
||||
|
||||
## Sección 2
|
||||
|
||||
Contenido de la sección 2...
|
||||
|
159
guides/lxc_samba.md
Normal file
@ -0,0 +1,159 @@
|
||||
---
|
||||
title: "How to Add a Hard Drive or USB Memory to an LXC for Use and Network Sharing"
|
||||
description: "Learn how to add a USB hard drive to an LXC in Proxmox, set up Samba for network sharing, and utilize the added storage for various purposes."
|
||||
---
|
||||
|
||||
# How to Add a Hard Drive or USB Memory to an LXC for Use and Network Sharing
|
||||
|
||||
Sometimes, it can be useful to add a hard drive or USB memory to our Proxmox setup, especially if we have a mini PC with limited expansion possibilities.
|
||||
|
||||
We'll see how to add a USB hard drive to an LXC where we'll use it and also share its content via Samba.
|
||||
|
||||
#### Note: The LXC must have privileges for us to add the disk.
|
||||
|
||||
There can be various uses, such as:
|
||||
- Hosting Torrent files and making them available on the network
|
||||
- Using it with our media server
|
||||
- Using it to host documents that are auto-scanned with Paperless
|
||||
- And many more...
|
||||
|
||||
We will:
|
||||
1. Add the USB disk to the LXC
|
||||
2. Install Samba
|
||||
3. Configure the disk sharing
|
||||
|
||||
## 1. Adding USB disk to our LXC
|
||||
|
||||
### 1.1 Identify the USB disk or memory
|
||||
|
||||
To do this, it's as simple as looking at the disk section we have on our server before and after connecting the USB disk.
|
||||
|
||||
Before adding our disk:
|
||||
|
||||

|
||||
|
||||
After adding our USB disk:
|
||||
|
||||

|
||||
|
||||
### 1.2 Format the disk
|
||||
|
||||
For us to use it, we have to format it in a compatible file system, for example ext4 in the case of a hard drive. We do this from the Proxmox console:
|
||||
|
||||
```bash
|
||||
mkfs.ext4 /dev/sdb1
|
||||
```
|
||||
|
||||
### 1.3 Create the mount directory in the LXC
|
||||
|
||||
We can name the directory whatever we want:
|
||||
|
||||
```bash
|
||||
mkdir /mnt/lxc_USB
|
||||
```
|
||||
|
||||
### 1.4 Create a mount point in our LXC
|
||||
|
||||
To do this, we go to the Proxmox console (not in the LXC), and edit the LXC's configuration file. Change the id (100) to the corresponding one for your LXC:
|
||||
|
||||
```bash
|
||||
nano /etc/pve/lxc/100.conf
|
||||
```
|
||||
|
||||
Add this line to the file:
|
||||
|
||||
```
|
||||
mp0: /dev/sdb1,mp=/mnt/lxc_USB,backup=0
|
||||
```
|
||||
|
||||
### 1.5 Start the LXC and set permissions
|
||||
|
||||
Start the LXC, log in, and give permissions to the mount directory:
|
||||
|
||||
```bash
|
||||
chmod -R 777 /mnt/lxc_USB
|
||||
```
|
||||
|
||||
## 2. Install Samba
|
||||
|
||||
Now that we have our disk mounted, let's install Samba to share it over the network.
|
||||
|
||||
### 2.1 Install Samba inside the LXC:
|
||||
|
||||
```bash
|
||||
apt-get install samba -y
|
||||
```
|
||||
|
||||
Confirm the service is running:
|
||||
|
||||
```bash
|
||||
systemctl status smbd.service
|
||||
```
|
||||
|
||||
### 2.2 Create a new user
|
||||
|
||||
Create a new user with the name we want, add a password for the user and confirm everything:
|
||||
|
||||
```bash
|
||||
adduser proxmenux
|
||||
```
|
||||
|
||||
Now let's add the new user to Samba:
|
||||
|
||||
```bash
|
||||
smbpasswd -a proxmenux
|
||||
```
|
||||
|
||||
### 2.3 Set permissions
|
||||
|
||||
Set the permissions for the proxmenux user to the path where we mounted the disk:
|
||||
|
||||
```bash
|
||||
apt-get install acl
|
||||
setfacl -R -m "u:proxmenux:rwx" /mnt/lxc_USB
|
||||
```
|
||||
|
||||
## 3. Configure Samba sharing
|
||||
|
||||
### 3.1 Edit the Samba configuration file
|
||||
|
||||
Edit the smb.conf file to share the disk directory:
|
||||
|
||||
```bash
|
||||
nano /etc/samba/smb.conf
|
||||
```
|
||||
|
||||
At the end of the file add:
|
||||
|
||||
```
|
||||
[lxc_usb]
|
||||
comment = shared folder
|
||||
path = /mnt/lxc_USB
|
||||
read only = no
|
||||
writable = yes
|
||||
browseable = yes
|
||||
guest ok = no
|
||||
valid users = @proxmenux
|
||||
```
|
||||
|
||||
## 4. Verify access and usage
|
||||
|
||||
We now have our Samba server installed and our USB drive shared. Let's verify that we can access it:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
Now we can use our hard drive, use it inside the container and also share its content:
|
||||
|
||||

|
||||
|
||||
## Support the Author
|
||||
|
||||
<div style="display: flex; justify-content: center; align-items: center;">
|
||||
<a href="https://ko-fi.com/G2G313ECAN" target="_blank" style="display: flex; align-items: center; text-decoration: none;">
|
||||
<img src="https://raw.githubusercontent.com/MacRimi/HWEncoderX/main/images/kofi.png" alt="Support me on Ko-fi" style="width:175px; margin-right:65px;"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
If you found this tutorial helpful and useful, you can buy me a Ko-fi! Thank you! 😊
|
BIN
guides/lxc_samba/lxc_1.png
Normal file
After Width: | Height: | Size: 261 KiB |
BIN
guides/lxc_samba/lxc_2.png
Normal file
After Width: | Height: | Size: 124 KiB |
BIN
guides/lxc_samba/lxc_3.png
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
guides/lxc_samba/lxc_4.png
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
guides/lxc_samba/lxc_5.png
Normal file
After Width: | Height: | Size: 212 KiB |
@ -1,357 +0,0 @@
|
||||
---
|
||||
title: "Setting up NVIDIA Drivers on Proxmox VE with GPU Passthrough"
|
||||
description: "Learn how to install and configure NVIDIA drivers on your Proxmox VE host and enable GPU passthrough to your virtual machines."
|
||||
---
|
||||
|
||||
|
||||
# Instalar drivers de tarjeta grafica Nvidia en Promox (Actualización PVE 8)
|
||||
Antes de empezar quiero agradecer al compañero @juanlu13 por proporcionarme la [fuente original](https://forums.plex.tv/t/plex-hw-acceleration-in-lxc-container-anyone-with-success/219289/34?utm_source=pocket_mylist) de la cual se basa este manual.
|
||||
#
|
||||
Este manual vamos a instalar los drivers de Nvidia, el servicio persistente y un parche opcional para eliminar las sesiones de codificación máxima.
|
||||
|
||||
|
||||
- Instalaremos los drives Nvidia en el host de Proxmox.
|
||||
- Configuraremos los drives para poder usarlos en cualquier LXC.
|
||||
|
||||
Para poder realizar la instalación debemos:
|
||||
<br>
|
||||
<br>
|
||||
1- poner en la lista negra el controlador de "nouveau" si no lo tenemos ya. Si ya lo tenemos podemos saltarnos este paso.
|
||||
|
||||
Lo podemos comprobar asi:
|
||||
```
|
||||
cat /etc/modprobe.d/blacklist.conf
|
||||
```
|
||||
En la imagen del ejemplo se muestra que si que esta añadido a la lista negra "blacklist nouveau"
|
||||
|
||||

|
||||
|
||||
Si en nuestro caso no se muestra: blacklist nouveau
|
||||
|
||||
Lo añadimos así para que no lo use y podemos instalar el driver de Nvidia.
|
||||
|
||||
```
|
||||
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
|
||||
```
|
||||
```
|
||||
reboot
|
||||
```
|
||||
|
||||
2- Asegurarnos que tenemos estos repositorios añadidos:
|
||||
|
||||
(*Si tenemos instalado el script post instalación de [tteck](https://tteck.github.io/Proxmox/) o el de [xshok](https://github.com/extremeshok/xshok-proxmox), podemos saltarnos este paso ya que no es necesario puesto que están añadidos estos repositorios.*)
|
||||
|
||||
```
|
||||
nano /etc/apt/sources.list
|
||||
```
|
||||
##
|
||||
|
||||
## Proxmox 7
|
||||
```
|
||||
deb http://ftp.debian.org/debian bullseye main contrib
|
||||
deb http://ftp.debian.org/debian bullseye-updates main contrib
|
||||
deb http://security.debian.org/debian-security bullseye-security main contrib
|
||||
deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription
|
||||
```
|
||||
##
|
||||
|
||||
## Proxmox 8
|
||||
```
|
||||
deb http://ftp.debian.org/debian bookworm main contrib
|
||||
deb http://ftp.debian.org/debian bookworm-updates main contrib
|
||||
deb http://security.debian.org/debian-security bookworm-security main contrib
|
||||
deb http://deb.debian.org/debian bookworm main contrib non-free-firmware
|
||||
deb http://deb.debian.org/debian bookworm-updates main contrib non-free-firmware
|
||||
# security updates
|
||||
deb http://security.debian.org/debian-security bookworm-security main contrib non-free-firmware
|
||||
```
|
||||
##
|
||||
|
||||
Actualizamos los paquetes y promox
|
||||
|
||||
```
|
||||
apt update && apt dist-upgrade -y
|
||||
```
|
||||
|
||||
Antes de empezar, instalamos dos paquetes que necesitaremos, git y los encabezados del kernel para poder instalar los drivers:
|
||||
|
||||
```
|
||||
apt-get install git
|
||||
```
|
||||
```
|
||||
apt-get install -qqy pve-headers-`uname -r` gcc make
|
||||
```
|
||||
## 1 - Instalar los drivers de Nvidia en el host de Proxmox
|
||||
|
||||
### - Driver:
|
||||
|
||||
Para empezar, necesitamos saber cual es el ultimo controlador estable disponible:*
|
||||
<br>
|
||||
|
||||
(*Si vamos a instalar el parche para saltarnos el limite de codificaciones máximas, tenemos que tener en cuenta que ese parche este disponible para la versión del controlador que vamos a instalar.*) Podemos verlo [aquí](https://github.com/keylase/nvidia-patch).
|
||||
```
|
||||
https://download.nvidia.com/XFree86/Linux-x86_64/latest.txt
|
||||
```
|
||||
|
||||
Podemos comprobar el listado completo de Drivers [aquí](https://download.nvidia.com/XFree86/Linux-x86_64/)
|
||||
|
||||
|
||||
Cuando nos muestre el resultado, copiamos el numero y los sustituimos por “/latest.txt”
|
||||
|
||||
Por ejemplo así:
|
||||
|
||||
```
|
||||
https://download.nvidia.com/XFree86/Linux-x86_64/525.116.03/
|
||||
```
|
||||
|
||||
Una vez dentro del directorio copiamos el enlace del instalador que termina con la extensión .run
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
Por ejemplo:
|
||||
```
|
||||
https://download.nvidia.com/XFree86/Linux-x86_64/525.116.03/NVIDIA-Linux-x86_64-525.116.03.run
|
||||
```
|
||||
|
||||
#### Empezamos con la instalación:
|
||||
|
||||
```
|
||||
mkdir /opt/nvidia
|
||||
```
|
||||
```
|
||||
cd /opt/nvidia
|
||||
```
|
||||
Descargamos el controlador que copiamos antes.
|
||||
```
|
||||
wget https://download.nvidia.com/XFree86/Linux-x86_64/525.116.03/NVIDIA-Linux-x86_64-525.116.03.run
|
||||
```
|
||||
Le damos permisos de ejecución.
|
||||
```
|
||||
chmod +x NVIDIA-Linux-x86_64-525.116.03.run
|
||||
```
|
||||
ejecutamos.
|
||||
```
|
||||
./NVIDIA-Linux-x86_64-525.116.03.run --no-questions --ui=none --disable-nouveau
|
||||
```
|
||||
Una vez terminado reiniciamos.
|
||||
```
|
||||
reboot
|
||||
```
|
||||
Una vez reiniciado proxmox continuamos con la intalación. Ejecutamos:
|
||||
```
|
||||
/opt/nvidia/NVIDIA-Linux-x86_64-525.116.03.run --no-questions --ui=none
|
||||
```
|
||||
|
||||
Ahora añadimos a etc/modules:
|
||||
```
|
||||
nano /etc/modules-load.d/modules.conf
|
||||
```
|
||||
```
|
||||
vfio
|
||||
vfio_iommu_type1
|
||||
vfio_pci
|
||||
vfio_virqfd
|
||||
nvidia
|
||||
nvidia_uvm
|
||||
```
|
||||
Guardamos:
|
||||
ctrl + x.
|
||||
|
||||
<br>
|
||||
|
||||
Actualizamos initramfs:
|
||||
```
|
||||
update-initramfs -u -k all
|
||||
```
|
||||
A continuación creamos reglas para cargar los controladores en el arranque para nvidia y nvidia_uvm:
|
||||
```
|
||||
nano /etc/udev/rules.d/70-nvidia.rules
|
||||
```
|
||||
Pegamos:
|
||||
```
|
||||
# /etc/udev/rules.d/70-nvidia.rules
|
||||
# Create /nvidia0, /dev/nvidia1 … and /nvidiactl when nvidia module is loaded
|
||||
KERNEL=="nvidia", RUN+="/bin/bash -c '/usr/bin/nvidia-smi -L'"
|
||||
#
|
||||
# Create the CUDA node when nvidia_uvm CUDA module is loaded
|
||||
KERNEL=="nvidia_uvm", RUN+="/bin/bash -c '/usr/bin/nvidia-modprobe -c0 -u'"
|
||||
```
|
||||
Guardamos: ctrl + x
|
||||
|
||||
<br>
|
||||
|
||||
### - NVIDIA driver persistence:
|
||||
|
||||
Ahora instalamos NVIDIA driver persistence:
|
||||
```
|
||||
cd /opt/nvidia
|
||||
git clone https://github.com/NVIDIA/nvidia-persistenced.git
|
||||
cd nvidia-persistenced/init
|
||||
./install.sh
|
||||
```
|
||||
```
|
||||
reboot
|
||||
```
|
||||
|
||||
Comprobamos que el controlador este instalado y el servicio este ejecutándose:
|
||||
```
|
||||
nvidia-smi
|
||||
```
|
||||

|
||||
```
|
||||
systemctl status nvidia-persistenced
|
||||
```
|
||||

|
||||
|
||||
### - Parche:
|
||||
|
||||
Ahora como opcion, parcheamos el controlador nvidia para eliminar las sesiones de codificación máxima. Según el desarrollador el parche NVENC elimina la restricción sobre la cantidad máxima de sesiones de codificación de video NVENC simultáneas impuestas por Nvidia a las GPU de nivel de consumidor.
|
||||
|
||||
```
|
||||
cd /opt/nvidia
|
||||
git clone https://github.com/keylase/nvidia-patch.git
|
||||
cd nvidia-patch
|
||||
./patch.sh
|
||||
```
|
||||

|
||||
|
||||
<br>
|
||||
|
||||
## 2- Configurar los drives para poder usarlos en cualquier LXC.
|
||||
|
||||
Primeramente necesitamos obtener estos datos:
|
||||
```
|
||||
ls -l /dev/nv*
|
||||
```
|
||||

|
||||
|
||||
|
||||
|
||||
Pongamos por ejemplo que vamos a usar el LXC de Plex del scrip de tteck con ID100. Si lo tenemos ejecutado lo apagamos.
|
||||
```
|
||||
nano /etc/pve/lxc/100.conf
|
||||
```
|
||||
Si las hubiera, comentamos todas las líneas en las que aparezca:
|
||||
<br>
|
||||
- lxc.cgroup2.devices.allow...
|
||||
- /dev/dri...
|
||||
<br>
|
||||
|
||||
y pegamos esto dentro del archivo de configuración del LXC, que corresponde a los datos que obtuvimos con: ls -l /dev/nv*
|
||||
<br>
|
||||
|
||||
(*los numeros pueden variar que un equipo a otro*)
|
||||
|
||||
```
|
||||
lxc.cgroup2.devices.allow: c 195:* rwm
|
||||
lxc.cgroup2.devices.allow: c 509:* rwm
|
||||
lxc.cgroup2.devices.allow: c 10:* rwm
|
||||
lxc.cgroup2.devices.allow: c 238:* rwm
|
||||
lxc.mount.entry: /dev/nvidia0 dev/nvidia0 none bind,optional,create=file
|
||||
lxc.mount.entry: /dev/nvidiactl dev/nvidiactl none bind,optional,create=file
|
||||
lxc.mount.entry: /dev/nvidia-uvm dev/nvidia-uvm none bind,optional,create=file
|
||||
lxc.mount.entry: /dev/nvidia-modeset dev/nvidia-modeset none bind,optional,create=file
|
||||
lxc.mount.entry: /dev/nvidia-uvm-tools dev/nvidia-uvm-tools none bind,optional,create=file
|
||||
lxc.mount.entry: /dev/nvram dev/nvram none bind,optional,create=file
|
||||
```
|
||||
|
||||

|
||||
|
||||
<br>
|
||||
|
||||
Guardamos:
|
||||
ctrl + x.
|
||||
|
||||
Ejecutamos el LCX y vamos a instalar dentro de el, el driver de Nvidia.
|
||||
**IMPORTANTE esta instalación la hacemos desde la consola del LCX no desde Proxmox**
|
||||
|
||||
```
|
||||
mkdir /opt/nvidia
|
||||
```
|
||||
```
|
||||
cd /opt/nvidia
|
||||
```
|
||||
```
|
||||
wget https://download.nvidia.com/XFree86/Linux-x86_64/525.116.03/NVIDIA-Linux-x86_64-525.116.03.run
|
||||
```
|
||||
```
|
||||
chmod +x NVIDIA-Linux-x86_64-525.116.03.run
|
||||
```
|
||||
```
|
||||
./NVIDIA-Linux-x86_64-525.116.03.run --no-kernel-module
|
||||
```
|
||||
<br>
|
||||
|
||||
Cuando aparezca esta pantalla seleccionamos todo por defecto, cada vez que nos pregunte.
|
||||
|
||||
<br>
|
||||
|
||||

|
||||
|
||||
<br>
|
||||
|
||||
|
||||
Una vez terminada la instalación comprobamos que todo este correcto
|
||||
|
||||
|
||||
```
|
||||
nvidia-smi
|
||||
```
|
||||
|
||||

|
||||
|
||||
```
|
||||
ls -l /dev/nv*
|
||||
```
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
## Comprobamos que Plex use la grafica.
|
||||
|
||||
<br>
|
||||
|
||||
Como podemos observar el contenedor LXC de Plex hace uso de la grafica de Nvidia de nuestro host Proxmox.
|
||||
|
||||
<br>
|
||||
|
||||

|
||||
|
||||
<br>
|
||||
|
||||

|
||||
|
||||
<br>
|
||||
|
||||
Si queremos que cualquier LXC haga uso de nuestra grafica simplemente es seguir los mismos pasos.
|
||||
|
||||
##
|
||||
|
||||
Si queremos usar la grafica nvida en Docker, necesitanos como extra instalar: nvidia-docker2.
|
||||
|
||||
Dentro del LCX donde tengamos Docker, Lo podemos hacer con este simple script:
|
||||
```
|
||||
wget https://raw.githubusercontent.com/MacRimi/manuales/main/NVIDIA/nvidia-docker.sh
|
||||
```
|
||||
```
|
||||
chmod +x nvidia-docker.sh
|
||||
```
|
||||
```
|
||||
./nvidia-docker.sh
|
||||
```
|
||||
|
||||
Enjoy!!
|
||||
|
||||
Un tutorial de Proxmology.
|
||||
|
||||
#
|
||||
|
||||
<div style="display: flex; justify-content: center; align-items: center;">
|
||||
<a href="https://ko-fi.com/G2G313ECAN" target="_blank" style="display: flex; align-items: center; text-decoration: none;">
|
||||
<img src="https://raw.githubusercontent.com/MacRimi/HWEncoderX/main/images/kofi.png" alt="Support me on Ko-fi" style="width:175px; margin-right:65px;"/>
|
||||
</a>
|
||||
</div>
|
||||
Si este tutorial te ha gustado y te ha sido útil, ¡puedes invitarme a un Ko-fi! ¡Gracias! 😊
|