For those that don’t really have time to read the entire blog, I can simply answer as, yes, to the above question. Indeed Java is independent of the underlying hypervisor such as VMware bare metal hypervisor, and the Operating System. But for those folks that want to delve a little more into what this means, please read on.
This question has recently started to surface from customers new to Virtualization, and not so new to Java. Now while the answer to the question posed was candidly obvious, it was a legitimate question to address as it seemed to have been asked a few times.
There is no doubt that Java’s main design tenets are based on a cross-platform language that is Operating Systems independent, so long as there is an Operating System supported underlying runtime. We know this runtime as the Java Virtual Machine (JVM) that has become a permanent fixture of many enterprise application platforms. You could write a Java application and run it on various JVMs on different Operating Systems, and without needing to recompile. Now of course many of VMware’s customers have one vendor targeted JVM in production and wouldn’t have to worry about moving a Java application from one JVM implementation to another, but if they chose to they could easily do it, primarily due to Java’s cross-platform and Operating System independence facilitated by a JVM.
Hence you can conclude that the Java applications don’t really care which JVM is being targeted to run on and hence independent of the specific JVM implementation and Operating System.
NOTE: Of course some of you may say “what about all of the different internal behaviors of one JVM vs. another?” At the end of the day they all adhere to the JVM Spec, and while some JVM Options/(-XX) flags etc. are named differently; they more or less behave in a similar manner. Certainly the differences are not in the language, but in the way the Java process can be optimized with various JVM options passed at the Java command line.)
Fast forward to the infrastructure side of things, VMware ESXi is a bare metal hypervisor that makes it possible to run multiple operating systems on a particular piece of hardware. It alleviates the infrastructure administrators from having to worry about installing one kind of operating system for one piece of hardware vs. another. VMware takes care of making the Operating System run independent of the underlying hardware (bare metal) and hence creating a degree of independence between the Operating System and the bare metal/hardware.
While the answer to the question of “Is Java both OS and Hypervisor Independent?” Is clearly yes, it is so due to two degrees of independence, where the first degree being that of Java’s main tenet of cross platform and OS independence, and then second degree is that of VMware ESXi Hypervisor making the Operating System independent of the hardware that it runs on. In fact when a Java application runs on an Operating System that is in a ESXi based Virtual Machine, ESXi has no notion of knowing it is a Java workload running on the Operating System, making the ESXi hypervisor completely independent of the workload that is running on it – a further testament to this is when you deploy a Java application on a Virtual Machine no Operating System changes are needed due to this independence.
Conversely the JVM doesn’t really know that is running on a Virtual Machine sitting on an ESXi hypervisor, to the JVM the VM appears like any other server, with compute resources (CPUs/RAM etc.) presented to it.
In conclusion so long as the JVM you are using is supported on the Operating System that your applications are running on then there is no need for additional concern and/or dependency for additional support from the downstream virtual machine and ESXi layers. However, should you feel you would like to get additional support when running Java in Virtual Machine on VMware ESXi, you are welcome to submit a support ticket, and we will be glad to help you.
Below diagram illustrates all the layers we discussed in this blog.
As previously mentioned many of our customers have successfully deployed various Java application servers on ESXi based virtual machines in production environments.
Drop me a question, otherwise check out the Enterprise Java Applications on VMware Best Practices Guide: here.
Emad Benjamin, Java and vFabric Solutions Architect