Back openDesk Edu for a sovereign, open-source education â every vote counts.
Vote nowSave products you love by clicking the heart icon.
Complete guide to the LPI DevOps Tools Engineer certification (701-100): exam objectives, study resources, and how it relates to traditional LPI certifications.
Comprehensive deep-dive study guide for the LPIC-3 300 Mixed Environment exam: Samba, LDAP, Kerberos, NFS, PAM, and Winbind integration.
Die PrĂŒfung LPIC-3 304: Virtualization & High Availability umfasst Hardware-Virtualisierung (KVM, Xen), Virtualisierung auf Betriebssystemebene (LXC/LXD), High-Availability-Clustering mit Pacemaker, Block-Level-Replikation mit DRBD, Load Balancing und Cluster-Storage. Dieser Leitfaden bietet eine umfassende Abdeckung jedes einzelnen Lernziels.
KVM (Kernel-based Virtual Machine) verwandelt den Linux-Kernel mithilfe von Hardware-Virtualisierungserweiterungen (Intel VT-x / AMD-V) in einen Typ-1-Hypervisor. QEMU ĂŒbernimmt die GerĂ€teemulation und libvirt bietet die Management-Abstraktion.
grep -E "(vmx|svm)" /proc/cpuinfo
kvm-ok
# List active VMs
virsh list
# List all VMs (including inactive)
virsh list --all
# Get VM details
virsh dominfo vm1
# Start and stop VMs
virsh start vm1
virsh shutdown vm1
virsh destroy vm1 # Force power-off
# VM lifecycle
virsh suspend vm1
virsh resume vm1
virsh reboot vm1
# Create a new VM from ISO
virt-install \
--name vm1 \
--memory 4096 \
--vcpus 2 \
--disk size=50,format=qcow2,bus=virtio \
--cdrom /iso/debian-12.iso \
--network network=default,model=virtio \
--graphics vnc,listen=0.0.0.0 \
--os-variant debian12
# Create VM with existing disk image
virt-install \
--name vm2 \
--memory 8192 \
--vcpus 4 \
--disk /var/lib/libvirt/images/vm2.qcow2,bus=virtio \
--import \
--network bridge=br0,model=virtio \
--os-variant linux
# Unattended installation with --location
virt-install \
--name web1 \
--memory 2048 \
--vcpus 1 \
--disk size=20 \
--location http://deb.debian.org/debian/dists/stable/main/installer-amd64/ \
--extra-args "auto preseed/url=http://web/preseed.cfg"
| Modus | Guest-to-Host | Guest-to-External | Notizen |
|---|---|---|---|
| NAT (Standard) | Ja | Via Masquerading | Integriertes DHCP und DNS |
| Bridged | Ja | Ja (gleiches Netz) | Bridge-Interface erforderlich |
| Isolated | Ja | Nein | Privates virtuelles Netzwerk |
| Passthrough | Ja | Ja (PCI/VFIO) | Direkte GerÀtezuweisung |
# Create a bridge on the host
nmcli con add type bridge ifname br0
nmcli con add type ethernet ifname eno1 master br0
# Attach VM to bridge
virt-install --network bridge=br0 ...
# Create qcow2 disk
qemu-img create -f qcow2 vm1.qcow2 50G
qemu-img create -f qcow2 -b base.qcow2 -F qcow2 vm1.qcow2 # Backing file (thin provisioning)
# Resize disk
qemu-img resize vm1.qcow2 +20G
# Convert disk format
qemu-img convert -f raw -O qcow2 disk.raw disk.qcow2
# Add disk to VM
virsh attach-disk vm1 /var/lib/libvirt/images/data.qcow2 vdb --persistent
virsh detach-disk vm1 vdb --persistent
# Migrate running VM to another host (shared storage)
virsh migrate --live vm1 qemu+ssh://dest-host/system
# Non-shared storage migration with copying
virsh migrate --live --copy-storage-all vm1 qemu+ssh://dest-host/system
# Tunneled migration (encrypted over SSH)
virsh migrate --live --tunnelled vm1 qemu+ssh://dest-host/system
Xen verwendet eine andere Architektur als KVM, mit einer privilegierten Domain 0 (Dom0), die nicht privilegierte DomU-Guests verwaltet.
| Komponente | Rolle |
|---|---|
| Dom0 | Privilegierte Management-Domain (meist Linux) |
| DomU | Nicht privilegierter Guest (PV, HVM oder PVH) |
| Xen Hypervisor | LĂ€uft direkt auf der Hardware, unter Dom0 |
| xl | Xen Management Toolstack (ersetzt xm) |
# List domains
xl list
# Create a PV (para-virtualized) guest
xl create /etc/xen/vm1.cfg
# DomU config: /etc/xen/vm1.cfg
kernel = "/boot/vmlinuz-6.1"
ramdisk = "/boot/initrd.img-6.1"
memory = 2048
name = "vm1"
vcpus = 2
disk = ["phy:/dev/vg_xen/vm1-root,xvda2,w"]
root = "/dev/xvda2"
# Migrate Xen guest
xl migrate vm1 dest-host
# Save and restore
xl save vm1 /tmp/vm1.state
xl restore /tmp/vm1.state
# List containers
lxc-ls -f
# Create a container
lxc-create -t download -n container1 -- --dist debian --release bookworm --arch amd64
# Start and attach
lxc-start -n container1 -d
lxc-attach -n container1
# Execute command in container
lxc-attach -n container1 -- apt update
# Snapshot
lxc-snapshot -n container1
lxc-snapshot -n container1 -L # list snapshots
lxc-snapshot -n container1 -r snap0 # restore
# Initialize LXD
lxd init
# Launch a container
lxc launch ubuntu:24.04 my-container
# List containers
lxc list
# Execute commands
lxc exec my-container -- apt upgrade
# Configure resource limits
lxc config set my-container limits.memory 2GB
lxc config set my-container limits.cpu 2
# File operations
lxc file pull my-container/etc/hosts .
lxc file push hosts my-container/etc/hosts
# Snapshot management
lxc snapshot my-container backup1
lxc restore my-container backup1
# Container images
lxc image list
lxc image copy ubuntu:24.04 local: --alias my-ubuntu
| Feature | LXC/LXD | KVM |
|---|---|---|
| Isolation | Kernel Namespace | Hardware-Virtualisierung |
| Performance | Nahezu nativ | ~95% nativ |
| Kernel | Mit Host geteilt | UnabhÀngig |
| Bootzeit | Millisekunden | Sekunden |
| Anwendungsfall | Microservices, Dev | VollstÀndiges OS, Windows, Sicherheitsisolation |
# Auf allen Nodes installieren
apt-get install pacemaker corosync pcs
pcs host auth node1 node2 -u hacluster
pcs cluster setup mycluster node1 node2
pcs cluster start --all
pcs status crm_mon -1
### Resource Configuration
```bash
# STONITH deaktivieren (nur fĂŒr Lab-Umgebungen â niemals in der Produktion)
pcs property set stonith-enabled=false
# Quorum-Richtlinie festlegen
pcs property set no-quorum-policy=ignore
# Eine virtuelle IP-Ressource erstellen
pcs resource create virtual_ip ocf:heartbeat:IPaddr2 \
ip=10.0.0.100 cidr_netmask=24 \
op monitor interval=10s
# Eine Webserver-Ressourcengruppe erstellen
pcs resource create web_server systemd:nginx \
op monitor interval=30s
pcs resource group add webservice virtual_ip web_server
# Eine Filesystem-Ressource erstellen
pcs resource create web_fs ocf:heartbeat:Filesystem \
device=/dev/drbd0 directory=/var/www fstype=ext4
# Ressourcen-Constraints
pcs constraint colocation add web_fs with drbd_master INFINITY
pcs constraint order drbd_master then web_fs
# IPMI Fencing
pcs stonith create ipmi-fence fence_ipmilan \
pcmk_host_list="node1 node2" \
ipaddr=10.0.0.201 login=admin passwd=secret \
lanplus=1
# Fence-Device prĂŒfen
pcs stonith show ipmi-fence
# Fencing testen
pcs stonith fence node1
# /etc/drbd.d/web.res
resource web {
protocol C;
on node1 {
device /dev/drbd0;
disk /dev/vg_drbd/web-data;
address 10.0.0.1:7788;
}
on node2 {
device /dev/drbd0;
disk /dev/vg_drbd/web-data;
address 10.0.0.2:7788;
}
}
# Metadaten erstellen
drbdadm create-md web
# Ressource aktivieren
drbdadm up web
# Primary festlegen (Erstinstallation â nur auf einem Knoten)
drbdadm primary --force web
# Status anzeigen
drbdadm status
cat /proc/drbd
# Primary-Rolle wechseln
drbdadm primary web
drbdadm secondary web
# Resync nach Split-Brain
drbdadm -- --discard-my-data connect web
| Protocol | Description | Durability |
|---|---|---|
| A | Asynchronous â write acknowledged when local disk write completes | Potential data loss on primary failure |
| B | Semi-synchronous â acknowledged when reaches peer's memory buffer | Data loss only on simultaneous failure |
| C | Synchronous â acknowledged when written to both local and peer disk | Zero data loss |
# /etc/keepalived/keepalived.conf
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 50
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass secret123
}
virtual_ipaddress {
10.0.0.100/24 dev eth0
}
}
virtual_server 10.0.0.100 80 {
delay_loop 6
lb_algo rr
lb_kind NAT
protocol TCP
real_server 10.0.0.10 80 {
weight 1
HTTP_GET {
url { path /health }
}
}
real_server 10.0.0.11 80 {
weight 1
HTTP_GET {
url { path /health }
}
}
}
# Verwaltung
systemctl restart keepalived
ip addr show # Virtuelle IP sollte auf dem Master erscheinen
# /etc/haproxy/haproxy.cfg
global
log /dev/log local0
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
defaults
mode http
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
frontend http-in
bind *:80
default_backend servers
backend servers
balance roundrobin
option httpchk GET /health
server web1 10.0.0.10:80 check weight 10
server web2 10.0.0.11:80 check weight 10
server web3 10.0.0.12:80 check weight 5 backup
# Stats-Interface aktivieren
listen stats
bind *:8080
stats enable
stats uri /
stats auth admin:password
# GFS2 auf gemeinsamem Speicher erstellen
mkfs.gfs2 -p lock_dlm -j 2 -t mycluster:web /dev/drbd0
# Mounten (auf beiden Nodes)
mount /dev/drbd0 /var/www
# GFS2-Verwaltung
gfs2_tool sb /dev/drbd0 all
gfs2_edit -p journal /dev/drbd0
# OCFS2 erstellen
mkfs.ocfs2 --cluster-stack=o2cb --cluster-name=mycluster /dev/sdb1
# Mounten
mount -t ocfs2 /dev/sdb1 /shared
# Verwaltung
o2info --fs /shared
tunefs.ocfs2 -Q "LABEL=shared_data" /dev/sdb1
Bereit, dieses Wissen in die Praxis umzusetzen? Die interaktive LPI-Ăbungsplattform auf courses.graphwiz.ai enthĂ€lt ĂŒber 400 realistische Fragen zu den Zertifizierungen LPIC-1, LPIC-2, LPIC-3 und DevOps Tools Engineer â inklusive Lernmodus, zeitgesteuerten PrĂŒfungen, Domain-Auswertungen, Schwachstellenanalysen und Flashcards mit Spaced Repetition.
Jetzt ĂŒben auf courses.graphwiz.ai â