|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface VirtualMachineMXBean
Management interface of a virtual machine. The ObjectName for identifying a VirtualMachineMXBean follows the following template:
org.ow2.jasmine.vmm.api:type=VirtualMachine,name=<pathname>,uuid=<uuid>
The notifications that can be emitted by a HostMXBean are as follows
| Nested Class Summary | |
|---|---|
static class |
VirtualMachineMXBean.PowerState
Different states of a virtual machine. |
| Method Summary | |
|---|---|
boolean |
canLiveMigrateToHost(HostMXBean targetHost)
Returns true if the VM can be migrated to the given host using live migration |
void |
destroy()
Destroy the VM |
float |
getCPULoad()
Returns the CPU load of the VM |
java.lang.String |
getGuestIpAddress()
Returns the IP addresses of the guest operating system running within the VM. |
HostMXBean |
getHostMBean()
Returns the host this VM resides on |
float[] |
getLoadPerVCPU()
Returns the load per virtual CPU of the VM |
java.lang.String |
getMacAddress()
Returns the MAC addresses of all network interfaces associated with this VM |
long |
getMemorySizeMB()
Returns the memory size in MBytes of the virtual machine |
long |
getMemoryUsedMB()
Returns the amount of memory (in MBytes) used by the virtual machine |
java.lang.String |
getNameLabel()
Returns the name of the virtual machine |
int |
getNumVCPUs()
Returns the number of virtual CPUs assigned to the virtual machine |
int |
getSchedulingCap()
Returns the scheduling cap assigned to the VM |
int |
getSchedulingWeight()
Returns the scheduling weight assigned to the VM |
java.util.Date |
getStartTime()
Returns the start time of the virtual machine |
VirtualMachineMXBean.PowerState |
getState()
Returns the power state of the VM |
java.lang.String |
getUserData(java.lang.String key)
Returns user data associated with the specified key |
java.lang.String |
getUuid()
Returns the Uuid of the virtual machine |
void |
makeTemplate(java.lang.String vmImageID,
java.lang.String name,
java.lang.String description)
Makes a VM image template from this VM |
void |
migrate(HostMXBean targetHost,
boolean live)
Migrate the VM to a target host. |
void |
reboot()
Reboot the VM |
void |
resume()
Resume the VM |
void |
setMemorySizeMB(long size)
Attempts to change the memory sie of the virtual machine |
void |
setNumVCPUs(int numVCPUs)
Changes the number of virtual CPUs assigned to the virtual machine |
void |
setSchedulingCap(int schedulingCap)
Sets the scheduling cap assigned to the VM |
void |
setSchedulingWeight(int schedulingWeight)
Sets the scheduling cap assigned to the VM |
void |
shutdown()
Shutdown the VM |
void |
start()
Start the VM |
void |
suspend()
Suspend the VM |
| Methods inherited from interface org.ow2.jasmine.vmm.api.ManagedResourceMXBean |
|---|
getObjectName, getPath |
| Method Detail |
|---|
java.lang.String getUuid()
throws javax.management.InstanceNotFoundException
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
HostMXBean getHostMBean()
throws javax.management.InstanceNotFoundException
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
java.lang.String getNameLabel()
throws javax.management.InstanceNotFoundException
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
java.lang.String getMacAddress()
throws javax.management.InstanceNotFoundException
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
java.lang.String getGuestIpAddress()
throws javax.management.InstanceNotFoundException
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
float[] getLoadPerVCPU()
throws javax.management.InstanceNotFoundException
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
float getCPULoad()
throws javax.management.InstanceNotFoundException
javax.management.InstanceNotFoundException
java.util.Date getStartTime()
throws javax.management.InstanceNotFoundException
javax.management.InstanceNotFoundException
long getMemorySizeMB()
throws javax.management.InstanceNotFoundException
javax.management.InstanceNotFoundException
void setMemorySizeMB(long size)
throws javax.management.InstanceNotFoundException
size - target size
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
long getMemoryUsedMB()
throws javax.management.InstanceNotFoundException
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
int getNumVCPUs()
throws javax.management.InstanceNotFoundException
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
void setNumVCPUs(int numVCPUs)
throws javax.management.InstanceNotFoundException
numVCPUs -
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
int getSchedulingCap()
throws javax.management.InstanceNotFoundException
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
void setSchedulingCap(int schedulingCap)
throws javax.management.InstanceNotFoundException
schedulingCap - new cap
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
int getSchedulingWeight()
throws javax.management.InstanceNotFoundException
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
void setSchedulingWeight(int schedulingWeight)
throws javax.management.InstanceNotFoundException
schedulingWeight - new weight
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
VirtualMachineMXBean.PowerState getState()
throws javax.management.InstanceNotFoundException
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
void suspend()
throws javax.management.InstanceNotFoundException,
BadVMPowerStateException
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
BadVMPowerStateException - thrown if the VM is not in the
appropriate state
void resume()
throws javax.management.InstanceNotFoundException,
BadVMPowerStateException
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
BadVMPowerStateException - thrown if the VM is not in the
appropriate state
void shutdown()
throws javax.management.InstanceNotFoundException,
BadVMPowerStateException
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
BadVMPowerStateException - thrown if the VM is not in the
appropriate state
void start()
throws javax.management.InstanceNotFoundException,
BadVMPowerStateException
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
BadVMPowerStateException - thrown if the VM is not in the
appropriate state
void reboot()
throws javax.management.InstanceNotFoundException,
BadVMPowerStateException
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
BadVMPowerStateException - thrown if the VM is not in the
appropriate state
void destroy()
throws javax.management.InstanceNotFoundException
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
existboolean canLiveMigrateToHost(HostMXBean targetHost)
targetHost - host on which the VM migration is tested
void migrate(HostMXBean targetHost,
boolean live)
throws javax.management.InstanceNotFoundException,
IllegalOperationException,
VMMException
targetHost - target host of the migrationlive - if true a live migration will be attempted
javax.management.InstanceNotFoundException - thrown if the specified MXBean does not
exist
IllegalOperationException - thrown if the migration cannot be
performed
VMMException
java.lang.String getUserData(java.lang.String key)
throws javax.management.InstanceNotFoundException
key - of the user data to return
javax.management.InstanceNotFoundException
void makeTemplate(java.lang.String vmImageID,
java.lang.String name,
java.lang.String description)
throws InsufficientResourcesException,
IllegalOperationException,
VMMException
vmImageID - name of the VM image to create
InsufficientResourcesException - thrown if not enough resources are
available
IllegalOperationException
RuntimeVirtException
VMMException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||