File tree Expand file tree Collapse file tree 3 files changed +9
-24
lines changed Expand file tree Collapse file tree 3 files changed +9
-24
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,14 @@ with more than one CPU core.
45
45
When running MicroVMs through the ` host ` module, the tap network
46
46
interfaces are created through a systemd service dependency.
47
47
48
+ Extend the generated script in the guest configuration like this:
49
+
50
+ ``` nix
51
+ microvm.binScripts.tap-up = lib.mkAfter ''
52
+ ${lib.getExe' pkgs.iproute2 "ip"} link set dev 'vm-ixp-as11201p' master 'ixp-peering'
53
+ '';
54
+ ```
55
+
48
56
## ` type = "macvtap" `
49
57
50
58
* MACVTAP* interfaces attach to a host's physical network interface,
Original file line number Diff line number Diff line change 6
6
let
7
7
inherit ( pkgs ) lib ;
8
8
9
- inherit ( microvmConfig ) hostName virtiofsdScripts tapScripts macvtapScripts ;
9
+ inherit ( microvmConfig ) hostName virtiofsdScripts ;
10
10
11
11
inherit ( import ./. { inherit lib ; } ) createVolumesScript makeMacvtap ;
12
12
inherit ( makeMacvtap {
Original file line number Diff line number Diff line change 22
22
'' ;
23
23
} ;
24
24
25
- host . tapScript = mkOption {
26
- description = ''
27
- Commands to run after creating a tap interface
28
-
29
- Defaults to bring the interface up.
30
-
31
- If you do not want the interface to be automatically created
32
- at all, just set
33
- `systemd.services."microvm-tap-interfaces@%i.service".enable = false`
34
- '' ;
35
- example = lib . literalExpression ''
36
- # Attach tap interface to bridge br0, and bring it up
37
- "${ pkgs . iproute2 } /bin/ip link set \"$id\" master br0 up"
38
- '' ;
39
- type = types . lines ;
40
- default = ''
41
- ${ pkgs . iproute2 } /bin/ip link set "$id" up
42
- '' ;
43
- defaultText = ''
44
- ${ pkgs . iproute2 } /bin/ip link set "$id" up
45
- '' ;
46
- } ;
47
-
48
25
vms = mkOption {
49
26
type = with types ; attrsOf ( submodule ( { config , name , ... } : {
50
27
options = {
You can’t perform that action at this time.
0 commit comments