proxmox

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
proxmox [22/04/2025 - 13:28] – [Proxmox PVE] thommie_netzwissen.deproxmox [25/04/2025 - 10:25] (aktuell) thommie_netzwissen.de
Zeile 9: Zeile 9:
   * Helper Scripts: [[https://community-scripts.github.io/ProxmoxVE/|https://community-scripts.github.io/ProxmoxVE/]]   * Helper Scripts: [[https://community-scripts.github.io/ProxmoxVE/|https://community-scripts.github.io/ProxmoxVE/]]
  
- +====== Verzeichnisstruktur ======
-===== Verzeichnisstruktur =====+
  
 ^Was^Wo^Anmerkung| ^Was^Wo^Anmerkung|
Zeile 18: Zeile 17:
 |LXC configs|/etc/pve/nodes/tokoeka/lxc|   | |LXC configs|/etc/pve/nodes/tokoeka/lxc|   |
  
-===== PVE Server Backup =====+====== PVE Server Backup ======
  
 [[https://xcruft.com/content/proxmox-config-backups|https://xcruft.com/content/proxmox-config-backups]] [[https://xcruft.com/content/proxmox-config-backups|https://xcruft.com/content/proxmox-config-backups]]
  
-===== User Management =====+====== User Management ======
  
 User in PVE erstellen (entspricht dem shell User). Erst dann ist die Administration per Web GUI möglich. User in PVE erstellen (entspricht dem shell User). Erst dann ist die Administration per Web GUI möglich.
Zeile 98: Zeile 97:
 über gleichberechtigten User, dann Löschen von "x" im Feld "Key ID" über gleichberechtigten User, dann Löschen von "x" im Feld "Key ID"
  
-===== Kommandozeile und Container/VMs =====+====== Kommandozeile und Container/VMs ======
  
 **qm**  = Management der **kvm**  VMs **qm**  = Management der **kvm**  VMs
Zeile 126: Zeile 125:
  
 </code> </code>
 +
 ==== Mounten eines Containers auf dem Host ==== ==== Mounten eines Containers auf dem Host ====
  
Zeile 132: Zeile 132:
  
 </code> </code>
 +
 ==== Gemeinsames Guest Share (smb) ==== ==== Gemeinsames Guest Share (smb) ====
  
Zeile 138: Zeile 139:
  
 </code> </code>
 +
 ==== Speicherverbrauch ermitteln ==== ==== Speicherverbrauch ermitteln ====
  
Zeile 144: Zeile 146:
  
 </code> </code>
 +
 ==== Container umbenennen ==== ==== Container umbenennen ====
 <code> <code>
Zeile 150: Zeile 153:
  
 </code> </code>
 +
 ==== Container betreten ==== ==== Container betreten ====
  
Zeile 175: Zeile 179:
 Bei VMs geht das per scp Bei VMs geht das per scp
  
-===== Backups manuell =====+====== Backups manuell ======
  
 <code> <code>
Zeile 198: Zeile 202:
 </code> </code>
  
-===== PVE Templates =====+====== PVE Templates ======
  
 Erreichbare Templates auflisten Erreichbare Templates auflisten
Zeile 216: Zeile 220:
 </code> </code>
  
-===== PVE Firewall =====+====== PVE Firewall ======
  
 zentrale Konfiguration zentrale Konfiguration
Zeile 278: Zeile 282:
 </code> </code>
  
-===== SMB Mount mit Containern =====+====== SMB Mount mit Containern ======
  
 Geht nur mit **privileged**  container. Unter /Your LXC Option/Feature muss die "CIFS capability" aktiviert sein. Geht nur mit **privileged**  container. Unter /Your LXC Option/Feature muss die "CIFS capability" aktiviert sein.
Zeile 340: Zeile 344:
 Netplan anwenden "sudo netplan apply" Netplan anwenden "sudo netplan apply"
  
-====== LXC spezielles ======+====== LXC Container ======
  
 [[https://pve.proxmox.com/wiki/Linux_Container|https://pve.proxmox.com/wiki/Linux_Container]] [[https://pve.proxmox.com/wiki/Linux_Container|https://pve.proxmox.com/wiki/Linux_Container]]
Zeile 348: Zeile 352:
 pct start 110 –debug pct start 110 –debug
  
-===== Port 111 rpcbind =====+====== Port 111 rpcbind ======
  
-Siehe [[https://www.taste-of-it.de/debian-rpc-port-111-offen/|https://www.taste-of-it.de/debian-rpc-port-111-offen/]] Über iptables auf localhost einrschränken:+Siehe [[https://www.taste-of-it.de/debian-rpc-port-111-offen/|https://www.taste-of-it.de/debian-rpc-port-111-offen/]] Über iptables auf localhost einschränken:
  
 ''iptables -A INPUT -p tcp !-s 127.0.0.1 –dport 111 -j DROP'' ''iptables -A INPUT -p tcp !-s 127.0.0.1 –dport 111 -j DROP''
Zeile 358: Zeile 362:
 ''iptables -A INPUT -p udp ! -s 192.168.0.0/24 –dport 111 -j DROP'' \\ ''ip6tables -A INPUT -p udp -s! IPv6-Adresse –dport 111 -j DROP'' ''iptables -A INPUT -p udp ! -s 192.168.0.0/24 –dport 111 -j DROP'' \\ ''ip6tables -A INPUT -p udp -s! IPv6-Adresse –dport 111 -j DROP''
  
-====== Datensicherung: Wiederherstellung aus Dumpfile ======+==== LXC: raw Device mounten ==== 
 + 
 +Welche loop devices werden aktuell benutzt 
 +<code> 
 + 
 + <font inherit/monospace;;inherit;;#ff5454background-color:#ffffff;>root</font> 
 + <font inherit/inherit;;inherit;;#ffff54background-color:#ffffff;>@</font> 
 + <font inherit/inherit;;inherit;;#54ffffbackground-color:#ffffff;>tokoeka</font> 
 + <font inherit/inherit;;inherit;;#ffff54background-color:#ffffff;>/mnt</font> 
 + <font inherit/inherit;;inherit;;#ff54ffbackground-color:#ffffff;>#</font> 
 + <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>losetup -l</font>      NAME        SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE                              DIO LOG-SEC 
 +/dev/loop1          0      0          0 /mnt/data/images/108/vm-108-disk-1.raw       512 
 +/dev/loop27              0          0 /mnt/data/images/112/vm-112-disk-0.raw       512 
 +/dev/loop17              0          0 /mnt/data/images/111/vm-111-disk-2.raw       512 
 +/dev/loop8          0      0          0 /mnt/data/images/110/vm-110-disk-0.raw       512 
 +/dev/loop25              0          0 /mnt/data/images/125/vm-125-disk-1.raw       512 
 +/dev/loop6          0      0          0 /mnt/data/images/100/vm-100-disk-0.raw       512 
 +/dev/loop23              0          0 /mnt/data/images/122/vm-122-disk-1.raw       512 
 +/dev/loop13              0          0 /mnt/data/images/113/vm-113-disk-0.raw       512 
 + 
 +</code> 
 + 
 +Ablauf manuell 
 + 
 +<code> 
 +losetup /dev/loop22 disk-drive-ide0.raw 
 +partx -v --add /dev/loop22 
 +mount /dev/loop22p1 /mnt/123 
 + 
 +</code> 
 + 
 +<code> 
 +root@tokoeka /mnt/data/images/116 # losetup /dev/loop19 vm-116-disk-2.raw 
 +root@tokoeka /mnt/data/images/116 # partx -v --add /dev/loop19 
 +partition: none, disk: /dev/loop19, lower: 0, upper: 0 
 +/dev/loop19: partition table type 'gpt' detected 
 +range recount: max partno=1, lower=0, upper=0 
 +/dev/loop19: partition #1 added 
 +root@tokoeka /mnt/data/images/116 # losetup -l | grep 116 
 +/dev/loop19              0          0 /mnt/data/images/116/vm-116-disk-2.raw       512 
 +/dev/loop8          0      0          0 /mnt/data/images/116/vm-116-disk-0.raw       512 
 +/dev/loop18              0          0 /mnt/data/images/116/vm-116-disk-1.raw       512 
 + 
 +</code> 
 + 
 +Auflisten aller Loop-Devices 
 +<code> 
 + 
 +losetup -l 
 + 
 +</code> 
 + 
 +Devices abhängen, mit -D alle zugehörigen abhängen 
 + 
 +<code> 
 +losetup -d 
 + 
 +losetup -D 
 + 
 +</code> 
 + 
 +Parsen der Partitionstabelle und anlegen von loop Einträgen nach Bedarf 
 + 
 +<code> 
 +partx -v --add /dev/loop20 
 + 
 +</code> 
 + 
 +Partitionstabelle zeigen 
 + 
 +<code> 
 +root@tokoeka /mnt # partx -s /dev/loop22 
 +NR START       END   SECTORS  SIZE NAME UUID 
 +  2048 204799999 204797952 97.7G      7a11d514-01 
 + 
 +</code> 
 + 
 +pct set 
 + 
 +<code> 
 +pct set 116 -mp1 volume=data:116/vm-116-disk-2.raw,mp=/mnt/data2,backup=1 
 + 
 +</code> 
 + 
 +===== Datensicherung: Wiederherstellung aus Dumpfile =====
  
 Dumpfiles werden im Format *.lzo oder *.tar.zst komprimiert abgelegt. Sie enthalten die VM Daten im raw Format. Dumpfiles werden im Format *.lzo oder *.tar.zst komprimiert abgelegt. Sie enthalten die VM Daten im raw Format.
  
 zst dekomprimieren zst dekomprimieren
-<code> 
  
 +<code>
 zstd -d vzdump-lxc-113-2022_05_14-01_30_57.tar.zst zstd -d vzdump-lxc-113-2022_05_14-01_30_57.tar.zst
  
Zeile 441: Zeile 529:
 </file> </file>
  
-====== KVMqcow2 Device mounten ======+====== KVM VMs (qemu) ====== 
 + 
 +===== qcow2 Device mounten =====
  
 <code> <code>
Zeile 487: Zeile 577:
 </code> </code>
  
-====== LXCraw Device mounten ======+===== KVMPlatte vergrössern =====
  
-Welche loop devices werden aktuell benutzt +[[https://tech.surveypoint.com/tips/resize-kvm-guest-virtual-disk-partition/|https://tech.surveypoint.com/tips/resize-kvm-guest-virtual-disk-partition/]]
- +
-<code> +
- <font inherit/monospace;;inherit;;#ff5454background-color:#ffffff;>root</font> +
- <font inherit/inherit;;inherit;;#ffff54background-color:#ffffff;>@</font> +
- <font inherit/inherit;;inherit;;#54ffffbackground-color:#ffffff;>tokoeka</font> +
- <font inherit/inherit;;inherit;;#ffff54background-color:#ffffff;>/mnt</font> +
- <font inherit/inherit;;inherit;;#ff54ffbackground-color:#ffffff;>#</font> +
- <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>losetup -l</font>    NAME        SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE                              DIO LOG-SEC +
-/dev/loop1          0      0          0 /mnt/data/images/108/vm-108-disk-1.raw       512 +
-/dev/loop27              0          0 /mnt/data/images/112/vm-112-disk-0.raw       512 +
-/dev/loop17              0          0 /mnt/data/images/111/vm-111-disk-2.raw       512 +
-/dev/loop8          0      0          0 /mnt/data/images/110/vm-110-disk-0.raw       512 +
-/dev/loop25              0          0 /mnt/data/images/125/vm-125-disk-1.raw       512 +
-/dev/loop6          0      0          0 /mnt/data/images/100/vm-100-disk-0.raw       512 +
-/dev/loop23              0          0 /mnt/data/images/122/vm-122-disk-1.raw       512 +
-/dev/loop13              0          0 /mnt/data/images/113/vm-113-disk-0.raw       512 +
- +
-</code> +
- +
-Ablauf manuell +
- +
-<code> +
-losetup /dev/loop22 disk-drive-ide0.raw +
-partx -v --add /dev/loop22 +
-mount /dev/loop22p1 /mnt/123 +
- +
-</code> +
- +
-<code> +
-root@tokoeka /mnt/data/images/116 # losetup /dev/loop19 vm-116-disk-2.raw +
-root@tokoeka /mnt/data/images/116 # partx -v --add /dev/loop19 +
-partition: none, disk: /dev/loop19, lower: 0, upper+
-/dev/loop19: partition table type 'gpt' detected +
-range recount: max partno=1, lower=0, upper=0 +
-/dev/loop19: partition #1 added +
-root@tokoeka /mnt/data/images/116 # losetup -l | grep 116 +
-/dev/loop19              0          0 /mnt/data/images/116/vm-116-disk-2.raw       512 +
-/dev/loop8          0      0          0 /mnt/data/images/116/vm-116-disk-0.raw       512 +
-/dev/loop18              0          0 /mnt/data/images/116/vm-116-disk-1.raw       512 +
- +
-</code> +
- +
-Auflisten aller Loop-Devices +
-<code> +
- +
-losetup -l +
- +
-</code> +
- +
-Devices abhängen, mit -D alle zugehörigen abhängen +
- +
-<code> +
-losetup -d +
- +
-losetup -D +
- +
-</code> +
- +
-Parsen der Partitionstabelle und anlegen von loop Einträgen nach Bedarf +
- +
-<code> +
-partx -v --add /dev/loop20 +
- +
-</code> +
- +
-Partitionstabelle zeigen +
- +
-<code> +
-root@tokoeka /mnt # partx -s /dev/loop22 +
-NR START       END   SECTORS  SIZE NAME UUID +
-  2048 204799999 204797952 97.7G      7a11d514-01 +
- +
-</code> +
- +
-pct set +
- +
-<code> +
-pct set 116 -mp1 volume=data:116/vm-116-disk-2.raw,mp=/mnt/data2,backup=1 +
- +
-</code>+
  
-Offen: offset? p1 ?+======   ======
  
 ====== Daten-Konvertierungen ====== ====== Daten-Konvertierungen ======
  • proxmox.1745328525.txt.gz
  • Zuletzt geändert: 22/04/2025 - 13:28
  • von thommie_netzwissen.de