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 nCore,
int ramSize,
int netCap,
java.lang.String diskPath,
int diskSize,
int migNetSpeed,
int dpIntensity)
Create a VM
|
Modifier and Type | Method and Description |
---|---|
static VM[] |
all() |
void |
finalize() |
static VM |
getVMByName(java.lang.String name) |
void |
internalmig(Host destination)
Invoke native migration routine
|
int |
isCreated()
Returns whether the given VM is currently suspended
|
int |
isMigrating()
Returns whether the given VM is currently running
|
boolean |
isRestoring()
Returns whether the given VM is currently restoring its state
|
int |
isRunning()
Returns whether the given VM is currently running
|
int |
isSaved()
Returns whether the given VM is currently saved
|
int |
isSaving()
Returns whether the given VM is currently saving
|
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)
|
static void |
nativeInit()
Class initializer, to initialize various JNI stuff
|
void |
restore()
Immediately resumes the execution of all processes previously saved
within the given VM
Not yet implemented (for the moment it behaves like resume)
No resume cost occurs.
|
void |
resume()
Immediately resumes the execution of all processes within the given VM
No resume cost occurs.
|
void |
save()
Immediately suspend the execution of all processes within the given VM
and save its state on the persistent HDD
Not yet implemented (for the moment it behaves like suspend)
No suspension cost occurs.
|
void |
setBound(int load)
Bound the VM to a certain % of its vcpu capability (e.g.
|
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, getCoreNumber, getCount, getData, getLoad, getMountedStorage, getName, getProperty, getSpeed, hasData, isOn, off, on, setAsyncMailbox, setData, setProperty, toString
public VM(Host host, java.lang.String name)
public VM(Host host, java.lang.String name, int nCore, int ramSize, int netCap, java.lang.String diskPath, int diskSize, int migNetSpeed, int dpIntensity)
host
- Host nodename
- name of the machinenCore
- number of coreramSize
- size of the RAM that should be allocated (in MBytes)netCap
- (not used for the moment)diskPath
- (not used for the moment)diskSize
- (not used for the moment)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 finalize()
finalize
in class java.lang.Object
public int isCreated()
public int isRunning()
public int isMigrating()
public int isSuspended()
public int isSaving()
public int isSaved()
public boolean isRestoring()
public void setBound(int load)
load
- percentage (between [0,100]public void start()
public void shutdown()
public void internalmig(Host destination) throws java.lang.Exception
java.lang.Exception
public void migrate(Host destination) throws HostFailureException
HostFailureException
public void suspend()
public void resume()
public void save()
public void restore()
public static void nativeInit()