|
|||||||||
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 |
VirtualMachineMXBean |
cloneVM(java.lang.String vmName,
VMCustomizationSpec custSpec,
boolean sync)
Clones the VM |
void |
destroy()
Destroy the VM |
java.lang.String |
getConsole()
Returns the console of the virtual machine (if supported by the driver and exposed by the virtual machine) |
boolean[][] |
getCPUAffinity()
Returns the CPU affinity for each VCPU of the virtual machine The affinity is represented by a matrix indexed by the VCPU number (first array dimension) and by the physical CPU number (second array dimension). |
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 |
ResourceUsage |
getResourceUsage()
Return the current resource usage (CPU, memory, network, disk I/O) for this VM |
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 |
VirtualMachineImageMXBean |
makeTemplate(java.lang.String name,
java.lang.String description,
java.util.Map<java.lang.String,java.lang.String> metadata)
Creates a new VM image out of this virtual machine This operation is allowed only if the VM is not running |
void |
migrate(HostMXBean targetHost,
boolean live)
Migrate the VM to a target host. |
void |
pause()
Pause the VM |
void |
reboot()
Reboot the VM |
void |
resume()
Resume the VM |
void |
setCPUAffinity(boolean[][] affinity)
Sets the CPU affinity for each VCPU of the virtual machine The affinity is represented by a matrix indexed by the VCPU number (first array dimension) and by the physical CPU number (second array dimension). |
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 |
void |
unpause()
Unpause the VM |
Methods inherited from interface org.ow2.jasmine.vmm.api.ManagedResourceMXBean |
---|
getObjectName, getPath |
Method Detail |
---|
java.lang.String getUuid() throws VMMException
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
VMMException
HostMXBean getHostMBean() throws VMMException
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
VMMException
java.lang.String getNameLabel() throws VMMException
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
VMMException
java.lang.String getMacAddress() throws VMMException
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
VMMException
java.lang.String getGuestIpAddress() throws VMMException
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
VMMException
float[] getLoadPerVCPU() throws VMMException
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
VMMException
float getCPULoad() throws VMMException
javax.management.InstanceNotFoundException
VMMException
java.util.Date getStartTime() throws VMMException
javax.management.InstanceNotFoundException
VMMException
long getMemorySizeMB() throws VMMException
javax.management.InstanceNotFoundException
VMMException
void setMemorySizeMB(long size) throws VMMException
size
- target size
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
VMMException
long getMemoryUsedMB() throws VMMException
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
VMMException
ResourceUsage getResourceUsage() throws VMMException
VMMException
int getNumVCPUs() throws VMMException
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
VMMException
void setNumVCPUs(int numVCPUs) throws VMMException
numVCPUs
-
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
VMMException
int getSchedulingCap() throws VMMException
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
VMMException
void setSchedulingCap(int schedulingCap) throws VMMException
schedulingCap
- new cap
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
VMMException
int getSchedulingWeight() throws VMMException
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
VMMException
void setSchedulingWeight(int schedulingWeight) throws VMMException
schedulingWeight
- new weight
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
VMMException
boolean[][] getCPUAffinity() throws VMMException
VMMException
void setCPUAffinity(boolean[][] affinity) throws VMMException
affinity
- the CPU affinity
VMMException
VirtualMachineMXBean.PowerState getState() throws VMMException
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
VMMException
void suspend() throws VMMException, BadVMPowerStateException
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
BadVMPowerStateException
- thrown if the VM is not in the
appropriate state
VMMException
void resume() throws VMMException, BadVMPowerStateException
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
BadVMPowerStateException
- thrown if the VM is not in the
appropriate state
VMMException
void shutdown() throws VMMException, BadVMPowerStateException
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
BadVMPowerStateException
- thrown if the VM is not in the
appropriate state
VMMException
void start() throws VMMException, BadVMPowerStateException
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
BadVMPowerStateException
- thrown if the VM is not in the
appropriate state
VMMException
void pause() throws VMMException, BadVMPowerStateException
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
BadVMPowerStateException
- thrown if the VM is not in the
appropriate state
VMMException
void unpause() throws VMMException, BadVMPowerStateException
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
BadVMPowerStateException
- thrown if the VM is not in the
appropriate state
VMMException
void reboot() throws VMMException, BadVMPowerStateException
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
BadVMPowerStateException
- thrown if the VM is not in the
appropriate state
VMMException
void destroy() throws VMMException
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
VMMException
boolean canLiveMigrateToHost(HostMXBean targetHost) throws VMMException
targetHost
- host on which the VM migration is tested
VMMException
void migrate(HostMXBean targetHost, boolean live) throws 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 VMMException
key
- of the user data to return
VMMException
java.lang.String getConsole() throws VMMException
VMMException
VirtualMachineMXBean cloneVM(java.lang.String vmName, VMCustomizationSpec custSpec, boolean sync) throws InsufficientResourcesException, VMMException
vmName
- name to be given to the new VMcustSpec
- optional customization parameterssync
- if true, the operation is synchronous
javax.management.InstanceNotFoundException
- thrown if the specified MXBean does not
exist
InsufficientResourcesException
- raised if not enough resources are
available to clone the VM
VMMException
VirtualMachineImageMXBean makeTemplate(java.lang.String name, java.lang.String description, java.util.Map<java.lang.String,java.lang.String> metadata) throws InsufficientResourcesException, IllegalOperationException, BadVMPowerStateException, VMMException
name
- name of the imagedescription
- description of the imagemetadata
- metadata to associate with the image
InsufficientResourcesException
- raised if there is not enough
storage capacity for the new image
IllegalOperationException
- raised if the virtual machine is not
connected to this VirtualMachineImageStore
BadVMPowerStateException
- raised if the VM is running
VMMException
- raised if a runtime error occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |