Skip to content

Commit

Permalink
Improve instructions for setting up VM to debug MM setup manually
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Martchus committed Dec 12, 2023
1 parent 97f9359 commit 96783ee
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions docs/Networking.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 96783ee

Please sign in to comment.