From bbe0b1e942b7610fb168fbc9edd333b3f4bc4b27 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Tue, 6 Jul 2021 15:44:11 +0000 Subject: docs/linux: recommend setting net.ifnames to 0 When net.ifnames is set to 1, syzkaller might not be able to connect to the virtual machines. Add the corresponding recommendations to the documentation as well as a note to the troubleshooting guide. --- docs/linux/troubleshooting.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'docs/linux/troubleshooting.md') diff --git a/docs/linux/troubleshooting.md b/docs/linux/troubleshooting.md index 76f780fa4..3993dc1f6 100644 --- a/docs/linux/troubleshooting.md +++ b/docs/linux/troubleshooting.md @@ -27,6 +27,42 @@ Here are some things to check if there are problems running syzkaller. CONFIG_E1000=y CONFIG_E1000E=y ``` + - If the virtual machine reports that it has "Failed to start Raise network interfaces" or (which + is a consequence of that) syzkaller is unable to connect to the virtual machines, try to disable + the Predictable Network Interface Names mechanism. There are two ways to achieve this: + - Add the following two lines to the kernel configuration file and recompile the kernel. + ``` + CONFIG_CMDLINE_BOOL=y + CONFIG_CMDLINE="net.ifnames=0" + ``` + - Add the following line to the VM's properties inside the syzkaller manager configuration: + ``` + "cmdline": "net.ifnames=0" + ``` + + The resulting configuration may look like this: + ```json + { + "target": "linux/amd64", + "http": "127.0.0.1:56741", + "workdir": "$GOPATH/src/github.com/google/syzkaller/workdir", + "kernel_obj": "$KERNEL", + "image": "$IMAGE/stretch.img", + "sshkey": "$IMAGE/stretch.id_rsa", + "syzkaller": "$GOPATH/src/github.com/google/syzkaller", + "procs": 8, + "type": "qemu", + "vm": { + "count": 4, + "kernel": "$KERNEL/arch/x86/boot/bzImage", + "cmdline": "net.ifnames=0", + "cpu": 2, + "mem": 2048 + } + } + ``` + + This is, however, not guaranteed to work across all virtualization technologies. - Check that the `CONFIG_KCOV` option is available inside the VM: - `ls /sys/kernel/debug # Check debugfs mounted` -- cgit mrf-deployment