I need to determine when my Python script is running in a Xen virtual machine. The VM will be running Linux.
I can't find anything obvious in the platform module. The closest I can get is the appearance of 'xen' in platform.platform()
>>> platform.platform()
'Linux-2.6.18-194.el5xen-x86_64-with-redhat-5.5-Final'
What is the best way to determine this?
Thanks.