From 845ed0375bd2602daabf1e23fffcb4a05dfa3adb Mon Sep 17 00:00:00 2001 From: Jared Nielsen Date: Sat, 10 Aug 2024 16:09:18 -0400 Subject: [PATCH 1/6] add prereq snippet --- doc/multi-nic-vm-host-with-bonds-and-vlans.md | 8 +++---- doc/reuse/configure-vm-prerequisites.txt | 10 +++++++++ doc/single-nic-vm-host-with-vlans.md | 21 ++++++------------- doc/single-nic-vm-host.md | 18 +++++----------- 4 files changed, 25 insertions(+), 32 deletions(-) create mode 100644 doc/reuse/configure-vm-prerequisites.txt diff --git a/doc/multi-nic-vm-host-with-bonds-and-vlans.md b/doc/multi-nic-vm-host-with-bonds-and-vlans.md index b486e9475..a98164bd4 100644 --- a/doc/multi-nic-vm-host-with-bonds-and-vlans.md +++ b/doc/multi-nic-vm-host-with-bonds-and-vlans.md @@ -34,7 +34,7 @@ Ensure the following prerequisites are satisfied. - InterVLAN routing, DNS, and DHCP configured - Firewall configured; see [UFW](https://help.ubuntu.com/community/UFW). - +TODO 123 #### Disable netfilter for bridged interfaces To allow communication between the host server, its virtual machines, and the devices in the local VLANs, disable netfilter for bridged interfaces: @@ -154,12 +154,12 @@ Configure Netplan: netplan apply ``` - +TODO 123 ## Configure virtual networks using `virsh` The next step is to configure virtual networks defined for `virsh` domains. This is not necessary, but it makes VM deployment and management easier. - +TODO 123 ### Check networking and delete the default network 1. Check existing virtual networks: @@ -195,7 +195,7 @@ The next step is to configure virtual networks defined for `virsh` domains. This virsh net-list --all ``` - +TODO 23 ### Create bridged networks 1. Create a directory for VM data. For example: diff --git a/doc/reuse/configure-vm-prerequisites.txt b/doc/reuse/configure-vm-prerequisites.txt new file mode 100644 index 000000000..48ac65849 --- /dev/null +++ b/doc/reuse/configure-vm-prerequisites.txt @@ -0,0 +1,10 @@ +## Prerequisites + +Ensure the following prerequisites are satisfied. + +### System + +- Computer with a single network interface card (NIC). +- Ubuntu Server installed. +- KVM and QEMU installed; see [KVM installation](https://help.ubuntu.com/community/KVM/Installation). +- Administrator privileges. \ No newline at end of file diff --git a/doc/single-nic-vm-host-with-vlans.md b/doc/single-nic-vm-host-with-vlans.md index 0c2143899..216b124a4 100644 --- a/doc/single-nic-vm-host-with-vlans.md +++ b/doc/single-nic-vm-host-with-vlans.md @@ -2,18 +2,9 @@ This guide shows how to configure a virtual machine (VM) host using Netplan and the `virsh` interface. The host in this scenario has a single network interface (NIC) and three VLAN networks. +```{include} reuse/configure-vm-prerequisites.txt -## Prerequisites - -Ensure the following prerequisites are satisfied. - - -### System - -- Computer with a single network interface card (NIC). -- Ubuntu Server installed. -- KVM and QEMU installed; see [KVM installation](https://help.ubuntu.com/community/KVM/Installation). -- Administrator privileges. +``` ### Networking @@ -32,7 +23,7 @@ Ensure the following prerequisites are satisfied. - InterVLAN routing, DNS, and DHCP configured - Firewall configured; see [UFW](https://help.ubuntu.com/community/UFW). - +TODO 123 #### Disable netfilter for bridged interfaces To allow communication between the host server, its virtual machines, and the devices in the local VLANs, disable netfilter for bridged interfaces: @@ -135,12 +126,12 @@ Configure Netplan: netplan apply ``` - +TODO 123 ## Configure virtual networks using `virsh` The next step is to configure virtual networks defined for `virsh` domains. This is not necessary, but it makes VM deployment and management easier. - +TODO 123 ### Check networking and delete the default network 1. Check existing virtual networks: @@ -176,7 +167,7 @@ The next step is to configure virtual networks defined for `virsh` domains. This virsh net-list --all ``` - +TODO 23 ### Create bridged networks 1. Create a directory for VM data. For example: diff --git a/doc/single-nic-vm-host.md b/doc/single-nic-vm-host.md index 0519b84ac..b1c9188ca 100644 --- a/doc/single-nic-vm-host.md +++ b/doc/single-nic-vm-host.md @@ -2,17 +2,9 @@ This guide shows how to configure a virtual-machine host using Netplan and the `virsh` interface. The host in this scenario has a single network interface. +```{include} reuse/configure-vm-prerequisites.txt -## Prerequisites - -Ensure the following prerequisites are satisfied. - -### System - -- Computer with a single network interface card (NIC). -- Ubuntu Server installed. -- KVM and QEMU installed; see [KVM installation](https://help.ubuntu.com/community/KVM/Installation). -- Administrator privileges. +``` ### Networking @@ -27,7 +19,7 @@ Ensure the following prerequisites are satisfied. - DNS and DHCP configured - Firewall configured; see [UFW](https://help.ubuntu.com/community/UFW). - +TODO 123 #### Disable netfilter for bridged interfaces To allow communication between the host server, its virtual machines, and the devices in the local VLANs, disable netfilter for bridged interfaces: @@ -96,12 +88,12 @@ Configure Netplan: netplan apply ``` - +TODO 123 ## Configure virtual networks using `virsh` The next step is to configure virtual networks defined for `virsh` domains. This is not necessary, but it makes VM deployment and management easier. - +TODO 123 ### Check networking and delete the default network 1. Check existing virtual networks: From 6d1aaab6b9daa591b2346aab55c9aac98c885783 Mon Sep 17 00:00:00 2001 From: Jared Nielsen Date: Sun, 11 Aug 2024 12:37:27 -0400 Subject: [PATCH 2/6] add disable netfilter snippet --- doc/multi-nic-vm-host-with-bonds-and-vlans.md | 18 ++---------------- doc/reuse/configure-vm-disable-netfilter.txt | 17 +++++++++++++++++ doc/single-nic-vm-host-with-vlans.md | 18 ++---------------- doc/single-nic-vm-host.md | 18 ++---------------- 4 files changed, 23 insertions(+), 48 deletions(-) create mode 100644 doc/reuse/configure-vm-disable-netfilter.txt diff --git a/doc/multi-nic-vm-host-with-bonds-and-vlans.md b/doc/multi-nic-vm-host-with-bonds-and-vlans.md index a98164bd4..f529a31b9 100644 --- a/doc/multi-nic-vm-host-with-bonds-and-vlans.md +++ b/doc/multi-nic-vm-host-with-bonds-and-vlans.md @@ -34,24 +34,10 @@ Ensure the following prerequisites are satisfied. - InterVLAN routing, DNS, and DHCP configured - Firewall configured; see [UFW](https://help.ubuntu.com/community/UFW). -TODO 123 -#### Disable netfilter for bridged interfaces - -To allow communication between the host server, its virtual machines, and the devices in the local VLANs, disable netfilter for bridged interfaces: - -1. Add the following lines to the `/etc/systemctl.conf` configuration file: - - ``` - net.bridge.bridge-nf-call-iptables = 0 - net.bridge.bridge-nf-call-ip6tables = 0 - net.bridge.bridge-nf-call-arptables = 0 - ``` -2. Apply the changes immediately, without rebooting the host. +```{include} reuse/configure-vm-disable-netfilter.txt - ```none - sysctl -p /etc/sysctl.conf - ``` +``` ## Netplan configuration diff --git a/doc/reuse/configure-vm-disable-netfilter.txt b/doc/reuse/configure-vm-disable-netfilter.txt new file mode 100644 index 000000000..a05fc13dd --- /dev/null +++ b/doc/reuse/configure-vm-disable-netfilter.txt @@ -0,0 +1,17 @@ +#### Disable netfilter for bridged interfaces + +To allow communication between the host server, its virtual machines, and the devices in the local VLANs, disable netfilter for bridged interfaces: + +1. Add the following lines to the `/etc/systemctl.conf` configuration file: + + ``` + net.bridge.bridge-nf-call-iptables = 0 + net.bridge.bridge-nf-call-ip6tables = 0 + net.bridge.bridge-nf-call-arptables = 0 + ``` + +2. Apply the changes immediately, without rebooting the host. + + ```none + sysctl -p /etc/sysctl.conf + ``` \ No newline at end of file diff --git a/doc/single-nic-vm-host-with-vlans.md b/doc/single-nic-vm-host-with-vlans.md index 216b124a4..ec862d785 100644 --- a/doc/single-nic-vm-host-with-vlans.md +++ b/doc/single-nic-vm-host-with-vlans.md @@ -23,24 +23,10 @@ This guide shows how to configure a virtual machine (VM) host using Netplan and - InterVLAN routing, DNS, and DHCP configured - Firewall configured; see [UFW](https://help.ubuntu.com/community/UFW). -TODO 123 -#### Disable netfilter for bridged interfaces - -To allow communication between the host server, its virtual machines, and the devices in the local VLANs, disable netfilter for bridged interfaces: - -1. Add the following lines to the `/etc/systemctl.conf` configuration file: - ``` - net.bridge.bridge-nf-call-iptables = 0 - net.bridge.bridge-nf-call-ip6tables = 0 - net.bridge.bridge-nf-call-arptables = 0 - ``` +```{include} reuse/configure-vm-disable-netfilter.txt -2. Apply the changes immediately, without rebooting the host. - - ```none - sysctl -p /etc/sysctl.conf - ``` +``` ## Netplan configuration diff --git a/doc/single-nic-vm-host.md b/doc/single-nic-vm-host.md index b1c9188ca..2f5464bd3 100644 --- a/doc/single-nic-vm-host.md +++ b/doc/single-nic-vm-host.md @@ -19,24 +19,10 @@ This guide shows how to configure a virtual-machine host using Netplan and the ` - DNS and DHCP configured - Firewall configured; see [UFW](https://help.ubuntu.com/community/UFW). -TODO 123 -#### Disable netfilter for bridged interfaces - -To allow communication between the host server, its virtual machines, and the devices in the local VLANs, disable netfilter for bridged interfaces: - -1. Add the following lines to the `/etc/systemctl.conf` configuration file: - ``` - net.bridge.bridge-nf-call-iptables = 0 - net.bridge.bridge-nf-call-ip6tables = 0 - net.bridge.bridge-nf-call-arptables = 0 - ``` +```{include} reuse/configure-vm-disable-netfilter.txt -2. Apply the changes immediately, without rebooting the host. - - ```none - sysctl -p /etc/sysctl.conf - ``` +``` ## Netplan configuration From 39a68504b2bf6869f3682e72efd804cbaaf25b36 Mon Sep 17 00:00:00 2001 From: Jared Nielsen Date: Sun, 11 Aug 2024 13:05:45 -0400 Subject: [PATCH 3/6] add check networking delete default snippet --- doc/multi-nic-vm-host-with-bonds-and-vlans.md | 38 ++---------------- ...ure-vm-check-networking-delete-default.txt | 34 ++++++++++++++++ doc/reuse/configure-vm-using-virsh.txt | 3 ++ doc/single-nic-vm-host-with-vlans.md | 37 ++---------------- doc/single-nic-vm-host.md | 39 ++----------------- 5 files changed, 49 insertions(+), 102 deletions(-) create mode 100644 doc/reuse/configure-vm-check-networking-delete-default.txt create mode 100644 doc/reuse/configure-vm-using-virsh.txt diff --git a/doc/multi-nic-vm-host-with-bonds-and-vlans.md b/doc/multi-nic-vm-host-with-bonds-and-vlans.md index f529a31b9..f17436529 100644 --- a/doc/multi-nic-vm-host-with-bonds-and-vlans.md +++ b/doc/multi-nic-vm-host-with-bonds-and-vlans.md @@ -140,46 +140,16 @@ Configure Netplan: netplan apply ``` -TODO 123 -## Configure virtual networks using `virsh` -The next step is to configure virtual networks defined for `virsh` domains. This is not necessary, but it makes VM deployment and management easier. +```{include} reuse/configure-vm-using-virsh.txt -TODO 123 -### Check networking and delete the default network - -1. Check existing virtual networks: - - ```none - virsh net-list --all - ``` - - There should be one default network as in this example: - - ``` - Name State Autostart Persistent - -------------------------------------------- - default active yes yes - ``` - - If needed, use the `net-info` command to gather more details about the default network: +``` - ``` - virsh net-info default - ``` -2. Remove the default network: +```{include} reuse/configure-vm-check-networking-delete-default.txt - ``` - virsh net-destroy default - virsh net-undefine default - ``` - -3. Check network list to confirm the changes have been applied. There should no networks defined now: +``` - ```none - virsh net-list --all - ``` TODO 23 ### Create bridged networks diff --git a/doc/reuse/configure-vm-check-networking-delete-default.txt b/doc/reuse/configure-vm-check-networking-delete-default.txt new file mode 100644 index 000000000..ea650bdf1 --- /dev/null +++ b/doc/reuse/configure-vm-check-networking-delete-default.txt @@ -0,0 +1,34 @@ +### Check networking and delete the default network + +1. Check existing virtual networks: + + ```none + virsh net-list --all + ``` + + There should be one default network as in this example: + + ``` + Name State Autostart Persistent + -------------------------------------------- + default active yes yes + ``` + + If needed, use the `net-info` command to gather more details about the default network: + + ``` + virsh net-info default + ``` + +2. Remove the default network: + + ``` + virsh net-destroy default + virsh net-undefine default + ``` + +3. Check network list to confirm the changes have been applied. There should no networks defined now: + + ```none + virsh net-list --all + ``` \ No newline at end of file diff --git a/doc/reuse/configure-vm-using-virsh.txt b/doc/reuse/configure-vm-using-virsh.txt new file mode 100644 index 000000000..b739ab7ca --- /dev/null +++ b/doc/reuse/configure-vm-using-virsh.txt @@ -0,0 +1,3 @@ +## Configure virtual networks using `virsh` + +The next step is to configure virtual networks defined for `virsh` domains. This is not necessary, but it makes VM deployment and management easier. \ No newline at end of file diff --git a/doc/single-nic-vm-host-with-vlans.md b/doc/single-nic-vm-host-with-vlans.md index ec862d785..1e445019a 100644 --- a/doc/single-nic-vm-host-with-vlans.md +++ b/doc/single-nic-vm-host-with-vlans.md @@ -112,46 +112,17 @@ Configure Netplan: netplan apply ``` -TODO 123 -## Configure virtual networks using `virsh` -The next step is to configure virtual networks defined for `virsh` domains. This is not necessary, but it makes VM deployment and management easier. -TODO 123 -### Check networking and delete the default network +```{include} reuse/configure-vm-using-virsh.txt -1. Check existing virtual networks: - - ```none - virsh net-list --all - ``` - - There should be one default network as in this example: - - ``` - Name State Autostart Persistent - -------------------------------------------- - default active yes yes - ``` - - If needed, use the `net-info` command to gather more details about the default network: - - ``` - virsh net-info default - ``` +``` -2. Remove the default network: - ``` - virsh net-destroy default - virsh net-undefine default - ``` +```{include} reuse/configure-vm-check-networking-delete-default.txt -3. Check network list to confirm the changes have been applied. There should no networks defined now: +``` - ```none - virsh net-list --all - ``` TODO 23 ### Create bridged networks diff --git a/doc/single-nic-vm-host.md b/doc/single-nic-vm-host.md index 2f5464bd3..3db4fb181 100644 --- a/doc/single-nic-vm-host.md +++ b/doc/single-nic-vm-host.md @@ -74,46 +74,15 @@ Configure Netplan: netplan apply ``` -TODO 123 -## Configure virtual networks using `virsh` -The next step is to configure virtual networks defined for `virsh` domains. This is not necessary, but it makes VM deployment and management easier. +```{include} reuse/configure-vm-using-virsh.txt -TODO 123 -### Check networking and delete the default network - -1. Check existing virtual networks: - - ```none - virsh net-list --all - ``` - - There should be one default network as in this example: - - ``` - Name State Autostart Persistent - -------------------------------------------- - default active yes yes - ``` - - If needed, use the `net-info` command to gather more details about the default network: - - ``` - virsh net-info default - ``` +``` -2. Remove the default network: - ``` - virsh net-destroy default - virsh net-undefine default - ``` +```{include} reuse/configure-vm-check-networking-delete-default.txt -3. Check network list to confirm the changes have been applied. There should no networks defined now: - - ```none - virsh net-list --all - ``` +``` ### Create bridged networks From 91e8277dcc2d5160318b6efa3f3b8b1a9e3032e6 Mon Sep 17 00:00:00 2001 From: Jared Nielsen Date: Sun, 11 Aug 2024 13:12:34 -0400 Subject: [PATCH 4/6] add create bridge network snippet --- doc/multi-nic-vm-host-with-bonds-and-vlans.md | 62 +----------------- .../configure-vm-create-bridged-networks.txt | 60 ++++++++++++++++++ doc/single-nic-vm-host-with-vlans.md | 63 +------------------ 3 files changed, 64 insertions(+), 121 deletions(-) create mode 100644 doc/reuse/configure-vm-create-bridged-networks.txt diff --git a/doc/multi-nic-vm-host-with-bonds-and-vlans.md b/doc/multi-nic-vm-host-with-bonds-and-vlans.md index f17436529..b61c84bdf 100644 --- a/doc/multi-nic-vm-host-with-bonds-and-vlans.md +++ b/doc/multi-nic-vm-host-with-bonds-and-vlans.md @@ -151,64 +151,6 @@ Configure Netplan: ``` -TODO 23 -### Create bridged networks +```{include} reuse/configure-vm-create-bridged-networks.txt -1. Create a directory for VM data. For example: - - ```none - mkdir /mnt/vmstore/ - cd /mnt/vmstore/ - ``` - -2. Define the bridge interface, `br0`, for VLAN1 by creating the `/mnt/vmstore/net-br0.xml` file with the following contents: - - ```xml - - br0 - - - - ``` - -3. Define the bridge interface, `br0-vlan40`, for VLAN40 by creating the `/mnt/vmstore/net-br0-vlan40.xml` file with the following contents: - - ```xml - - br0-vlan40 - - - - ``` - -4. Define the bridge interface, `br0-vlan41`, for VLAN41 by creating the `/mnt/vmstore/net-br0-vlan41.xml` file with the following contents: - - ```xml - - br0-vlan41 - - - - ``` - -5. Enable the virtual (bridged) networks. This consists of three steps (performed for each of the networks): - - 1. Define the network. - 2. Start the network. - 3. Set the network to autostart. - - ``` - virsh net-define net-br0.xml - virsh net-define net-br0-vlan40.xml - virsh net-define net-br0-vlan41.xml - virsh net-start br0 - virsh net-start br0-vlan40 - virsh net-start br0-vlan41 - virsh net-autostart br0 - virsh net-autostart br0-vlan40 - virsh net-autostart br0-vlan41 - ``` - -6. Test the bridged networks. - -Congratulations, the configuration is complete. You can now create a virtual machine, assign the desired network using your preferred VM configuration tool, and run some tests. +``` \ No newline at end of file diff --git a/doc/reuse/configure-vm-create-bridged-networks.txt b/doc/reuse/configure-vm-create-bridged-networks.txt new file mode 100644 index 000000000..70b814d05 --- /dev/null +++ b/doc/reuse/configure-vm-create-bridged-networks.txt @@ -0,0 +1,60 @@ +### Create bridged networks + +1. Create a directory for VM data. For example: + + ```none + mkdir /mnt/vmstore/ + cd /mnt/vmstore/ + ``` + +2. Define the bridge interface, `br0`, for VLAN1 by creating the `/mnt/vmstore/net-br0.xml` file with the following contents: + + ```xml + + br0 + + + + ``` + +3. Define the bridge interface, `br0-vlan40`, for VLAN40 by creating the `/mnt/vmstore/net-br0-vlan40.xml` file with the following contents: + + ```xml + + br0-vlan40 + + + + ``` + +4. Define the bridge interface, `br0-vlan41`, for VLAN41 by creating the `/mnt/vmstore/net-br0-vlan41.xml` file with the following contents: + + ```xml + + br0-vlan41 + + + + ``` + +5. Enable the virtual (bridged) networks. This consists of three steps (performed for each of the networks): + + 1. Define the network. + 2. Start the network. + 3. Set the network to autostart. + + ``` + virsh net-define net-br0.xml + virsh net-define net-br0-vlan40.xml + virsh net-define net-br0-vlan41.xml + virsh net-start br0 + virsh net-start br0-vlan40 + virsh net-start br0-vlan41 + virsh net-autostart br0 + virsh net-autostart br0-vlan40 + virsh net-autostart br0-vlan41 + ``` + +6. Test the bridged networks. + +Congratulations, the configuration is complete. You can now create a virtual machine, assign the desired network using your preferred VM configuration tool, and run some tests. \ No newline at end of file diff --git a/doc/single-nic-vm-host-with-vlans.md b/doc/single-nic-vm-host-with-vlans.md index 1e445019a..c31f0e473 100644 --- a/doc/single-nic-vm-host-with-vlans.md +++ b/doc/single-nic-vm-host-with-vlans.md @@ -113,7 +113,6 @@ Configure Netplan: ``` - ```{include} reuse/configure-vm-using-virsh.txt ``` @@ -124,64 +123,6 @@ Configure Netplan: ``` -TODO 23 -### Create bridged networks - -1. Create a directory for VM data. For example: - - ```none - mkdir /mnt/vmstore/ - cd /mnt/vmstore/ - ``` - -2. Define the bridge interface, `br0`, for VLAN1 by creating the `/mnt/vmstore/net-br0.xml` file with the following contents: - - ```xml - - br0 - - - - ``` - -3. Define the bridge interface, `br0-vlan40`, for VLAN40 by creating the `/mnt/vmstore/net-br0-vlan40.xml` file with the following contents: - - ```xml - - br0-vlan40 - - - - ``` - -4. Define the bridge interface, `br0-vlan41`, for VLAN41 by creating the `/mnt/vmstore/net-br0-vlan41.xml` file with the following contents: - - ```xml - - br0-vlan41 - - - - ``` - -5. Enable the virtual (bridged) networks. This consists of three steps (performed for each of the networks): - - 1. Define the network. - 2. Start the network. - 3. Set the network to autostart. - - ``` - virsh net-define net-br0.xml - virsh net-define net-br0-vlan40.xml - virsh net-define net-br0-vlan41.xml - virsh net-start br0 - virsh net-start br0-vlan40 - virsh net-start br0-vlan41 - virsh net-autostart br0 - virsh net-autostart br0-vlan40 - virsh net-autostart br0-vlan41 - ``` - -6. Test the bridged networks. +```{include} reuse/configure-vm-create-bridged-networks.txt -Congratulations, the configuration is complete. You can now create a virtual machine, assign the desired network using your preferred VM configuration tool, and run some tests. +``` \ No newline at end of file From 241e0c79fb1ec12f91726756ad5fbfcfca961ef9 Mon Sep 17 00:00:00 2001 From: Jared Nielsen Date: Sun, 11 Aug 2024 13:15:56 -0400 Subject: [PATCH 5/6] add system prereq snippet --- doc/multi-nic-vm-host-with-bonds-and-vlans.md | 4 ++-- doc/reuse/configure-vm-prerequisites-system.txt | 6 ++++++ doc/reuse/configure-vm-prerequisites.txt | 9 +-------- doc/single-nic-vm-host-with-vlans.md | 5 +++++ doc/single-nic-vm-host.md | 6 ++++++ 5 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 doc/reuse/configure-vm-prerequisites-system.txt diff --git a/doc/multi-nic-vm-host-with-bonds-and-vlans.md b/doc/multi-nic-vm-host-with-bonds-and-vlans.md index b61c84bdf..099bc86d2 100644 --- a/doc/multi-nic-vm-host-with-bonds-and-vlans.md +++ b/doc/multi-nic-vm-host-with-bonds-and-vlans.md @@ -3,9 +3,9 @@ This guide shows how to configure a virtual machine (VM) host using Netplan and the `virsh` interface. The host in this scenario has four network interface (NICs). The host uses network bonding and three VLAN networks. -## Prerequisites +```{include} reuse/configure-vm-prerequisites.txt -Ensure the following prerequisites are satisfied. +``` ### System diff --git a/doc/reuse/configure-vm-prerequisites-system.txt b/doc/reuse/configure-vm-prerequisites-system.txt new file mode 100644 index 000000000..cf3e9d694 --- /dev/null +++ b/doc/reuse/configure-vm-prerequisites-system.txt @@ -0,0 +1,6 @@ +### System + +- Computer with a single network interface card (NIC). +- Ubuntu Server installed. +- KVM and QEMU installed; see [KVM installation](https://help.ubuntu.com/community/KVM/Installation). +- Administrator privileges. \ No newline at end of file diff --git a/doc/reuse/configure-vm-prerequisites.txt b/doc/reuse/configure-vm-prerequisites.txt index 48ac65849..768d45bb6 100644 --- a/doc/reuse/configure-vm-prerequisites.txt +++ b/doc/reuse/configure-vm-prerequisites.txt @@ -1,10 +1,3 @@ ## Prerequisites -Ensure the following prerequisites are satisfied. - -### System - -- Computer with a single network interface card (NIC). -- Ubuntu Server installed. -- KVM and QEMU installed; see [KVM installation](https://help.ubuntu.com/community/KVM/Installation). -- Administrator privileges. \ No newline at end of file +Ensure the following prerequisites are satisfied. \ No newline at end of file diff --git a/doc/single-nic-vm-host-with-vlans.md b/doc/single-nic-vm-host-with-vlans.md index c31f0e473..b977b6b33 100644 --- a/doc/single-nic-vm-host-with-vlans.md +++ b/doc/single-nic-vm-host-with-vlans.md @@ -2,11 +2,16 @@ This guide shows how to configure a virtual machine (VM) host using Netplan and the `virsh` interface. The host in this scenario has a single network interface (NIC) and three VLAN networks. + ```{include} reuse/configure-vm-prerequisites.txt ``` +```{include} reuse/configure-vm-prerequisites-system.txt + +``` + ### Networking - IPv4: diff --git a/doc/single-nic-vm-host.md b/doc/single-nic-vm-host.md index 3db4fb181..5b11115b7 100644 --- a/doc/single-nic-vm-host.md +++ b/doc/single-nic-vm-host.md @@ -2,11 +2,17 @@ This guide shows how to configure a virtual-machine host using Netplan and the `virsh` interface. The host in this scenario has a single network interface. + ```{include} reuse/configure-vm-prerequisites.txt ``` +```{include} reuse/configure-vm-prerequisites-system.txt + +``` + + ### Networking - IPv4: From 1ee2712becaf7453239f4334981fa35d5f2906c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20M=C3=A4rdian?= Date: Tue, 20 Aug 2024 11:41:16 +0200 Subject: [PATCH 6/6] doc: move reuse/*.txt to .md files This is for improved Markdown code highlighting. Also, update the conf.py to ignore/exclude reuse/*.md files. --- doc/conf.py | 1 + doc/multi-nic-vm-host-with-bonds-and-vlans.md | 10 +++++----- ... configure-vm-check-networking-delete-default.md} | 0 ...s.txt => configure-vm-create-bridged-networks.md} | 0 ...tfilter.txt => configure-vm-disable-netfilter.md} | 0 ...stem.txt => configure-vm-prerequisites-system.md} | 0 ...erequisites.txt => configure-vm-prerequisites.md} | 0 ...m-using-virsh.txt => configure-vm-using-virsh.md} | 0 doc/single-nic-vm-host-with-vlans.md | 12 ++++++------ doc/single-nic-vm-host.md | 10 +++++----- 10 files changed, 17 insertions(+), 16 deletions(-) rename doc/reuse/{configure-vm-check-networking-delete-default.txt => configure-vm-check-networking-delete-default.md} (100%) rename doc/reuse/{configure-vm-create-bridged-networks.txt => configure-vm-create-bridged-networks.md} (100%) rename doc/reuse/{configure-vm-disable-netfilter.txt => configure-vm-disable-netfilter.md} (100%) rename doc/reuse/{configure-vm-prerequisites-system.txt => configure-vm-prerequisites-system.md} (100%) rename doc/reuse/{configure-vm-prerequisites.txt => configure-vm-prerequisites.md} (100%) rename doc/reuse/{configure-vm-using-virsh.txt => configure-vm-using-virsh.md} (100%) diff --git a/doc/conf.py b/doc/conf.py index 3f6086596..2e06d63d6 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -305,6 +305,7 @@ 'Thumbs.db', '.DS_Store', '.sphinx', + 'reuse', ] exclude_patterns.extend(custom_excludes) diff --git a/doc/multi-nic-vm-host-with-bonds-and-vlans.md b/doc/multi-nic-vm-host-with-bonds-and-vlans.md index 099bc86d2..76a010ec1 100644 --- a/doc/multi-nic-vm-host-with-bonds-and-vlans.md +++ b/doc/multi-nic-vm-host-with-bonds-and-vlans.md @@ -3,7 +3,7 @@ This guide shows how to configure a virtual machine (VM) host using Netplan and the `virsh` interface. The host in this scenario has four network interface (NICs). The host uses network bonding and three VLAN networks. -```{include} reuse/configure-vm-prerequisites.txt +```{include} reuse/configure-vm-prerequisites.md ``` @@ -35,7 +35,7 @@ This guide shows how to configure a virtual machine (VM) host using Netplan and - Firewall configured; see [UFW](https://help.ubuntu.com/community/UFW). -```{include} reuse/configure-vm-disable-netfilter.txt +```{include} reuse/configure-vm-disable-netfilter.md ``` @@ -141,16 +141,16 @@ Configure Netplan: ``` -```{include} reuse/configure-vm-using-virsh.txt +```{include} reuse/configure-vm-using-virsh.md ``` -```{include} reuse/configure-vm-check-networking-delete-default.txt +```{include} reuse/configure-vm-check-networking-delete-default.md ``` -```{include} reuse/configure-vm-create-bridged-networks.txt +```{include} reuse/configure-vm-create-bridged-networks.md ``` \ No newline at end of file diff --git a/doc/reuse/configure-vm-check-networking-delete-default.txt b/doc/reuse/configure-vm-check-networking-delete-default.md similarity index 100% rename from doc/reuse/configure-vm-check-networking-delete-default.txt rename to doc/reuse/configure-vm-check-networking-delete-default.md diff --git a/doc/reuse/configure-vm-create-bridged-networks.txt b/doc/reuse/configure-vm-create-bridged-networks.md similarity index 100% rename from doc/reuse/configure-vm-create-bridged-networks.txt rename to doc/reuse/configure-vm-create-bridged-networks.md diff --git a/doc/reuse/configure-vm-disable-netfilter.txt b/doc/reuse/configure-vm-disable-netfilter.md similarity index 100% rename from doc/reuse/configure-vm-disable-netfilter.txt rename to doc/reuse/configure-vm-disable-netfilter.md diff --git a/doc/reuse/configure-vm-prerequisites-system.txt b/doc/reuse/configure-vm-prerequisites-system.md similarity index 100% rename from doc/reuse/configure-vm-prerequisites-system.txt rename to doc/reuse/configure-vm-prerequisites-system.md diff --git a/doc/reuse/configure-vm-prerequisites.txt b/doc/reuse/configure-vm-prerequisites.md similarity index 100% rename from doc/reuse/configure-vm-prerequisites.txt rename to doc/reuse/configure-vm-prerequisites.md diff --git a/doc/reuse/configure-vm-using-virsh.txt b/doc/reuse/configure-vm-using-virsh.md similarity index 100% rename from doc/reuse/configure-vm-using-virsh.txt rename to doc/reuse/configure-vm-using-virsh.md diff --git a/doc/single-nic-vm-host-with-vlans.md b/doc/single-nic-vm-host-with-vlans.md index b977b6b33..b1e4dc643 100644 --- a/doc/single-nic-vm-host-with-vlans.md +++ b/doc/single-nic-vm-host-with-vlans.md @@ -3,12 +3,12 @@ This guide shows how to configure a virtual machine (VM) host using Netplan and the `virsh` interface. The host in this scenario has a single network interface (NIC) and three VLAN networks. -```{include} reuse/configure-vm-prerequisites.txt +```{include} reuse/configure-vm-prerequisites.md ``` -```{include} reuse/configure-vm-prerequisites-system.txt +```{include} reuse/configure-vm-prerequisites-system.md ``` @@ -29,7 +29,7 @@ This guide shows how to configure a virtual machine (VM) host using Netplan and - Firewall configured; see [UFW](https://help.ubuntu.com/community/UFW). -```{include} reuse/configure-vm-disable-netfilter.txt +```{include} reuse/configure-vm-disable-netfilter.md ``` @@ -118,16 +118,16 @@ Configure Netplan: ``` -```{include} reuse/configure-vm-using-virsh.txt +```{include} reuse/configure-vm-using-virsh.md ``` -```{include} reuse/configure-vm-check-networking-delete-default.txt +```{include} reuse/configure-vm-check-networking-delete-default.md ``` -```{include} reuse/configure-vm-create-bridged-networks.txt +```{include} reuse/configure-vm-create-bridged-networks.md ``` \ No newline at end of file diff --git a/doc/single-nic-vm-host.md b/doc/single-nic-vm-host.md index 5b11115b7..aca0168f1 100644 --- a/doc/single-nic-vm-host.md +++ b/doc/single-nic-vm-host.md @@ -3,12 +3,12 @@ This guide shows how to configure a virtual-machine host using Netplan and the `virsh` interface. The host in this scenario has a single network interface. -```{include} reuse/configure-vm-prerequisites.txt +```{include} reuse/configure-vm-prerequisites.md ``` -```{include} reuse/configure-vm-prerequisites-system.txt +```{include} reuse/configure-vm-prerequisites-system.md ``` @@ -26,7 +26,7 @@ This guide shows how to configure a virtual-machine host using Netplan and the ` - Firewall configured; see [UFW](https://help.ubuntu.com/community/UFW). -```{include} reuse/configure-vm-disable-netfilter.txt +```{include} reuse/configure-vm-disable-netfilter.md ``` @@ -81,12 +81,12 @@ Configure Netplan: ``` -```{include} reuse/configure-vm-using-virsh.txt +```{include} reuse/configure-vm-using-virsh.md ``` -```{include} reuse/configure-vm-check-networking-delete-default.txt +```{include} reuse/configure-vm-check-networking-delete-default.md ```