how determine if kickstarting a virtual host?

Ed Brown ebrown at lanl.gov
Wed Oct 28 22:33:31 UTC 2009


You guys basically nailed how I set a hardware type variable when a 
system is up and running:

# (two tests here help distinguish xen guest from xen host)
elif grep -q '/dev/mem: mmap: Bad address' $TMP && \
      grep -q xen /proc/version ; then
         hardware_type=XenVirtual
elif grep -q 'Product Name: VMware Virtual Platform' $TMP; then
         hardware_type=VmwareVirtual

where $TMP is a file with the output of dmidecode.  But I don't know for 
sure if these will work in a kickstart environment.

I'm also hoping someone will provide a detection suggestion for the case 
of a fully virtualized KVM guest...

-Ed


Terry McIntyre wrote:
> I am using xen -- got this result:
> 
> dmidecode
> # dmidecode 2.9
> /dev/mem: mmap: Bad address
> 
> -- which may be just as good for my purposes.
> 
> On Wed, Oct 28, 2009 at 3:05 PM, Shabazian, Chip
> <chip.shabazian at bankofamerica.com> wrote:
>> Use dmidecode in the %pre (or %post)
>>
>> Example, if this is Vmware, the following works:
>>
>> dmidecode | grep Manufacturer | head -1 | grep VMware
>> if [ $? = 0 ] ; then
>>        do whatever for vms
>> else
>>        do whatever not for vms
>> fi
>>
>>
>> -----Original Message-----
>> From: kickstart-list-bounces at redhat.com
>> [mailto:kickstart-list-bounces at redhat.com] On Behalf Of Terry McIntyre
>> Sent: Wednesday, October 28, 2009 2:59 PM
>> To: kickstart-list at redhat.com
>> Subject: how determine if kickstarting a virtual host?
>>
>> I'd like to have kickstart.ks behave differently when running on a
>> virtual host.
>>
>> For example, it makes little sense to start the microcode_ctl service
>> on a virtual host; that would be taken care of by the "real" server.
>>
>> How can I reliably detect this?
>>
>> Thanks!
>>
>> --
>> Terry McIntyre
>> terry.mcintyre at gmail.com
>>
>> _______________________________________________
>> Kickstart-list mailing list
>> Kickstart-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/kickstart-list
>>
>> _______________________________________________
>> Kickstart-list mailing list
>> Kickstart-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/kickstart-list
>>
> 
> 
> 




More information about the Kickstart-list mailing list