Daily Shaarli

All links of one day in a single page.

May 23, 2024

Note: Atajos de Proxmox
  • 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 1