{"id":26308568,"url":"https://github.com/atahabaki/libvirt-hooks-nushell","last_synced_at":"2026-01-12T10:53:53.729Z","repository":{"id":281730012,"uuid":"944483615","full_name":"atahabaki/libvirt-hooks-nushell","owner":"atahabaki","description":"libvirt hooks but nushell","archived":false,"fork":false,"pushed_at":"2025-03-10T20:52:05.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-03-10T21:31:09.204Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nushell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atahabaki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-07T12:29:09.000Z","updated_at":"2025-03-10T20:52:08.000Z","dependencies_parsed_at":"2025-03-10T21:31:19.511Z","dependency_job_id":"4633092b-3c1b-4c20-8f2e-e6f00bc957dc","html_url":"https://github.com/atahabaki/libvirt-hooks-nushell","commit_stats":null,"previous_names":["atahabaki/libvirt-hooks-nushell"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atahabaki%2Flibvirt-hooks-nushell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atahabaki%2Flibvirt-hooks-nushell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atahabaki%2Flibvirt-hooks-nushell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atahabaki%2Flibvirt-hooks-nushell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atahabaki","download_url":"https://codeload.github.com/atahabaki/libvirt-hooks-nushell/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243719394,"owners_count":20336599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-15T11:00:49.429Z","updated_at":"2026-01-12T10:53:53.720Z","avatar_url":"https://github.com/atahabaki.png","language":"Nushell","funding_links":[],"categories":["Scripts"],"sub_categories":[],"readme":"# libvirt hooks nushell\n\nA conventional and user-friendly Libvirt hook script written in Nushell, offering enhanced flexibility for those who prefer simplicity, laziness and convenience, like myself.\n\n## Distinguishable Features\n\n- Disable Hooking for Specific VMs: You can easily disable the entire hook system for any VM by simply appending specific suffixes to the VM name. If a VM name ends with:\n  - \"-woh\", \"-without-hooks\", \"-nh\", or \"-no-hooks\", hooks will be disabled for that VM.\n- Default Hooks for Simplicity: For users who manage multiple VMs with identical configurations, the default hooks can be enabled automatically. No need to write redundant code!\n- Disable Default Hooks: Disable the default hook system for any VM by appending:\n  - \"-nd\", \"-no-default\", \"-wod\", or \"-without-default\" to the VM name.\n\n## Generic Folder Structure\n\n```\n/etc/libvirt/hooks/\n  - qemu # (main.nu file in this case)\n  - qemu.d # (where your custom hooks go)\n```\n\nBelow is an example folder structure, if you want, you can make them one single script in `/etc/libvirt/hooks/qemu.d/win11vm`, but consider managing command line arguments, you can\nread more about [libvirt hooks here](https://passthroughpo.st/simple-per-vm-libvirt-hooks-with-the-vfio-tools-hook-helper/).\n\n```\n/etc/libvirt/hooks/qemu.d/\n  - win11vm\n    - prepare\n      - begin\n        - 00-reserve-hugepages\n        - 01-isolate-cpus\n        - 02-etc.\n    - stopped\n      - end\n        - 99-release-hugepages\n        - 98-revert-cpus\n        - 97-etc.\n```\n\n## Installation\n\n```\ngit clone https://github.com/atahabaki/libvirt-hooks-nushell/\ncd libvirt-hooks-nushell\nsource toolkit.nu\ninstall\n```\n\nThat's it. The only thing left is configuration, writing the hooks or default-hooks for your own VMs, take care.\n\nAfter install make sure to restart `libvirtd` sytemd service, as below:\n\n```\nsystemctl restart libvirtd\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatahabaki%2Flibvirt-hooks-nushell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatahabaki%2Flibvirt-hooks-nushell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatahabaki%2Flibvirt-hooks-nushell/lists"}