-
systemctl status/start/stop pve-container@107
-
Para entrar desde PVE en un contenedor: pct enter CTID
-
Ruta de los ficheros de configuración de los contenedores LXC: root@elite:/etc/pve/nodes/elite/lxc#
-
Ruta de los ficheros de configuración de las VMs: root@elite:/etc/pve/nodes/elite/qemu-server#
-
Rutas de las discos (.raw) de contenedores LXC: root@elite:/var/lib/vz/images/102/vm-102-disk-0.raw
-
Ficheros cfg de configuración del entorno: /etc/pve#
root@elite:/etc/pve# ls *.c* -la
-rw-r----- 1 root www-data 447 Feb 4 13:01 corosync.conf
-rw-r----- 1 root www-data 13 Jan 15 2023 datacenter.cfg
-rw-r----- 1 root www-data 0 Feb 4 14:38 replication.cfg
-rw-r----- 1 root www-data 600 Feb 4 13:40 storage.cfg
-rw-r----- 1 root www-data 44 Feb 1 2023 user.cfg
AÑADIR ACCESO POR VNC A UNA VM
- Add a line to the VM's configuration file /etc/pve/local/qemu-server/<VMID>.conf which specifies the VNC display number as follows ("77" in the example below):
args: -vnc 0.0.0.0:77 - If you want to use password protection, add:
args: -vnc 0.0.0.0:77,password=on - Go to the VM's 'Monitor' panel in the web interface, or otherwise open an HMP connection. Then, use the following command:
set_password vnc foobar1 -d vnc2 - Conectar con el cliente VNC al servidor Proxmox, no a la VM, por el puerto 5977 en este caso (59+port)
SI NO APARECEN LOS CT TEAMPLATES DE TURNKEY
# pveam update
MONTAR UNA RUTA NFS EN UN LXC SIN PRIVILEGIOS
- Add a line to the VM's configuration file /etc/pve/local/lxc/<lxcid>.conf which specifies the folder in the PVE host and the folder in the LXC container:
mp0: /mnt/qnap_multimedia,mp=/mnt/qnap_multimedia - Restart container
DAR A UN NODO MÁS DE UN VOTO DE CARA A QUORUM
- Editar con nano /etc/pve/corosync.conf
- Anadir un voto adicional al nodo correspondiente en quorum_votes:
- Añadir en una unidad config_version: en totem
logging {
debug: off
to_syslog: yes
}
nodelist {
node {
name: elite
nodeid: 2
quorum_votes: 2
ring0_addr: 192.168.1.225
}
node {
name: pve
nodeid: 1
quorum_votes: 1
ring0_addr: 192.168.1.230
}
}
quorum {
provider: corosync_votequorum
}
totem {
cluster_name: proxmoxcl
config_version: 3
interface {
linknumber: 0
}
ip_version: ipv4-6
link_mode: passive
secauth: on
version: 2
}
FORZAR EL ARRANQUE DE CLUSTER SIN CONTAR CON QUORUM
pvecm expected 1Proxmox: Upgrade PVE versión 8.1.3 a 8.2 Toca actualizar laboratorio...que ahora mismo está en la ve
HOW TO REMOVE PROXMOX CLUSTER
systemctl stop pve-cluster corosync
pmxcfs -l
rm -r /etc/corosync/*
rm /etc/pve/corosync.conf
killall pmxcfs
systemctl start pve-cluster
PROXMOX QUORUM, EVICT NODE
If quorum is lost you´ll see messages like "proxmox unable to open file '/etc/pve/nodes/"
If not gain temporary quorum you can reduce the number of live nodes for quorum
pvecm expected 1
Delete one node
pvecm delnode old-node-name
Show cluster status
pvecm statusComo ejemplo, para hacer accesible un recurso de una NAS externa al PVE.
1.- Montamos en el host PVE el share de la NAS donde se encuentran los directorios a presentar al contenedor LXC, por ejemplo:
mount 192.168.1.11:/share/CACHEDEV1_DATA/Multimedia /mnt/qnap_multimedia
Faltaría añadir el punto de montaje en /etc/fstab para que se produzca el mount en el arranque.
2.- Configuraremos el contenedor LXC para montar sobre el mismo la ruta que hemos montado en el host PVE en el punto anterior.
Esta configuración de montaje se refleja en el fichero de configuración del contenedor, 100.conf en nuestro ejemplo.
Para ello tenemos dos alternativas:
a.- Editar el fichero /etc/pve/lxc/100.conf y añadir la sentencia que produce el montaje
mp0: /mnt/qnap_multimedia/tv,mp=/var/syncthing/tv
b.- Sin editar el fichero, podemos añadir la sentencia en el mismo mediante línea de comando desde el host PVE:
pct set 100 -mp0 /mnt/qnap_multimedia/tv,mp=/var/syncthing/tvRuta configuración:
- Linux Containers: /etc/pev/lxc/*.conf
- VMs: /etc/pev/qemu-server/*.conf
Consolidar almacenamiento tras instalación por defecto:
- borrar desde la gui el almacenamiento local-lvm
- lvremove /dev/pve/data
- lvresize -l +100%FREE /dev/pve/root
- resize2fs /dev/mapper/pve-root
- añadir desde la gui al almacenamiento local CT Images, VM Images, ...
Cambiar nombre a un contenedor LXC:
- pct set <VMID> --hostname <newname>