Re: [systemd-devel] Bare Metal or VM
On 17/07/2021 12:49, Andrei Borzenkov wrote: On 17.07.2021 03:36, Ed Greshko wrote: Hi, This may be an "uninformed" question since I've not done much with systemd. Is there a way for a service or unit to be aware if the environment is Bare Metal or a Virtual Machine. For example, a unit is triggered by a user logging in as a graphical user. But, I only want the unit's ExecStart to be processed if the environment is a qemu VM. I'd rather not have the process started on Bare Metal since it would be unused. See ConditionVirtualization directive in man systemd.unit. Yes. After knowing what it was called I found it. I blame my 67 years old eyes and feeling bad after Moderna shot. I have tested it in my use case and that is exactly what I needed. Thanks Very Much! ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Bare Metal or VM
On 17.07.2021 03:36, Ed Greshko wrote: > Hi, > > This may be an "uninformed" question since I've not done much with systemd. > > Is there a way for a service or unit to be aware if the environment is > Bare Metal or a Virtual Machine. > > For example, a unit is triggered by a user logging in as a graphical > user. But, I only want the unit's > ExecStart to be processed if the environment is a qemu VM. I'd rather > not have the process started on > Bare Metal since it would be unused. > See ConditionVirtualization directive in man systemd.unit. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Fwd: Bare Metal or VM
On 17/07/2021 08:53, Albert Brox wrote: Forgot the list Thank you very much. I will look into that, and I found the list. Ed ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Fwd: Bare Metal or VM
Forgot the list Forwarded Message Subject:Re: [systemd-devel] Bare Metal or VM Date: Fri, 16 Jul 2021 20:51:50 -0400 From: Albert Brox To: Ed Greshko Hi Ed, please look into using the ConditionVirtualization= directive in your unit. https://www.freedesktop.org/software/systemd/man/systemd.unit.html#ConditionVirtualization= Regards, Albert On 7/16/21 8:36 PM, Ed Greshko wrote: Hi, This may be an "uninformed" question since I've not done much with systemd. Is there a way for a service or unit to be aware if the environment is Bare Metal or a Virtual Machine. For example, a unit is triggered by a user logging in as a graphical user. But, I only want the unit's ExecStart to be processed if the environment is a qemu VM. I'd rather not have the process started on Bare Metal since it would be unused. Thanks, Ed ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Is `kernel-install` called automatically?
On Sat, 17 Jul 2021, Mike Beaton wrote: > > I've managed to get it to be called > automatically on both Fedora and CentOS/Rocky 8 > > Thank you. How? I'm not asking for excruciating detail, just roughly. Your > own scripts, or something in the distribution? On Fedora, the kernel-core RPM's %posttrans scriptlet calls kernel-install directly. See for example: https://src.fedoraproject.org/rpms/kernel/blob/7464e60427be7b6af8d65b8db72db1ef2bb28549/f/kernel.spec#_2608 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Bare Metal or VM
Hi, This may be an "uninformed" question since I've not done much with systemd. Is there a way for a service or unit to be aware if the environment is Bare Metal or a Virtual Machine. For example, a unit is triggered by a user logging in as a graphical user. But, I only want the unit's ExecStart to be processed if the environment is a qemu VM. I'd rather not have the process started on Bare Metal since it would be unused. Thanks, Ed ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Is `kernel-install` called automatically?
> I've managed to get it to be called automatically on both Fedora and CentOS/Rocky 8 Thank you. How? I'm not asking for excruciating detail, just roughly. Your own scripts, or something in the distribution? On Fri, 16 Jul 2021, 13:00 , wrote: > Send systemd-devel mailing list submissions to > systemd-devel@lists.freedesktop.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.freedesktop.org/mailman/listinfo/systemd-devel > or, via email, send a message with subject or body 'help' to > systemd-devel-requ...@lists.freedesktop.org > > You can reach the person managing the list at > systemd-devel-ow...@lists.freedesktop.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of systemd-devel digest..." > Today's Topics: > >1. Re: Is `kernel-install` called automatically? (Ian Pilcher) > > > > -- Forwarded message -- > From: Ian Pilcher > To: systemd-devel@lists.freedesktop.org > Cc: > Bcc: > Date: Thu, 15 Jul 2021 08:58:46 -0500 > Subject: Re: [systemd-devel] Is `kernel-install` called automatically? > On 7/15/21 4:40 AM, Mike Beaton wrote: > > I may not have understood correctly, but it seems that after `bootcl > > install`, `kernel-install` is _not_ called automatically; neither > > initially, nor after any system kernel update. > > > > Is this correct? And if so can anyone help with the reasoning behind > > this or status of this issue? > > > > To clarify: I would have expected that this would be called > > automatically, since (as I understand it) it is part of letting > > systemd-boot actually successfully boot the user's system. > > 'bootctl install' does not call kernel-install. > > Whether or not it's called when an updated kernel is installed is > dependent on the distribution. I've managed to get it to be called > automatically on both Fedora and CentOS/Rocky 8, but I haven't managed > to get it working on CentOS 7. > > -- > > In Soviet Russia, Google searches you! > > > > ___ > systemd-devel mailing list > systemd-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/systemd-devel > ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel