| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| informatique:linux:proxmox [2025/04/07 11:55] – yahiko | informatique:linux:proxmox [2025/10/23 07:58] (current) – yahiko |
|---|
| systemctl restart pvedaemon pveproxy | systemctl restart pvedaemon pveproxy |
| systemctl restart pve-cluster | systemctl restart pve-cluster |
| | </code> |
| | |
| | Si jamais l'état des VM n'est pas visible : |
| | |
| | <code bash> |
| | systemctl restart pvestatd |
| </code> | </code> |
| |
| umount -f /mnt/nfs/pointdemontage | umount -f /mnt/nfs/pointdemontage |
| qm unlock ID_VM | 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 0 718786560 0.00% |
| | nas-nfs nfs inactive 0 0 0 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 0 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> | </code> |
| |
| |
| Vérifier le status du service ''proc-sys-fs-binfmt_misc.automount''. | Vérifier le status du service ''proc-sys-fs-binfmt_misc.automount''. |
| | |
| | ===== Lister les VMs ou CT ===== |
| | |
| | ==== VM ==== |
| | |
| | <code bash> |
| | qm list |
| | </code> |
| | |
| | ==== CT ==== |
| | |
| | <code bash> |
| | pct list |
| | </code> |
| | |
| | ===== 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> |
| | |
| |