virtualisierung:proxmox:pve_allgemein
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| virtualisierung:proxmox:pve_allgemein [2020/02/27 12:42] – stone | virtualisierung:proxmox:pve_allgemein [2023/05/10 13:43] (current) – stone | ||
|---|---|---|---|
| Line 189: | Line 189: | ||
| Möchte man eine Node zu einem Cluster mit einen ausgelagerten HA Netz hinzufügen macht man dies ähnlich wie davor beim anlegen. | Möchte man eine Node zu einem Cluster mit einen ausgelagerten HA Netz hinzufügen macht man dies ähnlich wie davor beim anlegen. | ||
| < | < | ||
| - | pvecm add 172.27.9.41 --ring0_addr | + | pvecm add <ip first node of the cluster> --link0 <own ip corosync link 0> --link1 <own ip corosync link 1> |
| + | |||
| + | Bespiel: | ||
| + | pvecm add 172.27.9.41 --link0 172.27.5.12 --link1 172.27.9.42 | ||
| </ | </ | ||
| Line 256: | Line 259: | ||
| + | \\ | ||
| + | |||
| + | ==== datacenter.cfg ==== | ||
| + | Es gibt eine Datacenter Config in PVE in der ein paar wichtige Einstellungen getroffen werden können. | ||
| + | \\ | ||
| + | < | ||
| + | vim / | ||
| + | |||
| + | email_from: <welchen Absender verwendet pve> | ||
| + | keyboard: < | ||
| + | bwlimit: migration=< | ||
| + | migration: secure, | ||
| + | |||
| + | |||
| + | Beispiel: | ||
| + | email_from: supergeil@heisl.org | ||
| + | keyboard: de | ||
| + | bwlimit: migration=716800 | ||
| + | migration: secure, | ||
| + | </ | ||
| + | \\ | ||
| + | Hier die [[https:// | ||
| \\ | \\ | ||
| Line 536: | Line 561: | ||
| 15G total | 15G total | ||
| </ | </ | ||
| + | \\ | ||
| ==== Linux ==== | ==== Linux ==== | ||
| Line 665: | Line 690: | ||
| </ | </ | ||
| + | |||
| + | \\ | ||
| + | |||
| + | |||
| + | ====== Zertifikate ====== | ||
| + | |||
| + | Update der internen / local Zertifikate | ||
| + | < | ||
| + | pvecm updatecerts -f | ||
| + | </ | ||
| \\ | \\ | ||
| Line 723: | Line 758: | ||
| echo " | echo " | ||
| fi | fi | ||
| + | </ | ||
| + | \\ | ||
| + | |||
| + | ===== Qemu Befehle ===== | ||
| + | Qemue Befehle können ohne Problem in der Shell am PVE Server ausgeführt werden. | ||
| + | |||
| + | ==== Qemu Disk Image Check ==== | ||
| + | **Einfacher Check vom qcow2 File** | ||
| + | < | ||
| + | qemu-img check < | ||
| + | |||
| + | Beispiel: | ||
| + | root@pvehost02: | ||
| + | No errors were found on the image. | ||
| + | 327680/ | ||
| + | Image end offset: 27737522176 | ||
| + | </ | ||
| + | \\ | ||
| + | |||
| + | **Check und reparieren wenn es Fehler gibt** | ||
| + | Wenn es Fehler auf einem File geben sollte kann dieser Befehl aus 2-3x ausgeführt werden. So lange bis es keine Fehler mehr gibt | ||
| + | < | ||
| + | qemu-img check -r all < | ||
| + | |||
| + | Beispiel: | ||
| + | root@pvehost02: | ||
| + | No errors were found on the image. | ||
| + | 327680/ | ||
| + | Image end offset: 27737522176 | ||
| + | </ | ||
| + | \\ | ||
| + | |||
| + | ==== Snapshots ==== | ||
| + | Wenn PVE einmal ein Problem hat einen Snapshot zu löschen kann man so kontrolleren ob es noch einen Snapshot auf der VM gibt bzw diesen auch löschen. | ||
| + | |||
| + | **Snapshot ansehen** | ||
| + | \\ | ||
| + | In diesem Beispiel hat die betroffene VM zwei Disk Files. Es sollte zur Sicherheit jedes Diskfile kontrolliert werden. | ||
| + | |||
| + | < | ||
| + | qemu-img snapshot -l < | ||
| + | |||
| + | Beispiel: | ||
| + | root@pvehost02: | ||
| + | Snapshot list: | ||
| + | ID TAG VM SIZE DATE VM CLOCK | ||
| + | 1 | ||
| + | root@pvehost02: | ||
| + | root@pvehost02: | ||
| + | Snapshot list: | ||
| + | ID TAG VM SIZE DATE VM CLOCK | ||
| + | 1 | ||
| + | </ | ||
| + | \\ | ||
| + | |||
| + | **Löschen vom Snapshot** | ||
| + | \\ | ||
| + | Das löschen eines Snapshots muss immer auf einem Diskfile gemacht werden. Hat eine VM mehrere Disk Files muss dieser auf allen Files gelöscht werden. | ||
| + | |||
| + | < | ||
| + | qemu-img snapshot -d <snap id> < | ||
| + | |||
| + | Beispiel: | ||
| + | root@pvehost02: | ||
| + | root@pvehost02: | ||
| + | </ | ||
| + | Wurde der Snapshot via CLI erfolgreich entfernt wird dieser im PVE GUI jedoch noch angezeigt. Dies liegt daran das im VM Config File dieser noch drin steht. Hier kann einfach Inbetrieb das Config geöffnet und verändert werden. \\ | ||
| + | Für einen Snapshot wird ein Configblock im File mit dem Namen des Snapshots angelegt. Der komplette Block kann einfach gelöscht werden. | ||
| + | |||
| + | < | ||
| + | root@pvehost02: | ||
| + | </ | ||
| + | Danach ist der Snapshot auch in der GUI nicht mehr zu sehen. | ||
| + | \\ | ||
| + | |||
| + | |||
| + | ===== Qemu Image mounten ===== | ||
| + | Wozu kann ich das brauchen? | ||
| + | * Single File Restore | ||
| + | * Schnell etwas nachsehen | ||
| + | * Disaster fällen | ||
| + | \\ | ||
| + | So spielt man einen komletten mount durch. | ||
| + | |||
| + | ==== NBD am Host aktivieren ==== | ||
| + | |||
| + | < | ||
| + | modprobe nbd max_part=8 | ||
| + | </ | ||
| + | \\ | ||
| + | |||
| + | ==== QCOW2 als Network Block Device verbinden ==== | ||
| + | < | ||
| + | qemu-nbd --connect=/ | ||
| + | </ | ||
| + | \\ | ||
| + | |||
| + | ==== Partion finden die man mounten möchte ==== | ||
| + | < | ||
| + | root@pvehost06: | ||
| + | Disk /dev/nbd0: 27 GiB, 28991029248 bytes, 56623104 sectors | ||
| + | Units: sectors of 1 * 512 = 512 bytes | ||
| + | Sector size (logical/ | ||
| + | I/O size (minimum/ | ||
| + | Disklabel type: dos | ||
| + | Disk identifier: 0xa53b1ed4 | ||
| + | |||
| + | Device | ||
| + | / | ||
| + | </ | ||
| + | \\ | ||
| + | |||
| + | ==== Partition mounten ==== | ||
| + | < | ||
| + | mount /dev/nbd0p1 /mnt/x/ | ||
| + | </ | ||
| + | \\ | ||
| + | |||
| + | ==== Zugriff auf die Daten ==== | ||
| + | < | ||
| + | root@pvehost06: | ||
| + | mattermost | ||
| + | </ | ||
| + | \\ | ||
| + | |||
| + | ==== Aufräumen ==== | ||
| + | < | ||
| + | umount /mnt/x | ||
| + | qemu-nbd --disconnect /dev/nbd0 | ||
| + | rmmod nbd | ||
| + | </ | ||
| + | \\ | ||
| + | |||
| + | |||
| + | ===== Disk Identifizieren ===== | ||
| + | Disk Identifzieren zwischen PVE Hardware und Gast OS | ||
| + | < | ||
| + | lsblk -o +SERIAL | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ===== API Befehle ===== | ||
| + | \\ | ||
| + | |||
| + | ==== API Shell Befehle ==== | ||
| + | **Host und VM Auslastung** | ||
| + | < | ||
| + | pvesh get / | ||
| </ | </ | ||
virtualisierung/proxmox/pve_allgemein.1582807347.txt.gz · Last modified: by stone
