Site Tools


informatique:linux:proxmox

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
informatique:linux:proxmox [2023/09/10 16:02] – created yahikoinformatique:linux:proxmox [2025/08/20 14:31] (current) yahiko
Line 1: Line 1:
 ====== Proxmox ====== ====== Proxmox ======
-===== Interface web innaccessible ===== +[[informatique:linux:proxmox:freedos|Freedos sous Proxmox]] 
-<codedoc code:bash>+===== Interface web inaccessible ===== 
 +Dans un premier temps :  
 +<code bash> 
 +systemctl restart pvedaemon pveproxy 
 +</code> 
 + 
 +Si pas mieux  
 +<code bash>
 pvecm expected 1 pvecm expected 1
 pvecm updatecerts pvecm updatecerts
 systemctl restart pvedaemon pveproxy systemctl restart pvedaemon pveproxy
 systemctl restart pve-cluster systemctl restart pve-cluster
-</codedoc>+</code> 
 + 
 +Si jamais l'état des VM n'est pas visible : 
 + 
 +<code bash> 
 +systemctl restart pvestatd 
 +</code>
  
 https://forum.proxmox.com/threads/can-not-login-to-proxmox-from-web-interface.32860/#post-448265 https://forum.proxmox.com/threads/can-not-login-to-proxmox-from-web-interface.32860/#post-448265
 +
 +===== Se connecter à un conteneur LXC =====
 +Parce que je ne m'en rappelle jamais. 
 +<code bash>
 +pct enter <id>
 +</code>
 +
 +===== Renouveler le certificat =====
 +
 +Si changement d'IP du serveur, le certificat auto-signé n'est pas identifié avec la bonne IP.
 +
 +Modifier dans le Hosts (Datacenter > choisir la nœud > System > Hosts) où 192.168.1.200 est la nouvelle IP : 
 +<code conf>
 +192.168.1.200 pve.test.lan pve
 +</code>
 +
 +Renouveler le certificat puis redémarrage du serveur web : 
 +<code bash>
 +pvecm updatecerts -f
 +systemctl restart pveproxy
 +</code>
 +
 +===== Sauvegarde plantée =====
 +<code bash>
 +vzdump -stop 
 +# si pas fonctionnel
 +ps -aux | grep vzdump
 +kill -9 PROCESS_ID
 +# si pas fonctionnel
 +umount -f /mnt/nfs/pointdemontage
 +qm unlock ID_VM
 +</code>
 +
 +===== Problème de montage NFS =====
 +
 +Source : https://wiki.wevers.tv:8443/index.php/Remount_NFS_share_on_ProxMox
 +
 +Vérifier le point de montage non joignable, ou ''nas-nfs'' est le nom du support :
 +<code bash>
 +pvesm status
 +
 +unable to activate storage 'nas-nfs' - directory '/mnt/pve/nas-nfs' does not exist or is unreachable
 +Name                     Type     Status           Total            Used       Available        %
 +archives-masters          dir     active       205314024       120206852        74605028   58.55%
 +local                     dir     active       205314024       120206852        74605028   58.55%
 +local-lvm             lvmthin     active       718786560                     718786560    0.00%
 +nas-nfs                   nfs     inactive                                            0.00%
 +pve2-ssd              lvmthin     active      1843396608        88298697      1755097910    4.79%
 +pve3-hdd              lvmthin     active      7782531072      2059257721      5723273350   26.46%
 +sauvegarde-locale         dir     active     11603524320      8213375968      2805288704   70.78%
 +</code>
 +
 +Le désactiver : 
 +<code bash>
 +pvesm set nas-nfs --disable
 +</code>
 +
 +Le démonter :
 +<code bash>
 +umount -f -l /mnt/pve/nas-nfs
 +</code>
 +
 +Le remonter :
 +<code bash>
 +pvesm set nas-nfs --delete disable
 +</code>
 +
 +Vérifier le status :
 +<code bash>
 +pvesm status
 +
 +Name                     Type     Status           Total            Used       Available        %
 +archives-masters          dir     active       205314024       120206856        74605024   58.55%
 +local                     dir     active       205314024       120206856        74605024   58.55%
 +local-lvm             lvmthin     active       718786560                     718786560    0.00%
 +nas-nfs                   nfs     active     11499296256      3114183424      8384572160   27.08%
 +pve2-ssd              lvmthin     active      1843396608        88298697      1755097910    4.79%
 +pve3-hdd              lvmthin     active      7782531072      2059257721      5723273350   26.46%
 +sauvegarde-locale         dir     active     11603524320      8213375968      2805288704   70.78%
 +</code>
 +
 +===== Problème de montage =====
 +
 +Vérifier le status du service ''proc-sys-fs-binfmt_misc.automount''.
 +
 +===== Restaurer une VM ou un conteneur =====
 +==== VM KVM ====
 +
 +<code bash>
 +qmrestore /où/est/le/backup/vzdump-qemu-110-2025_06_12-23_55_28.vma.zst ID_VM --storage NOM_STORAGE
 +</code>
 +
 +==== Conteneur LXC ====
 +
 +<code bash>
 +pct restore ID_CT /où/est/le/backup/vzdump-qemu-110-2025_06_12-23_55_28.tar.zst --storage NOM_STORAGE
 +</code>
 +
 +===== Lister la config d'une VM =====
 +
 +<code bash>
 +qm showcmd ID --pretty
 +</code>
 +
 +Par exemple : 
 +<code bash>
 +qm showcmd 101 --pretty
 +/usr/bin/kvm \
 +  -id 101 \
 +  -name 'SRV001,debug-threads=on' \
 +  -no-shutdown \
 +  -chardev 'socket,id=qmp,path=/var/run/qemu-server/101.qmp,server=on,wait=off' \
 +  -mon 'chardev=qmp,mode=control' \
 +  -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect-ms=5000' \
 +  -mon 'chardev=qmp-event,mode=control' \
 +  -pidfile /var/run/qemu-server/101.pid \
 +  -daemonize \
 +  -smbios 'type=1,uuid=2084a6fa-479a-4fa4-b501-ae6151c2818d' \
 +  -smp '8,sockets=1,cores=8,maxcpus=8' \
 +  -nodefaults \
 +  -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
 +  -vnc 'unix:/var/run/qemu-server/101.vnc,password=on' \
 +  -global 'kvm-pit.lost_tick_policy=discard' \
 +  -cpu 'kvm64,enforce,hv_ipi,hv_relaxed,hv_reset,hv_runtime,hv_spinlocks=0x1fff,hv_stimer,hv_synic,hv_time,hv_vapic,hv_vpindex,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep' \
 +  -m 16384 \
 +  -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \
 +  -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \
 +  -device 'vmgenid,guid=ec0828e5-7277-43c2-841e-3eaf95fade45' \
 +  -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \
 +  -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \
 +  -device 'VGA,id=vga,bus=pci.0,addr=0x2,edid=off' \
 +  -iscsi 'initiator-name=iqn.1993-08.org.debian:01:a37a18615993' \
 +  -drive 'if=none,id=drive-ide0,media=cdrom,aio=io_uring' \
 +  -device 'ide-cd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0' \
 +  -drive 'file=/dev/pve2/vm-101-disk-0,if=none,id=drive-virtio0,format=raw,cache=none,aio=io_uring,detect-zeroes=on' \
 +  -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=100' \
 +  -netdev 'type=tap,id=net0,ifname=tap101i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
 +  -device 'virtio-net-pci,mac=FA:08:48:0B:AB:19,netdev=net0,bus=pci.0,addr=0x12,id=net0' \
 +  -rtc 'driftfix=slew,base=localtime' \
 +  -machine 'hpet=off,type=pc-i440fx-5.1+pve0'
 +</code>
 +
 +
informatique/linux/proxmox.1694361777.txt.gz · Last modified: 2023/09/10 16:02 by yahiko