blob: 2bf6ae50050bdb0506e25daea514c8b8e8eebd57 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
---
title: "rc_khaganat_project"
date: 2017-02-16T09:14:00
date_display: Feb 16, 2017
---
# Creation and configuration of the bridge interface with archlinux
Debian based system ? no problem => [http://lesaventuresdeyannigdanslemondeit.blogspot.fr/2013/03/mise-en-place-dun-bridge-sous.html](http://lesaventuresdeyannigdanslemondeit.blogspot.fr/2013/03/mise-en-place-dun-bridge-sous.html)
RTFM : [https://wiki.archlinux.org/index.php/Systemd-networkd#Bridge_interface](https://wiki.archlinux.org/index.php/Systemd-networkd#Bridge_interface)
## Bridge interface
Create a virtual bridge interface `/etc/systemd/network/MyBridge.netdev`
```sh
[NetDev]
Name=br0
Kind=bridge
```
## Bind ethernet to bridge
Modify the `/etc/systemd/network/enp3s0.network` to remove the DHCP, as the bridge requires an interface to bind to with no IP, and add a key to bind this device to br0. Let us change its name to a more relevant one.
```sh
[Match]
Name=en*
[Network]
Bridge=br0
```
## Bridge network
Create a network profile for the Bridge `/etc/systemd/network/MyBridge.network`
```sh
[Match]
Name=br0
[Network]
DHCP=ipv4
```
Finnaly restart `systemd-networkd.service`
# Qemu config for use bridge
RTFM : [https://wiki.archlinux.org/index.php/QEMU#Bridged_networking_using_qemu-bridge-helper](https://wiki.archlinux.org/index.php/QEMU#Bridged_networking_using_qemu-bridge-helper)
Edit file (if folder not exist, create it) : `/etc/qemu/bridge.conf`
```sh
allow bridge0
```
# Start qemu
RTFM : [https://khaganat.net/wikhan/fr:vm_server](https://khaganat.net/wikhan/fr:vm_server) & [https://khaganat.net/wikhan/fr:readonly:download](https://khaganat.net/wikhan/fr:readonly:download)
My magic command :
```sh
/usr/bin/qemu-system-x86_64 \
-monitor stdio \
-soundhw ac97 \
-machine accel=kvm \
-m 256 \
-cdrom /home/neodarz/Téléchargements/VMdeKhanat/khanat-161115/khanat-161115.vmdk \
-hda /home/neodarz/Téléchargements/VMdeKhanat/khanat-161115/khanat-161115.vmdk \
-boot once=d,menu=off \
-net nic,vlan=0 \
-net user,vlan=0 \
-net nic,vlan=1 \
-net bridge,vlan=1,br=br0 \
-rtc base=localtime \
-name "ryzom core"
```
Some other docs : [https://khaganat.net/wikhan/fr:installer_vm_basique?s\[#documentation_sur_qemu](https://khaganat.net/wikhan/fr:installer_vm_basique?s\[#documentation_sur_qemu)
|