[systemd-devel] Fwd: Bare Metal or VM

Albert Brox albert at exypno.tech
Sat Jul 17 00:53:20 UTC 2021


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 <albert at exypno.tech>
To: 	Ed Greshko <ed.greshko at greshko.com>



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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20210716/3d416c32/attachment.htm>


More information about the systemd-devel mailing list