Open Vswitch Projekt VM: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 1: Zeile 1:
= Open vSwitch Lab VM in VirtualBox anlegen =
+
== Open vSwitch Lab VM in VirtualBox anlegen ==
  
 
== Ziel ==
 
== Ziel ==
 
Es soll eine Debian 13 VM mit dem Namen '''ovs-lab''' in VirtualBox erstellt werden.   
 
Es soll eine Debian 13 VM mit dem Namen '''ovs-lab''' in VirtualBox erstellt werden.   
Die VM nutzt den ICH9-Chipsatz, 2 vCPUs, 2 GB RAM, eine 20 GB Festplatte und 8 VirtIO-Netzwerkkarten.
+
Die VM wird aus dem bestehenden Template '''debian-template''' geklont und anschließend mit 18 VirtIO-Netzwerkkarten ausgestattet.
  
 +
* NIC 1–17: interne Netze (eth0–eth16) für den OVS-Switch
 +
* NIC 18: NAT mit SSH-Portforwarding (Konsolen-Port)
  
== Netzwerkadapter (11 VirtIO-NICs) hinzufügen ==
+
== Template klonen ==
;Anlegen
 
 
<pre>
 
<pre>
for k in $(seq 1 18); do
+
vboxmanage clonevm debian-template --name ovs-lab --register
l=$(($k-1))
+
</pre>
vboxmanage modifyvm ovs --nic$k intnet --nictype$k virtio --intnet$k "eth$l" --cableconnected$k on
+
 
vboxmanage modifyvm ovs --nicpromisc$k allow-all
+
== VM anpassen ==
 +
<pre>
 +
vboxmanage modifyvm ovs-lab --cpus 2 --memory 2048 --chipset ich9
 +
</pre>
 +
 
 +
== NIC 1 für die Installation vorbereiten ==
 +
NIC 1 wird temporär auf das interne Netz '''br0''' gesetzt, damit die VM während der Installation erreichbar ist:
 +
<pre>
 +
vboxmanage modifyvm ovs-lab --nic1 intnet --nictype1 virtio --intnet1 "br0" \
 +
    --cableconnected1 on --nicpromisc1 allow-all
 +
</pre>
 +
 
 +
== NICs 2–17 als interne Netze konfigurieren ==
 +
<pre>
 +
for k in $(seq 2 17); do
 +
    l=$(($k-1))
 +
    vboxmanage modifyvm ovs-lab --nic$k intnet --nictype$k virtio \
 +
        --intnet$k "eth$l" --cableconnected$k on --nicpromisc$k allow-all
 
done
 
done
# NIC 18 auf NAT setzen
+
</pre>
vboxmanage modifyvm ovs --nic18 nat --nictype11 virtio --cableconnected11 on
 
 
 
# Portforwarding für SSH einrichten (Host 2222 → Guest 22)
 
vboxmanage modifyvm ovs --natpf18 "ssh,tcp,,2222,,22"
 
  
 +
== NIC 18 als NAT-Konsolen-Port konfigurieren ==
 +
NIC 18 dient als Konsolen-Port (analog zum Konsolen-Port eines echten Switches):
 +
<pre>
 +
vboxmanage modifyvm ovs-lab --nic18 nat --nictype18 virtio --cableconnected18 on
 +
vboxmanage modifyvm ovs-lab --natpf18 "ssh,tcp,,2222,,22"
 +
</pre>
  
 +
== Kontrolle ==
 +
<pre>
 +
vboxmanage showvminfo ovs-lab
 
</pre>
 
</pre>
;Anzeigen
 
*vboxmanage showvminfo ovs-lab
 
  
 
== Ergebnis ==
 
== Ergebnis ==
 
* VM-Name: '''ovs-lab'''
 
* VM-Name: '''ovs-lab'''
* OS: Debian 12 (64-Bit)
+
* OS: Debian 13 (64-Bit)
 
* CPU: 2 vCPUs
 
* CPU: 2 vCPUs
* RAM: 4 GB
+
* RAM: 2 GB
* Disk: 20 GB VDI
 
* Netz: 18 VirtIO-NICs (bridged)
 
 
* Chipsatz: ICH9
 
* Chipsatz: ICH9
 +
* NIC 1: intnet '''br0''' (temporär für Installation)
 +
* NIC 2–17: interne Netze eth1–eth16
 +
* NIC 18: NAT, SSH-Portforwarding Host 2222 → Guest 22 (Konsolen-Port)
  
 
Die VM ist nun bereit für die Debian-Installation.
 
Die VM ist nun bereit für die Debian-Installation.
 +
 +
== Nächste Schritte ==
 +
Nach der Installation:
 +
* NIC 1 von '''br0''' auf '''eth0''' (intnet) umstellen
 +
* OVS-Konfiguration gemäß Artikel [[Open vSwitch als L2-Switch]] durchführen

Version vom 2. Mai 2026, 07:43 Uhr

Open vSwitch Lab VM in VirtualBox anlegen

Ziel

Es soll eine Debian 13 VM mit dem Namen ovs-lab in VirtualBox erstellt werden. Die VM wird aus dem bestehenden Template debian-template geklont und anschließend mit 18 VirtIO-Netzwerkkarten ausgestattet.

  • NIC 1–17: interne Netze (eth0–eth16) für den OVS-Switch
  • NIC 18: NAT mit SSH-Portforwarding (Konsolen-Port)

Template klonen

vboxmanage clonevm debian-template --name ovs-lab --register

VM anpassen

vboxmanage modifyvm ovs-lab --cpus 2 --memory 2048 --chipset ich9

NIC 1 für die Installation vorbereiten

NIC 1 wird temporär auf das interne Netz br0 gesetzt, damit die VM während der Installation erreichbar ist:

vboxmanage modifyvm ovs-lab --nic1 intnet --nictype1 virtio --intnet1 "br0" \
    --cableconnected1 on --nicpromisc1 allow-all

NICs 2–17 als interne Netze konfigurieren

for k in $(seq 2 17); do
    l=$(($k-1))
    vboxmanage modifyvm ovs-lab --nic$k intnet --nictype$k virtio \
        --intnet$k "eth$l" --cableconnected$k on --nicpromisc$k allow-all
done

NIC 18 als NAT-Konsolen-Port konfigurieren

NIC 18 dient als Konsolen-Port (analog zum Konsolen-Port eines echten Switches):

vboxmanage modifyvm ovs-lab --nic18 nat --nictype18 virtio --cableconnected18 on
vboxmanage modifyvm ovs-lab --natpf18 "ssh,tcp,,2222,,22"

Kontrolle

vboxmanage showvminfo ovs-lab

Ergebnis

  • VM-Name: ovs-lab
  • OS: Debian 13 (64-Bit)
  • CPU: 2 vCPUs
  • RAM: 2 GB
  • Chipsatz: ICH9
  • NIC 1: intnet br0 (temporär für Installation)
  • NIC 2–17: interne Netze eth1–eth16
  • NIC 18: NAT, SSH-Portforwarding Host 2222 → Guest 22 (Konsolen-Port)

Die VM ist nun bereit für die Debian-Installation.

Nächste Schritte

Nach der Installation: