Aufgabe KVM Cluster Lösung
Version vom 23. August 2023, 09:08 Uhr von Thomas.will (Diskussion | Beiträge)
Bridge auf Hostsystem anlegen
- vi /etc/network/interfaces
auto dummy0
iface dummy0 inet manual
pre-up modprobe dummy numdummies=1
auto br1
iface br1 inet static
address 10.9.8.1/24
bridge_ports dummy0
bridge_fd 0
bridge_stp no
up brctl setageing br1 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s 10.9.8.0/24 -o br0 -j MASQUERADE
pre-down iptables -t nat -D POSTROUTING -s 10.9.8.0/24 -o br0 -j MASQUERADE
Aktivieren
- ifup -v dummy0
- ifup -v br1
Kontrolle
- cat /proc/sys/net/ipv4/ip_forward
- iptables -t nat -nvL POSTROUTING
Allgemein
/etc/hosts ergänzen
- Host und ins Template
# Eigene Einträge 10.9.8.1 host.hs02.intern host01 10.9.8.201 kvm1.lab.int kvm1 10.9.8.202 kvm2.lab.int kvm2 10.9.8.209 fs1.lab.int fs1 10.9.8.211 pmx1.lab.int pmx1 10.9.8.212 pmx2.lab.int pmx2
Erste kvm erstellen
/etc/network/interface ändern
# The primary network interface
allow-hotplug enp1s0
#iface enp1s0 inet dhcp
iface enp1s0 inet static
address 10.9.8.100/24
gateway 10.9.8.1
dns-nameservers 152.3.32.1
Erste kvm erstellen
- cd /virtualiserung/qemu-kvm
- virt-clone -o template -n kvm1 --file kvm1