Libvirt: Difference between revisions

Added a note for why you won't find hooks files after switching.
Pigs (talk | contribs)
Configuration: Add default networking section and pci passthrough section
 
Line 41: Line 41:
</nowiki>}}
</nowiki>}}


=== Bridge networking ===
=== Networking ===
 
==== Default networking ====
 
To utilize the default libvirt network, you will need to install the {{nixos:package|dnsmasq}} package. This is required for DNS and DCHP functionality within the network.
 
Once the package is installed, enable and start the default network using the following commands:
 
<syntaxhighlight lang="console">
# virsh net-autostart default
# virsh net-start default
</syntaxhighlight>
 
This will configure the default network to start automatically on boot and immediately activate it.
 
==== Bridge networking ====


Create a XML file called <code>virbr0.xml</code> with the definition of the bridge interface
Create a XML file called <code>virbr0.xml</code> with the definition of the bridge interface
Line 180: Line 195:
systemctl start libvirtd-config.service
systemctl start libvirtd-config.service
</syntaxhighlight>
</syntaxhighlight>
=== PCI Passthrough ===
For detailed instructions on configuring PCI passthrough with libvirt, refer to the [[PCI passthrough]] page.


== Clients ==
== Clients ==