diff --git a/docs/source/pxe-server.md b/docs/source/pxe-server.md index fa46912..17eb9f3 100644 --- a/docs/source/pxe-server.md +++ b/docs/source/pxe-server.md @@ -16,71 +16,87 @@ In this section you will create a KVM VM for the PXE server, using a Debian `12. ### Procedure -1. Change to root user: +1. Create a new `QCOW2` virtual disk for the VM: ```console - user:~$ sudo su - - root:~# + user:~/kubeflow-on-kvm$ qemu-img create -f qcow2 ~/.local/libvirt/disks/pxe-server.qcow2 32G + Formatting '/home/user/.local/libvirt/disks/pxe-server.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=34359738368 lazy_refcounts=off refcount_bits=16 ``` -1. Navigate to the project's root directory: +1. Define a new VM for the PXE server, using the XML file inside the `infra` directory: ```console - root:~# cd kubeflow-on-kvm + user:~/kubeflow-on-kvm$ virsh define --file infra/pxe-server.xml + Domain 'pxe-server' defined from infra/pxe-server.xml ``` -1. Create a new `QCOW2` virtual disk for the VM: + > **Note**: The `pxe-server.xml` file is a template for the PXE server VM. You can modify it to + > fit your needs. Pay close attention to the sections where you specify the path to the + > `QCOW2` file and the Debian `12.4` ISO. + +1. Start the PXE server VM: ```console - root:~/kubeflow-on-kvm# qemu-img create -f qcow2 /var/lib/libvirt/images/pxe-server.qcow2 32G - Formatting '/var/lib/libvirt/images/pxe-server.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=34359738368 lazy_refcounts=off refcount_bits=16 + user:~/kubeflow-on-kvm/infra$ virsh start pxe-server + Domain 'pxe-server' started ``` -1. Define a new VM for the PXE server, using the XML file inside the `infra` directory: +
+ Troubleshoot + + If you get the following error during the VM start process: + + ```console + error: Failed to start domain 'pxe-server' + error: /usr/lib/qemu/qemu-bridge-helper --use-vnet --br=virbr0 --fd=33: failed to communicate with bridge helper: stderr=failed to parse default acl file `/etc/qemu/bridge.conf' + : Transport endpoint is not connected + ``` + + Make sure you have the following line in your `/etc/qemu/bridge.conf` file: ```console - root:~/kubeflow-on-kvm# cd infra - root:~/kubeflow-on-kvm/infra# virsh define pxe-server.xml - Domain 'pxe-server' defined from pxe-server.xml + allow virbr0 ``` - > **Note**: The `pxe-server.xml` file is a template for the PXE server VM. You can modify it to - > fit your needs. Pay close attention to the sections where you specify the path to the - > `QCOW2` file and the Debian `12.4` ISO. + If the file does not exist, create it and add the line above. -1. Start the PXE server VM: + Also, make sure that the `qemu-bridge-helper` binary has the correct permissions: ```console - root:~/kubeflow-on-kvm/infra# virsh start pxe-server - Domain 'pxe-server' started + user:~/kubeflow-on-kvm/infra$ sudo chmod u+s /usr/local/libexec/qemu-bridge-helper ``` + Then, try to start the VM again. For more information, see the [here](https://wiki.qemu.org/Features/HelperNetworking#Setup). + +
+ 1. Connect to the PXE server VM through the "Virtual Machine Manager" UI and run the Debian installer. The Debian installer will guide you through the installation process. You can use the default settings for most of the options. + > **Note**: We recommend doing a minimal installation of Debian, without any graphical interface. + ### Verify 1. Verify that the PXE server VM is running: ```console - root:~/kubeflow-on-kvm/infra# virsh list --all + user:~/kubeflow-on-kvm$ virsh list --all Id Name State ----------------------------- 1 pxe-server running ``` -1. Change back to your user: - - ```console - root:~/kubeflow-on-kvm/infra# exit - user:~/kubeflow-on-kvm/infra$ - ``` - 1. Verify that you can SSH into the PXE server VM: ```console user:~/kubeflow-on-kvm/infra$ ssh user@pxe-server + The authenticity of host '192.168.122.89 (192.168.122.89)' can't be established. + ED25519 key fingerprint is SHA256:dNnHdISPbUDbtJWqSLDpEdGEO3tGEIQ1TiSrfPxyRHg. + This key is not known by any other names. + Are you sure you want to continue connecting (yes/no/[fingerprint])? yes + Warning: Permanently added '192.168.122.89' (ED25519) to the list of known hosts. + dimpo@192.168.122.89's password: Linux pxe-server 6.1.0-17-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.69-1 (2023-12-30) x86_64 The programs included with the Debian GNU/Linux system are free software; @@ -89,9 +105,8 @@ In this section you will create a KVM VM for the PXE server, using a Debian `12. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. - Last login: Wed Feb 7 16:43:02 2024 from 192.168.1.1 + Last login: Wed Feb 7 18:10:32 2024 ``` > **Note**: Replace `user` with your username and `pxe-server` with the IP address of the PXE > server VM. - diff --git a/infra/pxe-server.xml b/infra/pxe-server.xml index 068de61..08146e0 100644 --- a/infra/pxe-server.xml +++ b/infra/pxe-server.xml @@ -13,13 +13,13 @@ - + - +