Forum › Forums › Official Releases › antiX-21/22 “Grup Yorum” › CONTRIBUTION: libvirt runit service files
Tagged: libvirt, runit, Virt-Manager
- This topic has 9 replies, 3 voices, and was last updated Apr 21-12:37 pm by techore.
-
AuthorPosts
-
April 19, 2023 at 5:01 pm #105032Member
techore
I created runit service files for libvirt and accompanying services; virtlock and virtlog. I created these for use with Virtual Machine Manager but they are agnostic.
git repo: libvirt-runit
Example service file:
#!/usr/bin/env /lib/runit/invoke-run set -e NAME="libvirtd" DAEMON=/usr/sbin/libvirtd # Exit service if DAEMON is not installed if [ ! -x $DAEMON ]; then exit 161 fi # Start dbus first sv start dbus && sv check dbus || exit 170 # Load defaults [ -f ./conf ] && . ./conf exec 2>&1 exec $DAEMON ${OPTS}April 19, 2023 at 7:44 pm #105039Memberolsztyn
::I created runit service files for libvirt and accompanying services; virtlock and virtlog. I created these for use with Virtual Machine Manager but they are agnostic.
Thank you… Greatly appreciated. Very needed for QEMu/VMM.
Just a question: Is this VM infrastructure now compatible with antiX being libelogind0? It has been some some since I gave up on this for antiX but looking forward to another attempt to implement. I do not recall specific issues I was facing at that time.Live antiX Boot Options (Previously posted by Xecure):
https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersApril 19, 2023 at 10:34 pm #105059Member
techore
::Just a question: Is this VM infrastructure now compatible with antiX being libelogind0?
Good question. I am working on the antix-dwm 22 Release 3 and added a libelogind0 check. Release 3 is using seatd, so.. I will update with the results but give me a day or two. Work is keeping me busy.
—
and,
I still need to resolve the missing network bridge for use with virtual machines versus a NAT. Been a long while since my initial research. If anyone has a solution or recommendation, love to hear it and get another “To Do” item checked off.
- This reply was modified 2 weeks, 5 days ago by techore.
April 19, 2023 at 11:43 pm #105061Memberolsztyn
::Good question. I am working on the antix-dwm 22 Release 3 and added a libelogind0 check. Release 3 is using seatd, so.. I will update with the results but give me a day or two.
Thank you. Any info will be greatly appreciated but no rush for me. Normally I would attempt to put this infrastructure together and see what it entails, but these weeks I will be quite busy preparing for my trip to Europe, so might be unable to dedicate lots of time very soon.
Thanks and regards…Live antiX Boot Options (Previously posted by Xecure):
https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersApril 20, 2023 at 11:29 am #105064Forum Admin
anticapitalista
::apt install virt-manager Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: gir1.2-gtk-vnc-2.0 gir1.2-gtksource-4 gir1.2-libvirt-glib-1.0 libgtk-vnc-2.0-0 libgtksourceview-4-0 libgtksourceview-4-common libgvnc-1.0-0 libvirt-glib-1.0-0 python3-libvirt virtinst Suggested packages: gnome-keyring python3-guestfs virt-viewer python3-argcomplete Recommended packages: libvirt-daemon gir1.2-spiceclientglib-2.0 gir1.2-spiceclientgtk-3.0 libvirt-daemon-system libvirt-clients qemu-utils virt-viewer The following NEW packages will be installed: gir1.2-gtk-vnc-2.0 gir1.2-gtksource-4 gir1.2-libvirt-glib-1.0 libgtk-vnc-2.0-0 libgtksourceview-4-0 libgtksourceview-4-common libgvnc-1.0-0 libvirt-glib-1.0-0 python3-libvirt virt-manager virtinst 0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded. Need to get 2,553 kB of archives. After this operation, 14.4 MB of additional disk space will be used. Do you want to continue? [Y/n] nSo on antiX-22, virt-manager does not require any elogind.
Thanks to @techore for providing runit scripts.
I have a question or two though.
I noticed that your instructions at your gitlab repo says to symlink /etc/sv/* to /etc/runit/runsvdir/default/*
Why?antiX also puts any runit service scripts in /usr/share/runit/sv/
The ones in /etc/sv/ can/should (perhaps) be edited by user and should not be overwritten by any updates.
The ones that get overwritten are the ones in /usr/share/runit/sv/antiX symlinks the runit services in /etc/sv/ to /etc/service/
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
April 20, 2023 at 4:53 pm #105105Member
techore
::I noticed that your instructions at your gitlab repo says to symlink /etc/sv/* to /etc/runit/runsvdir/default/*
Why?I did it based on observing the symlinks in /etc/runit/runsvdir/default/ linking to /etc/sv/. Sounds like I came to the wrong conclusion. 🙂
antiX also puts any runit service scripts in /usr/share/runit/sv/
The ones in /etc/sv/ can/should (perhaps) be edited by user and should not be overwritten by any updates.
The ones that get overwritten are the ones in /usr/share/runit/sv/antiX symlinks the runit services in /etc/sv/ to /etc/service/
@anticapitalista, reading above, I do not understand how to correctly setup antiX runit services. _sorry?_ 🙂
I believe you are recommending to place the service run and a finish(?) files into /usr/share/runit/sv/. Done and on reboot I see no other changes, so there must be more to do. I, also, see the symlinks linking from /etc/services/ and /etc/runit/runsvdir/default/ to /etc/sv/. Do I create those as well with a /log/run?
I appreciate you mentoring me and your time.
April 20, 2023 at 5:40 pm #105109Forum Admin
anticapitalista
::I suggest what you include in /etc/sv/ should also be put in /usr/share/runit/sv
Some runit service files need only run (seatd). Some need run and finish (cron, slimski). Others need run, finish and check (dbus, udevd).
Which needs what is down to trial and error it seems.
I usually try what void linux has./etc/sv/* should be linked to /etc/service/*
/etc/runit/runsvdir/default should pick up what is in /etc/servicePhilosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
April 20, 2023 at 10:57 pm #105126Member
techore
::@anticapitalist, thank you!
I updated the git repo and your additional instructions were very clear. Much appreciated.
April 21, 2023 at 12:25 pm #105143Memberolsztyn
::@anticapitalist, thank you!
I updated the git repo and your additional instructions were very clear. Much appreciated.
Regarding the above quote from @techore, which somehow did not come through as quoted in this post:
I just want to thank you for pursuing this to refining details and anticapitalista for help. After returning from my travel to Europe I will permanently install QEMU/VMM into my flagship antiX image based on antiX 23…
Also I am looking forward to hearing about the NAT/bridge network solution, as I remember running into the same question some time ago when I played with QEMu/VMM, but never had a chance to dig into this. The thing I recall was security setting being a member of libvirt group as part of this. I will play again with these after coming back from Europe in two months or so…- This reply was modified 2 weeks, 3 days ago by olsztyn.
Live antiX Boot Options (Previously posted by Xecure):
https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersApril 21, 2023 at 12:37 pm #105146Member
techore
::Also I am looking forward to hearing about the NAT/bridge network solution, as I remember running into the same question some time ago when I played with QEMu/VMM, but never had a chance to dig into this. The thing I recall was security setting being a member of libvirt group as part of this. I will play again with these after coming back from Europe in two months or so…
Glad that I was able to contribute something back to our community.
On the bridge interface, I just need to take the time out and dig in. It has been on my antiX “To do” list for six months and I’ve done it with RHEL and other Linux distos in the past. Once I get it puzzled out, I will post with instructions. No PM so I’ll @olsztyn to get your attention.
Safe journey!
-
AuthorPosts
- You must be logged in to reply to this topic.