Detecting xen

Joel Andres Granados jgranado at redhat.com
Wed Jun 4 17:47:50 UTC 2008


Gerrard Geldenhuis wrote:
> Hi
> 
> I have the following in a pre-script to detect whether I am building a
> xen machine:
> 
> set $(list-harddrives)
> 
> vx=$(echo $2|cut -d. -f 1 )
> 
> if [ $vx -lt 5120 ]; then
> 
>         echo 'xen' > /tmp/xen
> 
>  
> 
> etc...

just check for the /proc/xen/capabilities file.

> 
>  
> 
>  
> 
> This makes assumptions based on disk size. 
> 
> This is a fairly safe assumption for us because we control the disk size
> but I was wondering if anybody could suggest a more sure fire robust way
> of detecting whether one is building xen or "normal". For normal builds
> I am using dmidecode which is working very well and I can even use it
> for VMWare builds.
> 
>  
> 
> My aim is to have one kickstart per service type that adjust itself
> according to underlying platform which could be IBM, HP, VMWare or Xen.
> 
>  
> 
> Regards
> 
>  
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list at redhat.com
> https://www.redhat.com/mailman/listinfo/kickstart-list

-- 
Joel Andres Granados
Red Hat / Brno, Czech Republic




More information about the Kickstart-list mailing list