I have a requirement to generate a report which has a column where we need to display whether the product is running on a physical box or a VM. If its running on a VM I need to display its version: something like ESXi 5.1. I am searching for a way to do this from my java code, but haven't been able to find anything yet. Can someone help out please.
Asked
Active
Viewed 30 times
0
-
1Well, cant you set it up using ENV variable and just access it from Java code? – Rafal G. May 10 '16 at 06:44
-
Virtual machines don't generally want to look like virtual machines to the processes running inside them, so you'll need to do something like R4J suggested. – Kayaman May 10 '16 at 06:47
-
I do not have access to the production environment. The product is deployed on the customer site, therefore I need the code to figure out whether its a virtual box or not. I had a similar requirement to get the application server name: tomcat/jboss etc. I could do that using the Servlet config, but for this I am not able to find any solution. One option is that I can add a parameter to the installer where the customer will have to specify whether its a VM or not. But when I suggested this it didn't go down well with the Product management. – Sid May 10 '16 at 06:50
-
Tell your Product Management that you'll be doing some native code hacking then. – Kayaman May 10 '16 at 06:58