public class XVM
extends java.lang.Object
Constructor and Description |
---|
XVM(XHost host,
java.lang.String name,
int nbCores,
int ramsize,
int netBW,
java.lang.String diskPath,
int diskSize,
int migNetBW,
int dpIntensity)
Construcor
|
Modifier and Type | Method and Description |
---|---|
double |
getCoreNumber() |
double |
getCPUDemand() |
Daemon |
getDaemon() |
double |
getLoad() |
XHost |
getLocation() |
int |
getMemSize() |
java.lang.String |
getName() |
int |
getNbOfLoadChanges() |
int |
getNbOfMigrations() |
long |
getNetBW() |
boolean |
isMigrating() |
boolean |
isRunning() |
void |
migrate(XHost host)
Migrate a VM from one XHost to another one.
|
int |
resume()
TODO Adrien - improve implementation & documentation
|
void |
setLoad(double expectedLoad)
Change the load of the VM, please remind that the load of the VM is set to 0 at its beginning.
|
void |
shutdown() |
void |
start()
Override start method in order to start the daemon at the same time that should run inside the VM.
|
int |
suspend()
TODO Adrien - Error management & documentation
|
java.lang.String |
toString() |
public XVM(XHost host, java.lang.String name, int nbCores, int ramsize, int netBW, java.lang.String diskPath, int diskSize, int migNetBW, int dpIntensity)
host
- the XHost (i.e. the PM where the VM is currently running)name
- the name of the vm (as it is listed by virsh list for instance)nbCores
- the nbCores of the VM, please note that right now the injector is able to correctly manage only
one core VM.ramsize
- the size of the RAM (rigid parameter, once it has been assigned this value should not evolve.netBW
- the bandwidth of the NIC (expressed in MBytes per second, for instance for a 1Gb/s ethernet NIC, you
should mention 125 MBytes.diskPath
- the path to the disk image (not used for the moment)diskSize
- the size of the disk image (not used for the moment)migNetBW
- the network bandwidth available for performing the migration (i.e. rigid value, this is the
maximum value that the migration can expect). In the first version of KVM, the bandwidth for the
migration was limited to 32MBytes. Although now, kvm uses the whole bandwidth that can be offered
by the Host NIC, users can define a dedicated value for one VM y using the (virsh migrate_set_speed
command.dpIntensity
- the dirty page intensity, i.e. the refresh rate of the memory as described in the cloudcom
2013 paper (Adding a Live Migration Model into SimGrid: One More Step Toward the Simulation of
Infrastructure-as-a-Service Concerns)
The parameter is expressed has a percentage of the network bandwidth.public java.lang.String getName()
public double getCoreNumber()
public void setLoad(double expectedLoad)
expectedLoad
- expressed as a percentage (i.e. between 0 and 100)public double getLoad()
public Daemon getDaemon()
public int getNbOfLoadChanges()
public int getNbOfMigrations()
public void start()
public void shutdown()
public boolean isRunning()
public void migrate(XHost host) throws org.simgrid.msg.HostFailureException, DoubleMigrationException
host
- the host where to migrate the VMorg.simgrid.msg.HostFailureException
DoubleMigrationException
public int suspend()
public int resume()
public int getMemSize()
public boolean isMigrating()
public double getCPUDemand()
public XHost getLocation()
public long getNetBW()
public java.lang.String toString()
toString
in class java.lang.Object