public interface HypervisorMXBean extends PlatformManagedObject
On some hardware, Hypervisor detection might fail, even if the Hypervisor and Operating System combination is supported. In this case you can set an Environment variable - IBM_JAVA_HYPERVISOR_SETTINGS that forces the JVM to recognize the Hypervisor.
HypervisorMXBean
...
try {
mxbeanName = new ObjectName("com.ibm.virtualization.management:type=Hypervisor");
} catch (MalformedObjectNameException e) {
// Exception Handling
}
try {
MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();
if (true != mbeanServer.isRegistered(mxbeanName)) {
// HypervisorMXBean not registered
}
HypervisorMXBean hypBean = JMX.newMXBeanProxy(mbeanServer, mxbeanName, HypervisorMXBean.class);
} catch (Exception e) {
// Exception Handling
}
Modifier and Type | Method and Description |
---|---|
String |
getVendor()
Returns the vendor of the Hypervisor if running in a virtualized environment.
|
boolean |
isEnvironmentVirtual()
Indicates if the Operating System is running on a Hypervisor or not.
|
getObjectName
boolean isEnvironmentVirtual() throws UnsupportedOperationException, HypervisorInfoRetrievalException
UnsupportedOperationException
- if the underlying Hypervisor is unsupported.HypervisorInfoRetrievalException
- if there is an error during Hypervisor detection.String getVendor()
Eclipse OpenJ9 website.
To raise a bug report or suggest an improvement create an Eclipse OpenJ9 issue.
Copyright © 2001, 2024 IBM Corp. and others.