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.
4545When running MicroVMs through the ` host ` module, the tap network
4646interfaces are created through a systemd service dependency.
4747
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+
4856## ` type = "macvtap" `
4957
5058* MACVTAP* interfaces attach to a host's physical network interface,
Original file line number Diff line number Diff line change 66let
77 inherit ( pkgs ) lib ;
88
9- inherit ( microvmConfig ) hostName virtiofsdScripts tapScripts macvtapScripts ;
9+ inherit ( microvmConfig ) hostName virtiofsdScripts ;
1010
1111 inherit ( import ./. { inherit lib ; } ) createVolumesScript makeMacvtap ;
1212 inherit ( makeMacvtap {
Original file line number Diff line number Diff line change 2222 '' ;
2323 } ;
2424
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-
4825 vms = mkOption {
4926 type = with types ; attrsOf ( submodule ( { config , name , ... } : {
5027 options = {
You can’t perform that action at this time.
0 commit comments