[systemd-devel] [PATCH] detect-virt: detect User-Mode Linux

Lennart Poettering lennart at poettering.net
Mon Jul 15 11:04:51 PDT 2013


On Mon, 15.07.13 19:27, Tomasz Torcz (tomek at pipebreaker.pl) wrote:

> On Mon, Jul 15, 2013 at 10:33:13PM +0530, Ramkumar Ramachandra wrote:
> > In a User-Mode Linux session:
> > 
> >   $ systemd-detect-virt
> >   none
> > 
> > Although it is possible to reliably detect virtualization:
> > 
> >   $ cat /proc/cpuinfo
> >   processor       : 0
> >   vendor_id       : User Mode Linux
> >   model name      : UML
> >   mode            : skas
> >   host            : Linux kytes 3.11.0-rc1-00009-ge5fd680 (...)
> >   bogomips        : 7007.43
> > 
> > So, grep for the string "User Mode Linux" in /proc/cpuinfo, and say
> > "uml" when asked.
> 
>   Could you extend ConditionVirtualization= with ”uml”, also?

That happens implicitly if detect_vm() is updated.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list