From 00d97621d3fc1d8fb0f61f9b6f2b3e758b2ce907 Mon Sep 17 00:00:00 2001
From: astro Commands to run after creating a tap interface Defaults to bring the interface up. If you do not want the interface to be automatically created
-at all, just set
- Type:
-strings concatenated with “\n” Default: Example: Declared by: Enable if all your MicroVMs run with a Hypervisor that sends
readiness notification over a VSOCK.microvm.h
-
microvm.host.tapScript
-systemd.services."microvm-tap-interfaces@%i.service".enable = false
-''
- /nix/store/30yhi8slm1993fabx0052whmsv86x3zm-iproute2-6.11.0/bin/ip link set "$id" up
-''
-
-# Attach tap interface to bridge br0, and bring it up
-"/nix/store/30yhi8slm1993fabx0052whmsv86x3zm-iproute2-6.11.0/bin/ip link set \"$id\" master br0 up"
-
-
microvm.host.useNotifySockets
type = "tap"
with more than one CPU core.
When running MicroVMs through the host
module, the tap network
interfaces are created through a systemd service dependency.
Extend the generated script in the guest configuration like this:
+microvm.binScripts.tap-up = lib.mkAfter ''
+ ${lib.getExe' pkgs.iproute2 "ip"} link set dev 'vm-ixp-as11201p' master 'ixp-peering'
+'';
+
type = "macvtap"
MACVTAP interfaces attach to a host's physical network interface, joining the same Ethernet segment with a separate MAC address.
diff --git a/print.html b/print.html index 4de0bcac..2f1d28b1 100644 --- a/print.html +++ b/print.html @@ -300,6 +300,11 @@type = "tap"
with more than one CPU core.
When running MicroVMs through the host
module, the tap network
interfaces are created through a systemd service dependency.
Extend the generated script in the guest configuration like this:
+microvm.binScripts.tap-up = lib.mkAfter ''
+ ${lib.getExe' pkgs.iproute2 "ip"} link set dev 'vm-ixp-as11201p' master 'ixp-peering'
+'';
+
type = "macvtap"
MACVTAP interfaces attach to a host's physical network interface, joining the same Ethernet segment with a separate MAC address.
@@ -1545,28 +1550,6 @@Commands to run after creating a tap interface
-Defaults to bring the interface up.
-If you do not want the interface to be automatically created
-at all, just set
-systemd.services."microvm-tap-interfaces@%i.service".enable = false
Type: -strings concatenated with “\n”
-Default:
-''
- /nix/store/30yhi8slm1993fabx0052whmsv86x3zm-iproute2-6.11.0/bin/ip link set "$id" up
-''
-
-Example:
-# Attach tap interface to bridge br0, and bring it up
-"/nix/store/30yhi8slm1993fabx0052whmsv86x3zm-iproute2-6.11.0/bin/ip link set \"$id\" master br0 up"
-
-
-Declared by:
-Enable if all your MicroVMs run with a Hypervisor that sends readiness notification over a VSOCK.
diff --git a/searchindex.js b/searchindex.js index 17909e61..10f2c05a 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Object.assign(window.search, {"doc_urls":["intro.html#intro","intro.html#compartmentalization","intro.html#the-case-against-containers","intro.html#just-virtual-machines","declaring.html#declaring-nixos-microvms","declaring.html#the-microvm-module","options.html#configuration-options","interfaces.html#network-interfaces","interfaces.html#type--user","interfaces.html#type--tap","interfaces.html#type--macvtap","interfaces.html#type--bridge","shares.html#shares","shares.html#sharing-a-hosts-nixstore","shares.html#writable-nixstore-overlay","devices.html#device-pass-through","devices.html#example-pci-pass-through","devices.html#example-usb-pass-through","devices.html#in-the-guest","devices.html#on-the-host","cpu-emulation.html#cpu-emulation","cpu-emulation.html#defining-an-emulated-nixos-system","output-options.html#microvm-output-options","output-options.html#configure-microvmhypervisor-use-microvmdeclaredrunner","microvm-options.html#microvmballoonmem","microvm-options.html#microvmbinscripts","microvm-options.html#microvmcloud-hypervisorextraargs","microvm-options.html#microvmcpu","microvm-options.html#microvmcrosvmextraargs","microvm-options.html#microvmcrosvmpivotroot","microvm-options.html#microvmdeclaredrunner","microvm-options.html#microvmdevices","microvm-options.html#microvmdevicesbus","microvm-options.html#microvmdevicespath","microvm-options.html#microvmforwardports","microvm-options.html#microvmforwardportsfrom","microvm-options.html#microvmforwardportsguestaddress","microvm-options.html#microvmforwardportsguestport","microvm-options.html#microvmforwardportshostaddress","microvm-options.html#microvmforwardportshostport","microvm-options.html#microvmforwardportsproto","microvm-options.html#microvmgraphicsenable","microvm-options.html#microvmgraphicssocket","microvm-options.html#microvmguestenable","microvm-options.html#microvmhugepagemem","microvm-options.html#microvmhypervisor","microvm-options.html#microvminitrdpath","microvm-options.html#microvminterfaces","microvm-options.html#microvminterfacesbridge","microvm-options.html#microvminterfacesid","microvm-options.html#microvminterfacesmac","microvm-options.html#microvminterfacesmacvtaplink","microvm-options.html#microvminterfacesmacvtapmode","microvm-options.html#microvminterfacestype","microvm-options.html#microvmkernel","microvm-options.html#microvmkernelparams","microvm-options.html#microvmmem","microvm-options.html#microvmprestart","microvm-options.html#microvmprettyprocnames","microvm-options.html#microvmqemuextraargs","microvm-options.html#microvmqemumachine","microvm-options.html#microvmqemumachineopts","microvm-options.html#microvmqemuserialconsole","microvm-options.html#microvmrunner","microvm-options.html#microvmshares","microvm-options.html#microvmsharesmountpoint","microvm-options.html#microvmsharesproto","microvm-options.html#microvmsharessecuritymodel","microvm-options.html#microvmsharessocket","microvm-options.html#microvmsharessource","microvm-options.html#microvmsharestag","microvm-options.html#microvmsocket","microvm-options.html#microvmstoreondisk","microvm-options.html#microvmuser","microvm-options.html#microvmvcpu","microvm-options.html#microvmvirtiofsdextraargs","microvm-options.html#microvmvirtiofsdinodefilehandles","microvm-options.html#microvmvirtiofsdthreadpoolsize","microvm-options.html#microvmvolumes","microvm-options.html#microvmvolumesautocreate","microvm-options.html#microvmvolumesdirect","microvm-options.html#microvmvolumesfstype","microvm-options.html#microvmvolumesimage","microvm-options.html#microvmvolumeslabel","microvm-options.html#microvmvolumesmkfsextraargs","microvm-options.html#microvmvolumesmountpoint","microvm-options.html#microvmvolumesreadonly","microvm-options.html#microvmvolumesserial","microvm-options.html#microvmvolumessize","microvm-options.html#microvmvsockcid","microvm-options.html#microvmwritablestoreoverlay","packages.html#running-a-microvm-as-a-package","packages.html#immediately-running-a-nixosconfiguration","packages.html#add-a-runner-package-to-your-flake","host.html#preparing-a-nixos-host-for-declarative-microvms","host.html#preparing-a-non-flakes-host","simple-network.html#a-simple-network-setup","simple-network.html#a-bridge-to-link-tap-interfaces","simple-network.html#docker-and-systemd-network","simple-network.html#advanced-improving-performance","advanced-network.html#advanced-network-setup","advanced-network.html#a-bridge-to-link-tap-interfaces","advanced-network.html#provide-internet-access-with-nat","advanced-network.html#port-forwarding","host-systemd.html#systemd-services-on-a-microvm-host","host-systemd.html#install-microvm-nameservice","host-systemd.html#microvm-tap-interfacesservice","host-systemd.html#microvm-macvtap-interfacesservice","host-systemd.html#microvm-pci-devicesservice","host-systemd.html#microvm-virtiofsdservice","host-systemd.html#microvmservice","host-systemd.html#microvmstarget","host-options.html#microvmautostart","host-options.html#microvmhostenable","host-options.html#microvmhosttapscript","host-options.html#microvmhostusenotifysockets","host-options.html#microvmstatedir","host-options.html#microvmvms","host-options.html#microvmvmsautostart","host-options.html#microvmvmsconfig","host-options.html#microvmvmsflake","host-options.html#microvmvmsnixpkgs","host-options.html#microvmvmspkgs","host-options.html#microvmvmsrestartifchanged","host-options.html#microvmvmsspecialargs","host-options.html#microvmvmsupdateflake","declarative.html#declarative-microvms","declarative.html#fully-declarative","declarative.html#declarative-deployment","microvm-command.html#imperative-microvm-management-with-the-microvm-command","microvm-command.html#create-a-microvm","microvm-command.html#enabling-microvm-autostart","microvm-command.html#update-a-microvm","microvm-command.html#list-microvms","microvm-command.html#removing-microvms","ssh-deploy.html#deploying-via-ssh","ssh-deploy.html#microvmdeployrebuild","ssh-deploy.html#microvmdeployinstallonhost","ssh-deploy.html#microvmdeploysshswitch","conventions.html#conventions-between-microvm-packages-and-the-host","conventions.html#generating-custom-operating-system-hypervisor-packages","faq.html#frequently-asked-questions","faq.html#are-there-elaborate-example-setups","faq.html#can-i-support-the-development-and-maintenance-of-this-project","faq.html#how-to-centralize-logging-with-journald","faq.html#can-i-build-with-hypervisors-from-the-hosts-nixpkgs-instead-of-the-microvms","faq.html#how-can-i-deploy-imperatively-from-continuous-integration","faq.html#can-i-include-my-hosts--channel-when-building-the-vm","faq.html#how-do-i-let-the-microvm-user-access-block-devices","faq.html#my-virtiofs-shared-sops-nix-runsecrets-disappears-when-the-host-is-updated"],"index":{"documentStore":{"docInfo":{"0":{"body":19,"breadcrumbs":2,"title":1},"1":{"body":64,"breadcrumbs":2,"title":1},"10":{"body":85,"breadcrumbs":6,"title":2},"100":{"body":30,"breadcrumbs":10,"title":3},"101":{"body":103,"breadcrumbs":11,"title":4},"102":{"body":53,"breadcrumbs":11,"title":4},"103":{"body":48,"breadcrumbs":9,"title":2},"104":{"body":13,"breadcrumbs":11,"title":4},"105":{"body":39,"breadcrumbs":10,"title":3},"106":{"body":8,"breadcrumbs":10,"title":3},"107":{"body":8,"breadcrumbs":10,"title":3},"108":{"body":5,"breadcrumbs":10,"title":3},"109":{"body":9,"breadcrumbs":9,"title":2},"11":{"body":26,"breadcrumbs":6,"title":2},"110":{"body":8,"breadcrumbs":8,"title":1},"111":{"body":5,"breadcrumbs":8,"title":1},"112":{"body":19,"breadcrumbs":8,"title":1},"113":{"body":12,"breadcrumbs":8,"title":1},"114":{"body":50,"breadcrumbs":8,"title":1},"115":{"body":25,"breadcrumbs":8,"title":1},"116":{"body":10,"breadcrumbs":8,"title":1},"117":{"body":14,"breadcrumbs":8,"title":1},"118":{"body":10,"breadcrumbs":8,"title":1},"119":{"body":19,"breadcrumbs":8,"title":1},"12":{"body":100,"breadcrumbs":5,"title":1},"120":{"body":13,"breadcrumbs":8,"title":1},"121":{"body":18,"breadcrumbs":8,"title":1},"122":{"body":31,"breadcrumbs":8,"title":1},"123":{"body":22,"breadcrumbs":8,"title":1},"124":{"body":25,"breadcrumbs":8,"title":1},"125":{"body":15,"breadcrumbs":8,"title":1},"126":{"body":44,"breadcrumbs":4,"title":2},"127":{"body":84,"breadcrumbs":4,"title":2},"128":{"body":53,"breadcrumbs":4,"title":2},"129":{"body":15,"breadcrumbs":8,"title":5},"13":{"body":21,"breadcrumbs":7,"title":3},"130":{"body":21,"breadcrumbs":5,"title":2},"131":{"body":13,"breadcrumbs":6,"title":3},"132":{"body":38,"breadcrumbs":5,"title":2},"133":{"body":41,"breadcrumbs":5,"title":2},"134":{"body":29,"breadcrumbs":5,"title":2},"135":{"body":68,"breadcrumbs":9,"title":3},"136":{"body":54,"breadcrumbs":7,"title":1},"137":{"body":32,"breadcrumbs":7,"title":1},"138":{"body":49,"breadcrumbs":7,"title":1},"139":{"body":105,"breadcrumbs":6,"title":5},"14":{"body":65,"breadcrumbs":7,"title":3},"140":{"body":42,"breadcrumbs":7,"title":6},"141":{"body":0,"breadcrumbs":6,"title":3},"142":{"body":14,"breadcrumbs":6,"title":3},"143":{"body":1,"breadcrumbs":7,"title":4},"144":{"body":92,"breadcrumbs":6,"title":3},"145":{"body":18,"breadcrumbs":9,"title":6},"146":{"body":119,"breadcrumbs":7,"title":4},"147":{"body":11,"breadcrumbs":9,"title":6},"148":{"body":23,"breadcrumbs":8,"title":5},"149":{"body":19,"breadcrumbs":11,"title":8},"15":{"body":15,"breadcrumbs":8,"title":3},"16":{"body":21,"breadcrumbs":9,"title":4},"17":{"body":0,"breadcrumbs":9,"title":4},"18":{"body":27,"breadcrumbs":6,"title":1},"19":{"body":37,"breadcrumbs":6,"title":1},"2":{"body":65,"breadcrumbs":4,"title":3},"20":{"body":14,"breadcrumbs":6,"title":2},"21":{"body":122,"breadcrumbs":8,"title":4},"22":{"body":55,"breadcrumbs":7,"title":3},"23":{"body":26,"breadcrumbs":8,"title":4},"24":{"body":29,"breadcrumbs":6,"title":1},"25":{"body":18,"breadcrumbs":6,"title":1},"26":{"body":12,"breadcrumbs":7,"title":2},"27":{"body":19,"breadcrumbs":6,"title":1},"28":{"body":11,"breadcrumbs":6,"title":1},"29":{"body":11,"breadcrumbs":6,"title":1},"3":{"body":39,"breadcrumbs":3,"title":2},"30":{"body":11,"breadcrumbs":6,"title":1},"31":{"body":26,"breadcrumbs":6,"title":1},"32":{"body":11,"breadcrumbs":6,"title":1},"33":{"body":8,"breadcrumbs":6,"title":1},"34":{"body":66,"breadcrumbs":6,"title":1},"35":{"body":31,"breadcrumbs":6,"title":1},"36":{"body":10,"breadcrumbs":6,"title":1},"37":{"body":16,"breadcrumbs":6,"title":1},"38":{"body":9,"breadcrumbs":6,"title":1},"39":{"body":16,"breadcrumbs":6,"title":1},"4":{"body":15,"breadcrumbs":5,"title":3},"40":{"body":11,"breadcrumbs":6,"title":1},"41":{"body":29,"breadcrumbs":6,"title":1},"42":{"body":12,"breadcrumbs":6,"title":1},"43":{"body":12,"breadcrumbs":6,"title":1},"44":{"body":17,"breadcrumbs":6,"title":1},"45":{"body":28,"breadcrumbs":6,"title":1},"46":{"body":12,"breadcrumbs":6,"title":1},"47":{"body":9,"breadcrumbs":6,"title":1},"48":{"body":16,"breadcrumbs":6,"title":1},"49":{"body":8,"breadcrumbs":6,"title":1},"5":{"body":60,"breadcrumbs":4,"title":2},"50":{"body":10,"breadcrumbs":6,"title":1},"51":{"body":12,"breadcrumbs":6,"title":1},"52":{"body":13,"breadcrumbs":6,"title":1},"53":{"body":11,"breadcrumbs":6,"title":1},"54":{"body":16,"breadcrumbs":6,"title":1},"55":{"body":16,"breadcrumbs":6,"title":1},"56":{"body":11,"breadcrumbs":6,"title":1},"57":{"body":13,"breadcrumbs":6,"title":1},"58":{"body":15,"breadcrumbs":6,"title":1},"59":{"body":11,"breadcrumbs":6,"title":1},"6":{"body":95,"breadcrumbs":6,"title":2},"60":{"body":23,"breadcrumbs":6,"title":1},"61":{"body":15,"breadcrumbs":6,"title":1},"62":{"body":13,"breadcrumbs":6,"title":1},"63":{"body":11,"breadcrumbs":6,"title":1},"64":{"body":10,"breadcrumbs":6,"title":1},"65":{"body":9,"breadcrumbs":6,"title":1},"66":{"body":11,"breadcrumbs":6,"title":1},"67":{"body":17,"breadcrumbs":6,"title":1},"68":{"body":12,"breadcrumbs":6,"title":1},"69":{"body":11,"breadcrumbs":6,"title":1},"7":{"body":29,"breadcrumbs":6,"title":2},"70":{"body":9,"breadcrumbs":6,"title":1},"71":{"body":12,"breadcrumbs":6,"title":1},"72":{"body":14,"breadcrumbs":6,"title":1},"73":{"body":12,"breadcrumbs":6,"title":1},"74":{"body":12,"breadcrumbs":6,"title":1},"75":{"body":13,"breadcrumbs":6,"title":1},"76":{"body":37,"breadcrumbs":6,"title":1},"77":{"body":25,"breadcrumbs":6,"title":1},"78":{"body":9,"breadcrumbs":6,"title":1},"79":{"body":13,"breadcrumbs":6,"title":1},"8":{"body":26,"breadcrumbs":6,"title":2},"80":{"body":11,"breadcrumbs":6,"title":1},"81":{"body":11,"breadcrumbs":6,"title":1},"82":{"body":9,"breadcrumbs":6,"title":1},"83":{"body":18,"breadcrumbs":6,"title":1},"84":{"body":12,"breadcrumbs":6,"title":1},"85":{"body":10,"breadcrumbs":6,"title":1},"86":{"body":10,"breadcrumbs":6,"title":1},"87":{"body":13,"breadcrumbs":6,"title":1},"88":{"body":10,"breadcrumbs":6,"title":1},"89":{"body":23,"breadcrumbs":6,"title":1},"9":{"body":55,"breadcrumbs":6,"title":2},"90":{"body":50,"breadcrumbs":6,"title":1},"91":{"body":26,"breadcrumbs":6,"title":3},"92":{"body":9,"breadcrumbs":6,"title":3},"93":{"body":18,"breadcrumbs":7,"title":4},"94":{"body":95,"breadcrumbs":9,"title":5},"95":{"body":16,"breadcrumbs":8,"title":4},"96":{"body":37,"breadcrumbs":10,"title":3},"97":{"body":110,"breadcrumbs":11,"title":4},"98":{"body":41,"breadcrumbs":10,"title":3},"99":{"body":41,"breadcrumbs":10,"title":3}},"docs":{"0":{"body":"microvm.nix is a Flake to run lightweight NixOS virtual machines on NixOS. Starting with the reasons why for the remainder of this chapter, this handbook guides you through the provisioning of MicroVMs on your NixOS machine.","breadcrumbs":"Intro » Intro","id":"0","title":"Intro"},"1":{"body":"NixOS makes running services a breeze. Being able to quickly rollback configuration is a life-saver. Not so much however on systems that are shared by multiple services where maintenance of one affects others. Increase stability by partitioning services into virtual NixOS systems that can be updated individually. microvm.nix can isolate your /nix/store into exactly what is required for the guest's NixOS: the root filesystem is a read-only erofs/squashfs file-systems that include only the binaries of your configuration. Of course, that holds only true until you mount the host's /nix/store as a share for faster build times, or mount the store with a writable overlay for Nix builds inside the VM.","breadcrumbs":"Intro » Compartmentalization","id":"1","title":"Compartmentalization"},"10":{"body":"MACVTAP interfaces attach to a host's physical network interface, joining the same Ethernet segment with a separate MAC address. Before running a MicroVM interactively from a package, do the following steps manually: # Parent interface:\nLINK=eth0\n# MACVTAP interface, as specified under microvm.interfaces.*.id:\nID=microvm1\n# Create the interface\nsudo ip l add link $LINK name $ID type macvtap mode bridge\n# Obtain the interface index number\nIFINDEX=$(cat /sys/class/net/$ID/ifindex)\n# Grant yourself permission\nsudo chown $USER /dev/tap$IFINDEX When running MicroVMs through the host module, the macvtap network interfaces are created through a systemd service dependency. Per interface with type = \"macvtap\", a link attribute with the parent interface, and mode attribute for the MACVTAP filtering mode must be specified.","breadcrumbs":"Declaring MicroVMs » Network interfaces » type = \"macvtap\"","id":"10","title":"type = \"macvtap\""},"100":{"body":"Renting a server in a datacenter usually gets you one IP address. You should not bridge your local VM traffic together with the physical Ethernet uplink port. Instead, setup a bridge only for the Virtual Machines, and provide them with Internet through NAT just like your plastic ADSL router at home.","breadcrumbs":"Preparing a host for declarative MicroVMs » Advanced network setup » Advanced network setup","id":"100","title":"Advanced network setup"},"101":{"body":"Instead of placing MicroVMs directly on a LAN, one can also use a TAP interface to get a virtual Ethernet interface on the host. Although it is possible to assign individual IP configuration to these individual interfaces, let us avoid the additional configuration effort and create a bridge instead: systemd.network = { netdevs.\"10-microvm\".netdevConfig = { Kind = \"bridge\"; Name = \"microvm\"; }; networks.\"10-microvm\" = { matchConfig.Name = \"microvm\"; networkConfig = { DHCPServer = true; IPv6SendRA = true; }; addresses = [ { addressConfig.Address = \"10.0.0.1/24\"; } { addressConfig.Address = \"fd12:3456:789a::1/64\"; } ]; ipv6Prefixes = [ { ipv6PrefixConfig.Prefix = \"fd12:3456:789a::/64\"; } ]; };\n}; # Allow inbound traffic for the DHCP server\nnetworking.firewall.allowedUDPPorts = [ 67 ]; This configuration will hand out IP addresses to clients on the bridge. In practise, better leave out the DHCP server and its state by opting for declarative, versioned configuration instead. Last, the TAP interfaces of MicroVMs shall be attached to this central bridge. Make sure your matchConfig matches just the interfaces you want! systemd.network = { networks.\"11-microvm\" = { matchConfig.Name = \"vm-*\"; # Attach to the bridge that was configured above networkConfig.Bridge = \"microvm\"; };\n};","breadcrumbs":"Preparing a host for declarative MicroVMs » Advanced network setup » A bridge to link TAP interfaces","id":"101","title":"A bridge to link TAP interfaces"},"102":{"body":"IPv4 addresses are exhausted. It is a very common case that you get one public IPv4 address for your machine. The solution is to route your internal virtual machines with Network Address Translation . You might not get a dedicated /64 IPv6 prefix to route to your MicroVMs. NAT works for this address family, too! networking.nat = { enable = true; enableIPv6 = true; # Change this to the interface with upstream Internet access externalInterface = \"eth0\"; internalInterfaces = [ \"microvm\" ];\n}; Check out networking.nat.forwardPorts to make your MicroVM's services available to networks outside your host!","breadcrumbs":"Preparing a host for declarative MicroVMs » Advanced network setup » Provide Internet Access with NAT","id":"102","title":"Provide Internet Access with NAT"},"103":{"body":"Isolating your public Internet services is a great use-case for virtualization. But how does traffic get to you when your MicroVMs have private IP addresses behind NAT? NixOS has got you covered with the networking.nat.forwardPorts option! This example forwards TCP ports 80 (HTTP) and 443 (HTTPS) to other hosts: networking.nat = { enable = true; forwardPorts = [ { proto = \"tcp\"; sourcePort = 80; destination = my-addresses.http-reverse-proxy.ip4; } { proto = \"tcp\"; sourcePort = 443; destination = my-addresses.https-reverse-proxy.ip4; } ];\n};","breadcrumbs":"Preparing a host for declarative MicroVMs » Advanced network setup » Port forwarding","id":"103","title":"Port forwarding"},"104":{"body":"The host nixosModule provides a few systemd services for additional bringup which is not available when running a MicroVM interactively from a package.","breadcrumbs":"Preparing a host for declarative MicroVMs » Host systemd services » systemd services on a MicroVM host","id":"104","title":"systemd services on a MicroVM host"},"105":{"body":"Creates and prepares a subdirectory under /var/lib/microvms for declarative MicroVMs according to the microvm.vms option. If the MicroVM subdirectory under /var/lib/microvms already exists, and the MicroVM is configured to be built from a flake's nixosConfigurations, this systemd unit will be skipped. The reason for this behavior is that it is easier to update with the microvm command instead of restarting all virtual machines on a host when doing nixos-rebuild switch.","breadcrumbs":"Preparing a host for declarative MicroVMs » Host systemd services » install-microvm-${name}.service","id":"105","title":"install-microvm-${name}.service"},"106":{"body":"Creates TAP virtual network interfaces for the user that will run MicroVMs.","breadcrumbs":"Preparing a host for declarative MicroVMs » Host systemd services » microvm-tap-interfaces@.service","id":"106","title":"microvm-tap-interfaces@.service"},"107":{"body":"Creates MACVTAP virtual network interfaces for the user that will run MicroVMs.","breadcrumbs":"Preparing a host for declarative MicroVMs » Host systemd services » microvm-macvtap-interfaces@.service","id":"107","title":"microvm-macvtap-interfaces@.service"},"108":{"body":"Prepares PCI devices for passthrough ( VFIO ).","breadcrumbs":"Preparing a host for declarative MicroVMs » Host systemd services » microvm-pci-devices@.service","id":"108","title":"microvm-pci-devices@.service"},"109":{"body":"Starts a fleet of virtiofsd servers, one for each virtiofs mountpoint in microvm.shares.","breadcrumbs":"Preparing a host for declarative MicroVMs » Host systemd services » microvm-virtiofsd@.service","id":"109","title":"microvm-virtiofsd@.service"},"11":{"body":"This mode lets qemu create a tap interface and attach it to a bridge. The qemu-bridge-helper binary needs to be setup with the proper permissions. See the host module for that. qemu will be run without -sandbox on in order for this contraption to work.","breadcrumbs":"Declaring MicroVMs » Network interfaces » type = \"bridge\"","id":"11","title":"type = \"bridge\""},"110":{"body":"Runs the actual MicroVM through /var/lib/microvms/%i/current/bin/microvm-run where %i is the MicroVM name.","breadcrumbs":"Preparing a host for declarative MicroVMs » Host systemd services » microvm@.service","id":"110","title":"microvm@.service"},"111":{"body":"Depends on the microvm@.service instance for all configured microvm.autostart.","breadcrumbs":"Preparing a host for declarative MicroVMs » Host systemd services » microvms.target","id":"111","title":"microvms.target"},"112":{"body":"MicroVMs to start by default. This includes declarative config.microvm.vms as well as MicroVMs that are managed through the microvm command. Type: list of string Default: [ ] Declared by: microvm.nix/nixos-modules/host/options.nix","breadcrumbs":"Preparing a host for declarative MicroVMs » Host options reference ⚙️ » microvm.autostart","id":"112","title":"microvm.autostart"},"113":{"body":"Whether to enable the microvm.nix host module. Type: boolean Default: true Declared by: microvm.nix/nixos-modules/host/options.nix","breadcrumbs":"Preparing a host for declarative MicroVMs » Host options reference ⚙️ » microvm.host.enable","id":"113","title":"microvm.host.enable"},"114":{"body":"Commands to run after creating a tap interface Defaults to bring the interface up. If you do not want the interface to be automatically created at all, just set systemd.services.\"microvm-tap-interfaces@%i.service\".enable = false Type: strings concatenated with “\\n” Default: '' /nix/store/30yhi8slm1993fabx0052whmsv86x3zm-iproute2-6.11.0/bin/ip link set \"$id\" up\n'' Example: # Attach tap interface to bridge br0, and bring it up\n\"/nix/store/30yhi8slm1993fabx0052whmsv86x3zm-iproute2-6.11.0/bin/ip link set \\\"$id\\\" master br0 up\" Declared by: microvm.nix/nixos-modules/host/options.nix","breadcrumbs":"Preparing a host for declarative MicroVMs » Host options reference ⚙️ » microvm.host.tapScript","id":"114","title":"microvm.host.tapScript"},"115":{"body":"Enable if all your MicroVMs run with a Hypervisor that sends readiness notification over a VSOCK. Danger! If one of your MicroVMs doesn’t do this, its systemd service will not start up successfully! Type: boolean Default: false Declared by: microvm.nix/nixos-modules/host/options.nix","breadcrumbs":"Preparing a host for declarative MicroVMs » Host options reference ⚙️ » microvm.host.useNotifySockets","id":"115","title":"microvm.host.useNotifySockets"},"116":{"body":"Directory that contains the MicroVMs Type: path Default: \"/var/lib/microvms\" Declared by: microvm.nix/nixos-modules/host/options.nix","breadcrumbs":"Preparing a host for declarative MicroVMs » Host options reference ⚙️ » microvm.stateDir","id":"116","title":"microvm.stateDir"},"117":{"body":"The MicroVMs that shall be built declaratively with the host NixOS. Type: attribute set of (submodule) Default: { } Declared by: microvm.nix/nixos-modules/host/options.nix","breadcrumbs":"Preparing a host for declarative MicroVMs » Host options reference ⚙️ » microvm.vms","id":"117","title":"microvm.vms"},"118":{"body":"Add this MicroVM to config.microvm.autostart? Type: boolean Default: true Declared by: microvm.nix/nixos-modules/host/options.nix","breadcrumbs":"Preparing a host for declarative MicroVMs » Host options reference ⚙️ » microvm.vms.