danobi / vmtest

Helps run tests in virtual machines
Apache License 2.0
107 stars 14 forks source link

`Could not create '/var/local/run/qemu-ga.pid': Permission denied ` #101

Closed bjackman closed 12 hours ago

bjackman commented 15 hours ago

Running on a Debian Testing system, 6.9 host kernel 6.12 guest kernel, guest config

I started getting the init.sh failing with critical: Could not create '/var/local/run/qemu-ga.pid': Permission denied.

Config looks like this:

[[target]]
name = "x86 mm selftests"
kernel = "arch/x86/boot/bzImage"
kernel_args = "asi=on pti=off"
command = """
./run_vmtests.sh -t cow
cd /mnt/kselftest_install/mm/
"""

IIUC the base 9pfs is my host rootfs, which looks like this (basically looks the same as the /run and /var/run set up by the vmtest init script, except with funny owners on /var/run):

❯❯  ls -l /var/run
lrwxrwxrwx 1 root loas-corp-daemons 4 Sep 23  2020 /var/run -> /run/

❯❯  ls -l / | grep run
drwxr-xr-x   57 root   root                     1780 Dec  3 15:21 run

❯❯  mount | grep run | head -1
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=18565544k,mode=755,inode64)

Just in case, I tried modifying the /run mount opts in the init.sh template to add rw, but no change. I also tried just changing the qemu-qa command to put the pidfile in /tmp but there's a bunch more files it wants to drop in /var/local/run.

I have a patch that fixes this for me which I'll send now, but I think it might be garbage so raising an issue too so the details are recorded...

bjackman commented 15 hours ago

Oh the details I posted of my host system don't actually show the important thing:

❯❯  ls -l /var/local
total 4
drwxr-xr-x 2 root staff 4096 Nov 19 16:27 run/

(Who is staff? I don't know, I don't ask, they seem powerful and mysterious)

danobi commented 13 hours ago

Hm interesting. I'll comment on the PR

bjackman commented 13 hours ago

Running on a Debian Testing system

Oh BTW I forgot to specify this is obviously not exactly true, to be more specific it's gLinux which is mostly the same as Debian Testing.