Proxmox cluster workshop: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 96: | Zeile 96: | ||
==pmx2== | ==pmx2== | ||
*virt-clone -o pmx1 -n pmx2 --file /var/lib/libvirt/images/pmx2.qcow2 | *virt-clone -o pmx1 -n pmx2 --file /var/lib/libvirt/images/pmx2.qcow2 | ||
| − | + | Hostname pmx2.lab.int | |
| − | * | + | *hostnamectl set-hostname pmx2.lab.int |
| − | + | IP ändern auf 10.0.10.202 | |
| + | *vi /etc/network/interfaces | ||
| + | *reboot | ||
==pmx3== | ==pmx3== | ||
*virt-clone -o pmx1 -n pmx3 --file /var/lib/libvirt/images/pmx3.qcow2 | *virt-clone -o pmx1 -n pmx3 --file /var/lib/libvirt/images/pmx3.qcow2 | ||
| − | + | Hostname pmx3.lab.int | |
| − | * | + | *hostnamectl set-hostname pmx3.lab.int |
| − | + | IP ändern auf 10.0.10.203 | |
| + | *vi /etc/network/interfaces | ||
| + | *reboot | ||
=Proxmox Stufe 2= | =Proxmox Stufe 2= | ||
Version vom 7. Mai 2025, 04:56 Uhr
Ziel
- Auf Basis von QEMU/KVM wollen wir einen Proxmox Cluster erstellen
- wir erstellen zu erst ein Debian template mit dem Namen "debian12"
- Specs
- 4Procs
- 2GB Ram
- 20GB Festplatte
- Sie soll an vmbr0 als Bridge angehängt
- IP 10.0.10.50/24
- GW 10.0.10.1
- DNS 8.8.8.8
- DOMAIN lab.int
- Wir erstellen einen User "kit" password "kit"
- Wir erstellen einen User "root" password "radler"
- Wir fügen folgendes and die /etc/hosts
10.0.10.201 pmx1.lab.int pmx1 10.0.10.202 pmx2.lab.int pmx2 10.0.10.203 pmx3.lab.int pmx3 10.0.10.209 fs1.lab.int fs1 10.0.10.210 fs2.lab.int fs2 10.0.10.230 storage.lab.int storage 10.0.10.231 node1.lab.int node1 10.0.10.232 node2.lab.int node2
- Wir installieren sudo,ssh und vim
- Wir fügen den User kit in die sudo Gruppe
Auf dem Host System bitte auch dies hier anfügen
- Wir fügen folgendes and die /etc/hosts
10.0.10.201 pmx1.lab.int pmx1 10.0.10.202 pmx2.lab.int pmx2 10.0.10.203 pmx3.lab.int pmx3 10.0.10.209 fs1.lab.int fs1 10.0.10.210 fs2.lab.int fs2 10.0.10.230 storage.lab.int storage 10.0.10.231 node1.lab.int node1 10.0.10.232 node2.lab.int node2
Wir erstellen den fs1
- Auf Ebene des Hostes
- virt-clone -o debian12 -n fs1 --file /var/lib/libvirt/images/fs1.qcow2
Der fs1
Vorbereitung
Wir hängen eine 100GB Disk an den Hosts Wir starten den fs1 Formatieren mit ext4 Wir mounten diese in der /etc/fstab nach /share
- mkfs.ext4 /dev/vdb
- mkdir /share
- echo "/dev/vdb /share ext4 defaults 0 0" >> /etc/fstab
- mount -a
- systemctl daemon-reload
Wir legen die Verzeichnisse /share/backup und /share/prod an.
- mkdir /share/{backup,prod}
Hostname fs1.lab.int
- hostnamectl set-hostname fs1.lab.int
IP 10.0.10.209
- reboot
- apt install nfs-kernel-server
- echo "/share/prod 10.0.10.0/24(rw,sync,no_subtree_check,no_root_squash)" > /etc/exports
- echo "/share/backup 10.0.10.0/24(rw,sync,no_subtree_check,no_root_squash)" >> /etc/exports
- systemctl restart nfs-kernel-server
- Kontrolle vom Hosts als root
- showmount -e 10.0.10.209
Wir erstellen den ersten pmx daraus
- Auf Ebene des Hostes
- virt-clone -o debian12 -n pmx1 --file /var/lib/libvirt/images/pmx1.qcow2
Vorbereitung
- CPU: 8
- Ram: 12288MiB
Der erste pmx
Hostname pmx1.lab.int
- hostnamectl set-hostname pmx1.lab.int
IP ändern auf 10.0.10.201
- vi /etc/network/interfaces
- reboot
Proxmox Stufe1
- echo "deb [arch=amd64] http://download.proxmox.com/debian/pve bookworm pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
- wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg
- apt update && apt full-upgrade
- apt install proxmox-default-kernel
- systemctl reboot
Clonen der PMXse
- pmx1 muss aus sein
- Auf Ebene des Hostes
pmx2
- virt-clone -o pmx1 -n pmx2 --file /var/lib/libvirt/images/pmx2.qcow2
Hostname pmx2.lab.int
- hostnamectl set-hostname pmx2.lab.int
IP ändern auf 10.0.10.202
- vi /etc/network/interfaces
- reboot
pmx3
- virt-clone -o pmx1 -n pmx3 --file /var/lib/libvirt/images/pmx3.qcow2
Hostname pmx3.lab.int
- hostnamectl set-hostname pmx3.lab.int
IP ändern auf 10.0.10.203
- vi /etc/network/interfaces
- reboot
Proxmox Stufe 2
- Folgendes muss auf allen 3 pmx seperat gemacht werden.
- apt install proxmox-ve postfix open-iscsi chrony
- apt remove linux-image-amd64 'linux-image-6.1*' os-prober -y
Wir erstellen den fs2
- Auf Ebene des Hostes
- virt-clone -o fs1 -n fs2 --file /var/lib/libvirt/images/fs2.qcow2
Der fs2
Vorbereitung
- Wir hängen eine 100GB Disk an den Hosts
- Wir hängen eine 80GB Disk an den Hosts
- Wir starten den fs1
- Formatieren mit ext4
- Wir mounten diese in der /etc/fstab nach /share
- mkfs.ext4 /dev/vdb
- mkfs.ext4 /dev/vdc
- mkdir /share
- mkdir /iscsi
- echo "/dev/vdb /share ext4 defaults 0 0" >> /etc/fstab
- echo "/dev/vdc /iscsi ext4 defaults 0 0" >> /etc/fstab
- mount -a
- systemctl daemon-reload
- Wir legen die Verzeichnisse /share/backup und /share/prod an.
- Hostname fs2.lab.int (hostnamectl set-hostname fs2.lab.int)
- IP 10.0.10.210
- Reboot
- apt install nfs-kernel-server
- echo "/share/prod 10.0.10.0/24(rw,sync,no_subtree_check,no_root_squash)" > /etc/exports
- echo "/share/backup 10.0.10.0/24(rw,sync,no_subtree_check,no_root_squash)" >> /etc/exports
- systemctl restart nfs-kernel-server
- Kontrolle vom Hosts als root
- showmount -e 10.0.10.210
Einbinden in die Proxmox Umgebung
- Wir binden die prod als fs2-prod ein mit nfs3 ein.
- Der Content sollte sein Disk Image, ISO Image, Container, Container Template
- Wir binden die backup als fs2-backup ein mit nfs3 ein.
- Der Content sollte sein VZDump Backup File