public class VM extends Host
Constructor and Description |
---|
VM(Host host,
java.lang.String name)
Create a `basic' VM (i.e.
|
VM(Host host,
java.lang.String name,
int coreAmount) |
VM(Host host,
java.lang.String name,
int ramSize,
int migNetSpeed,
int dpIntensity) |
VM(Host host,
java.lang.String name,
int coreAmount,
int ramSize,
int migNetSpeed,
int dpIntensity)
Create a VM
|
Modifier and Type | Method and Description |
---|---|
static VM[] |
all()
Retrieve the list of all existing VMs
|
void |
destroy()
Shutdown and unref the VM.
|
protected void |
finalize() |
int |
getCoreAmount()
Returns the amount of virtual CPUs provided
|
static VM |
getVMByName(java.lang.String name)
Retrieve a VM from its name
|
int |
isCreated()
Returns whether the given VM is currently suspended
|
int |
isMigrating()
Returns whether the given VM is currently running
|
int |
isRunning()
Returns whether the given VM is currently running
|
int |
isSuspended()
Returns whether the given VM is currently suspended
|
void |
migrate(Host destination)
Change the host on which all processes are running
(pre-copy is implemented)
|
void |
resume()
Immediately resumes the execution of all processes within the given VM
No resume cost occurs.
|
void |
setBound(double bound)
Set a CPU bound for a given VM.
|
void |
shutdown()
Immediately kills all processes within the given VM.
|
void |
start()
start the VM
|
void |
suspend()
Immediately suspend the execution of all processes within the given VM
No suspension cost occurs.
|
currentHost, getAttachedStorage, getByName, getConsumedEnergy, getCoreNumber, getCount, getCurrentPowerPeak, getData, getMountedStorage, getName, getPowerPeakAt, getProperty, getPstate, getPstatesCount, getSpeed, hasData, isOn, off, on, setAsyncMailbox, setData, setProperty, setPstate, toString, updateAllEnergyConsumptions
public VM(Host host, java.lang.String name)
public VM(Host host, java.lang.String name, int coreAmount)
public VM(Host host, java.lang.String name, int ramSize, int migNetSpeed, int dpIntensity)
public VM(Host host, java.lang.String name, int coreAmount, int ramSize, int migNetSpeed, int dpIntensity)
host
- Host nodename
- name of the machineramSize
- size of the RAM that should be allocated (in MBytes)migNetSpeed
- (network bandwith allocated for migrations in MB/s, if you don't know put zero ;))dpIntensity
- (dirty page percentage according to migNetSpeed, [0-100], if you don't know put zero ;))public static VM[] all()
public static VM getVMByName(java.lang.String name)
public void destroy()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public int isCreated()
public int isRunning()
public int isMigrating()
public int isSuspended()
public int getCoreAmount()
public void setBound(double bound)
bound
- in flops/spublic void start()
public void shutdown()
public void migrate(Host destination) throws HostFailureException
HostFailureException
public void suspend()
public void resume()