VFIO-Tools icon indicating copy to clipboard operation
VFIO-Tools copied to clipboard

hugepages.sh script doesn't handle start[ed]/begin hooks

Open Hamled opened this issue 4 years ago • 3 comments

After upgrading to libvirt 7.0.0 (at least, the version published to Arch's community package repo on 1/20/2021) I started getting errors from the hugepages.sh script. It was trying to call functions for the start/begin and started/begin events.

I'm not sure what has changed as the libvirt docs mention those qemu events being in place for years now, and I never received these errors before.

Creating some empty functions with the appropriate names seems to be working on my machine.

Hamled avatar Jan 31 '21 12:01 Hamled

It turns out this was happening because I had placed the hugepages.sh script directly in the qemu.d directory and had symlinked to it from the usual vm_name/hook_name/state_name directory.

Apparently starting with 6.5.0 any script files in the qemu.d directory will be executed by default. Closing as this is not really a VFIO-Tools issue.

Hamled avatar Jan 31 '21 13:01 Hamled

It is, actually. The qemu.d folder did not exist at the time this hook helper was created, and apparently libvirt 6.5 implements its own qemu.d folder, which is handled exactly as you say: all scripts in it are directly executed. While it does not directly conflict with the hook helper, as the libvirt implementation does not execute files in subfolders, it might be worth changing the name of our folder, or at least document how it now overlaps with Libvirt's own implementation. I'm not gonna have time to change this right away, so if you don't mind, I'm reopening this issue until I (or @ShoelaceMan maybe) get around to fixing it.

SharkWipf avatar Jan 31 '21 13:01 SharkWipf

Excuse me, is the script manager available now?

daiaji avatar Jul 28 '22 10:07 daiaji