February 21, 20215 yr Hi, as we have libvirt 6.5, shouldnt it be possible to use hook scripts ? i created the folder /etc/libvirt/hooks/qemu.d/ where the scripts should be executed ordered by name (i only need 1) so in my case i added a script work_gvt.sh, chmod +x, with the following content (also a test output which also doesnt get executed) #!/bin/bash echo "Testrun" > /mnt/cache/testrun.txt if [ $# -ge 3 ]; then if [ $1 = "Work_gvt" -a $2 = "prepare" -a $3 = "begin" ]; then echo "Creating vgpu" echo ee0036c0-8e21-40b2-9f33-8d5c5f6f5f93 > "/sys/devices/pci0000:00/0000:00:02.0/mdev_supported_types/i915-GVTg_V5_8/create" elif [ $1 = "Work_gvt" -a $2 = "release" -a $3 = "end" ]; then echo "removing vgpu" echo 1 > "/sys/devices/pci0000:00/0000:00:02.0/ee0036c0-8e21-40b2-9f33-8d5c5f6f5f93/remove" fi fi so question is, only possible to modify the limetech qemu file to initiate things ... which shouldnt be the goal i d guess. Edited February 21, 20215 yr by alturismo
February 21, 20215 yr Community Expert Hi @alturismo I have a similar requirements for a plugin and have a post in the programming section. qemu in the hooks dir would need to be modified to provide the support you are looking for.
June 20, 20215 yr Community Expert Hi @alturismo working with ljm42 & ich777 on a new suggested hooks file, this my current prototype suggested directory structure. root@computenode:/etc/libvirt/hooks# tree . ├── qemu ├── qemu.d │ ├── #all │ │ ├── prepare │ │ │ └── USB_Manager │ │ ├── start │ │ │ └── VM_Manager │ │ └── stopped │ │ └── USB_Manager -> /etc/libvirt/hooks/qemu.d/#all/prepare/USB_Manager │ ├── Ubuntu │ │ ├── start │ │ └── stopped │ │ └── gvt │ └── Windows 10 test4 │ ├── prepare │ │ └── gvt │ └── release │ └── gvt ├── qemu.old ├── qemu.orig └── qemu_hook_version
August 14, 20214 yr Community Expert On 2/21/2021 at 8:29 AM, alturismo said: /etc/libvirt/hooks/qemu.d/ where the scripts should be executed ordered by name (i only need 1) this works in 6.10 as use for my usb manager plugin
August 14, 20214 yr Author 5 hours ago, SimonF said: this works in 6.10 as use for my usb manager plugin i saw that already, i had my old scripts in there and after 1st boot on 6.10 my gvt-g VM's didnt work, until i figured my old crap was in there thanks for the note anyway
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.