From 96783eefce6dcf53560737a7ba26650752e7347c Mon Sep 17 00:00:00 2001 From: Marius Kittler Date: Mon, 11 Dec 2023 17:45:36 +0100 Subject: [PATCH] Improve instructions for setting up VM to debug MM setup manually * Use a MAC address in the example that can actually be used but that also does not conflict with the range we assign in os-autoinst for SUT VMs * Ensure that the device is up upfront and combine that with setting the MTU * Make it clear that the tap device must not be used by a SUT-VM at the same time * Wrap lines at 80 characters * See https://progress.opensuse.org/issues/152389 --- docs/Networking.asciidoc | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/docs/Networking.asciidoc b/docs/Networking.asciidoc index 9afd8b00357..9707cc5b7a4 100644 --- a/docs/Networking.asciidoc +++ b/docs/Networking.asciidoc @@ -209,31 +209,37 @@ Also be sure to reboot the worker host to make sure the setup is actually persis ==== Start test VMs manually You may also start VMs manually to verify the setup. -First, download a suitable image and launch a VM in the same way `os-autoinst` would do -for MM jobs: +First, download a suitable image and launch a VM in the same way `os-autoinst` +would do for MM jobs: ``` wget http://download.opensuse.org/tumbleweed/appliances/openSUSE-Tumbleweed-Minimal-VM.x86_64-Cloud.qcow2 qemu-system-x86_64 -m 2048 -enable-kvm -vnc :42 -snapshot \ - -netdev tap,id=qanet0,ifname=tap39,script=no,downscript=no -device virtio-net,netdev=qanet0,mac=00:00:00:00:00:01 \ + -netdev tap,id=qanet0,ifname=tap40,script=no,downscript=no \ + -device virtio-net,netdev=qanet0,mac=52:54:00:13:0b:4a \ openSUSE-Tumbleweed-Minimal-VM.x86_64-Cloud.qcow2 ``` -The image used here is of course just an example. Within the VM configure the network -*like* this (you may need to adjust concrete IP addresses, subnets and interface names): +The image used here is of course just an example. You need to make sure to +assign a unique MAC address (e.g. by adjusting the last two figures in the +example; this will not conflict with MAC addresses used by os-autoinst) and use +a tap device not used at the same time by a SUT-VM. + +Within the VM configure the network *like* this (you may need to adjust concrete +IP addresses, subnets and interface names): ``` +ip link set dev eth0 up mtu 1458 ip a add dev eth0 10.0.2.15/24 ip r add default via 10.0.2.2 -ip link set dev eth0 mtu 1458 echo 'nameserver 8.8.8.8' > /etc/resolv.conf ``` -The MTU is chosen in accordance with what the openSUSE test distribution uses for MM -tests and should be below the MTU set on the Open vSwitch bridge device (e.g. via -`os-autoinst-setup-multi-machine`). +The MTU is chosen in accordance with what the openSUSE test distribution uses +for MM tests and should be below the MTU set on the Open vSwitch bridge device +(e.g. via `os-autoinst-setup-multi-machine`). -After this it should be possible to reach other hosts. You may also launch a 2nd VM to -see whether the VMs can talk to each other. +After this it should be possible to reach other hosts. You may also launch a 2nd +VM to see whether the VMs can talk to each other. === Debugging Open vSwitch Configuration Boot sequence with wicked (version 0.6.23 and newer):