kvm
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| kvm [2023/03/16 19:59] – créée pascal | kvm [2023/07/04 10:55] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| ====== Création d'une machine avec KVM ====== | ====== Création d'une machine avec KVM ====== | ||
| + | ===== Mise en place du réseau ===== | ||
| + | ==== / | ||
| + | < | ||
| + | # / | ||
| + | # | ||
| + | # This file contains the names of kernel modules that should be loaded | ||
| + | # at boot time, one per line. Lines beginning with "#" | ||
| + | |||
| + | dummy | ||
| + | </ | ||
| + | ==== / | ||
| + | <file bash> | ||
| + | # Interfaces fictives pour le bridge | ||
| + | iface dummy0 inet manual | ||
| + | |||
| + | # Démarrage non automatique du bridge | ||
| + | #auto lan0 | ||
| + | |||
| + | # Interface/ | ||
| + | iface lan0 inet static | ||
| + | address 192.168.200.254/ | ||
| + | bridge_ports dummy0 | ||
| + | bridge_maxwait 5 | ||
| + | bridge_stp off | ||
| + | bridge_fd 0 | ||
| + | pre-up | ||
| + | post-down /sbin/ip link del dummy0 | ||
| + | </ | ||
| + | ==== Lancement du bridge ==== | ||
| + | <file bash> | ||
| + | # modprobe dummy | ||
| + | </ | ||
| + | < | ||
| + | ifup lan0 | ||
| + | </ | ||
| + | <file bash> | ||
| + | ifconfig lan0 | ||
| + | lan0: flags=4163< | ||
| + | inet 192.168.200.254 | ||
| + | inet6 fe80:: | ||
| + | ether e2: | ||
| + | RX packets 0 bytes 0 (0.0 B) | ||
| + | RX errors 0 dropped 0 overruns 0 frame 0 | ||
| + | TX packets 164 bytes 27842 (27.1 KiB) | ||
| + | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
| + | </ | ||
| + | <file bash> | ||
| + | brctl show | ||
| + | bridge name bridge id STP enabled interfaces | ||
| + | lan0 8000.e2a6f1ceee92 no dummy0 | ||
| + | </ | ||
| + | Le bridge doit être arrêté pour être pris en charge par libvirt | ||
| + | < | ||
| + | ifdown lan0 | ||
| + | </ | ||
| + | ==== Intégration du bridge ==== | ||
| + | <file bash> | ||
| + | virsh net-edit default | ||
| + | </ | ||
| + | <file xml> | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | <forward mode=' | ||
| + | <bridge name=' | ||
| + | <mac address=' | ||
| + | <ip address=' | ||
| + | < | ||
| + | <range start=' | ||
| + | </ | ||
| + | </ip> | ||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | virsh net-start default | ||
| + | </ | ||
| + | < | ||
| + | virsh net-autostart default | ||
| + | </ | ||
| + | < | ||
| + | virsh net-list --all | ||
| + | | ||
| + | ------------------------------------------------------- | ||
| + | | ||
| + | </ | ||
kvm.1678996796.txt.gz · Dernière modification : 2023/07/04 10:55 (modification externe)