VMAllocation Extensions CloudReports

638 views
Skip to first unread message

Umar. A. Khan

unread,
Sep 13, 2012, 10:55:27 AM9/13/12
to clou...@googlegroups.com

Hi, I do apologise if this is not the place for asking questions about CloudReports but I couldn’t find anywhere else.

 

How would I go about adding any of the migration VM allocation policies that are included in CloudSim to CloudReports.

 

For example, I wanted to add PowerVmAllocationPolicyMigrationLocalRegression to CloudReports extensions.vmallocationpolicies but I couldn’t because the tutorial says that extensions must inherit from a base class (base class is VmAllocationPolicy, in this case).  I could not do that because PowerVmAllocationPolicyMigrationLocalRegression already inherits from PowerVmAllocationPolicyMigrationAbstract.

 

So if someone could please explain how I can do this or any of the vm allocation policies?  Thank you!

 

 

 

Thiago Sá

unread,
Sep 13, 2012, 8:32:33 PM9/13/12
to clou...@googlegroups.com
Hi Umar,

The tutorial says:

(...) your extension should belong to the base class' inheritance tree and need not to be an immediate subclass.

The class PowerVmAllocationPolicyMigrationLocalRegression is a concrete implementation of PowerVmAllocationPolicyMigrationAbstract, which is a subclass of PowerVmAllocationPolicyAbstract, which in turn is a subclass of VmAllocationPolicy.

This means, from an OO perspective, that PowerVmAllocationPolicyMigrationLocalRegression is a VmAllocationPolicy. Thereby you should be able to use this class as a VM allocation policy extension.

Give it a try and tell us if you succeed.

Regards,

Thiago Sá



2012/9/13 Umar. A. Khan <umar...@gmail.com>

--
 
 
 

Umar. A. Khan

unread,
Sep 15, 2012, 10:07:33 PM9/15/12
to clou...@googlegroups.com

Hi,

 

Thank you for getting back to me and sorry it has taken me a while to get back to you.

 

I have been unsuccessful as it seems that PowerVmAllocationPolicyMigrationLocalRegression is not compatible as an extension but I’m probably doing it all wrong. 

This is what I did: I first tried to make a class (VMPolicy) and simply extend PowerVmAllocationPolicyMigrationLocalRegression but I got an error:

 

java.lang.NoSuchMethodException: vmallocationpolicies.VMPolicy.<init>(java.util.List, double)

       at java.lang.Class.getConstructor0(Unknown Source)

       at java.lang.Class.getConstructor(Unknown Source)

       at cloudreports.extensions.ExtensionsLoader.getExtension(ExtensionsLoader.java:151)

       at cloudreports.enums.AllocationPolicy$2.getPolicy(AllocationPolicy.java:62)

       at cloudreports.simulation.EntityFactory.createDatacenters(EntityFactory.java:86)

       at cloudreports.simulation.Simulation.runSimulations(Simulation.java:154)

       at cloudreports.simulation.Simulation.run(Simulation.java:97)

       at java.lang.Thread.run(Unknown Source)

 

I then tried to use PowerVmAllocationPolicyMigrationLocalRegression , which I copied from CloudSim-3.0 but some methods wouldn’t work even after importing CloudSim3.0.jar (which is included in CloudReports).  I tried copying the files (from CloudSim-3.0) into the package (vmallocationpolicies) and using them but I couldn’t get them to work because of compatibility problems.

 

(By the way, when I say CloudSim-3.0, I mean the original java files from CloudSim-3.0, not CloudSim3.0.jar which is included in CloudReports).

So what do you suggest I do?  Have I gone about this the wrong way?  Should I be writing a class that replicates
PowerVmAllocationPolicyMigrationLocalRegression , but is compatible with CloudReports?  Or would it work if I simply made a class and created an object of PowerVmAllocationPolicyMigrationLocalRegression?

 

 

 

Thank you very much for your support.  It is indeed appreciated as I am using CloudReports for my final year project at university.

 

 

 

Umar.

--
 
 
 

Thiago Sá

unread,
Sep 16, 2012, 11:45:30 PM9/16/12
to clou...@googlegroups.com
Hi again,

First of all, after seeing your problem with more detail, I realized my response was not accurate. The problem is that the the extension must be a subclass of cloudreports.extensions.vmallocationpolicies.VmAllocationPolicy and the class you want to use is a subclass of org.cloudbus.cloudsim.VmAllocationPolicy. That's the reason you're not being able to load the extension.

Since this would deeply affect the development of many extensions, I made some modifications on the code and updated the tutorial. Now, this is what you need to do to get your extension working:

- Download the latest version of the project on GitHub.
- Modify the class you want to use as a VM allocation policy so it implements the interface cloudreports.extensions.vmallocationpolicies.VmAllocationPolicyExtensible. and inherits (directly or not) from the class org.cloudbus.cloudsim.VmAllocationPolicy.
- Follow the rest of the tutorial normally.

After trying this, tell us if everything worked fine.

Regards,

Thiago Sá



2012/9/15 Umar. A. Khan <umar...@gmail.com>
--
 
 
 

Umar. A. Khan

unread,
Sep 17, 2012, 12:48:38 AM9/17/12
to clou...@googlegroups.com

Dear Thiago Sá,

 

Thank you for getting back to me seeing to my problem.  I am getting errors when compiling CloudReports with ‘mvn clean package’.  I then used ‘mvn clean package –X > output.txt’ to output the errors.

 

I pasted the parts where it shows the errors here but the rest of the document is attached to this email.  The output from mvn clean package –X is attached to this email.

 

 

Umar.

 



[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0:compile (default-compile) on project cloudreports: Compilation failure: Compilation failure:

[ERROR] C:\CloudReports\src\main\java\cloudreports\utils\RandomNumberGenerator.java:[22,28] error: package cloudreports.business does not exist

[ERROR]

[ERROR] C:\CloudReports\src\main\java\cloudreports\dao\RandomNumberDAO.java:[22,28] error: package cloudreports.business does not exist

[ERROR]

[ERROR] C:\CloudReports\src\main\java\cloudreports\gui\MailNotificationSettings.java:[22,28] error: package cloudreports.business does not exist

[ERROR]

[ERROR] C:\CloudReports\src\main\java\cloudreports\gui\RandomnessSettings.java:[22,28] error: package cloudreports.business does not exist

[ERROR]

[ERROR] C:\CloudReports\src\main\java\cloudreports\extensions\PowerDatacenter.java:[22,51] error: cannot find symbol

[ERROR]

[ERROR] could not parse error message:   symbol:   class VmAllocationPolicyExtensible

[ERROR] location: package cloudreports.extensions.vmallocationpolicies

[ERROR] C:\CloudReports\src\main\java\cloudreports\reports\CustomerReport.java:22: error: package cloudreports.business does not exist

[ERROR] import cloudreports.business.SettingBusiness;

[ERROR] ^

[ERROR]

[ERROR] C:\CloudReports\src\main\java\cloudreports\reports\Report.java:[22,28] error: package cloudreports.business does not exist

[ERROR]

[ERROR] C:\CloudReports\src\main\java\cloudreports\reports\DatacenterReport.java:[22,28] error: package cloudreports.business does not exist

[ERROR]

[ERROR] C:\CloudReports\src\main\java\cloudreports\extensions\brokers\Broker.java:[22,28] error: package cloudreports.business does not exist

[ERROR]

[ERROR] C:\CloudReports\src\main\java\cloudreports\gui\SimulationSettings.java:[22,28] error: package cloudreports.business does not exist

[ERROR]

[ERROR] C:\CloudReports\src\main\java\cloudreports\reports\DataCollector.java:[22,28] error: package cloudreports.business does not exist

[ERROR]

[ERROR] C:\CloudReports\src\main\java\cloudreports\extensions\vmallocationpolicies\VmAllocationPolicySingleThreshold.java:[22,28] error: package cloudreports.business does not exist

[ERROR]

[ERROR] C:\CloudReports\src\main\java\cloudreports\extensions\vmallocationpolicies\VmAllocationPolicySingleThreshold.java:[46,91] error: cannot find symbol

[ERROR]

[ERROR] could not parse error message:   symbol: class VmAllocationPolicyExtensible

[ERROR] C:\CloudReports\src\main\java\cloudreports\simulation\Simulation.java:22: error: package cloudreports.business does not exist

[ERROR] import cloudreports.business.SettingBusiness;

[ERROR] ^

[ERROR]

[ERROR] C:\CloudReports\src\main\java\cloudreports\simulation\EntityFactory.java:[22,28] error: package cloudreports.business does not exist

[ERROR]

[ERROR] C:\CloudReports\src\main\java\cloudreports\simulation\EntityFactory.java:[23,28] error: package cloudreports.business does not exist

[ERROR]

[ERROR] C:\CloudReports\src\main\java\cloudreports\utils\RandomNumberGenerator.java:[42,21] error: cannot find symbol

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class RandomNumberGenerator

[ERROR] C:\CloudReports\src\main\java\cloudreports\dao\RandomNumberDAO.java:73: error: cannot find symbol

[ERROR] QRBG source = new QRBG(SettingBusiness.getQRBGUsername(), SettingBusiness.getQRBGPassword());

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class RandomNumberDAO

[ERROR] C:\CloudReports\src\main\java\cloudreports\dao\RandomNumberDAO.java:73: error: cannot find symbol

[ERROR] QRBG source = new QRBG(SettingBusiness.getQRBGUsername(), SettingBusiness.getQRBGPassword());

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class RandomNumberDAO

[ERROR] C:\CloudReports\src\main\java\cloudreports\gui\MailNotificationSettings.java:44: error: cannot find symbol

[ERROR] if(SettingBusiness.isMailNotificationEnabled()) {

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class MailNotificationSettings

[ERROR] C:\CloudReports\src\main\java\cloudreports\gui\RandomnessSettings.java:47: error: cannot find symbol

[ERROR] if(SettingBusiness.getRandomnessOption() == 0) {

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class RandomnessSettings

[ERROR] C:\CloudReports\src\main\java\cloudreports\extensions\PowerDatacenter.java:118: error: cannot find symbol

[ERROR] List<Migration> migrationList = ((VmAllocationPolicyExtensible) getVmAllocationPolicy()).getListOfMigrationsToBeExecuted(getVmList());

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   class VmAllocationPolicyExtensible

[ERROR] location: class PowerDatacenter

[ERROR] C:\CloudReports\src\main\java\cloudreports\reports\CustomerReport.java:329: error: cannot find symbol

[ERROR] int simulationId = SettingBusiness.getCurrentSimulation();

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class CustomerReport

[ERROR] C:\CloudReports\src\main\java\cloudreports\reports\Report.java:74: error: cannot find symbol

[ERROR] int simulationId = SettingBusiness.getCurrentSimulation();

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class Report

[ERROR] C:\CloudReports\src\main\java\cloudreports\reports\Report.java:78: error: cannot find symbol

[ERROR] htmlReportsEnabled = SettingBusiness.isHtmlReportsEnabled();

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class Report

[ERROR] C:\CloudReports\src\main\java\cloudreports\reports\Report.java:79: error: cannot find symbol

[ERROR] rawDataReportsEnabled = SettingBusiness.isRawDataReportsEnabled();

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class Report

[ERROR] C:\CloudReports\src\main\java\cloudreports\reports\DatacenterReport.java:314: error: cannot find symbol

[ERROR] int simulationId = SettingBusiness.getCurrentSimulation();

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class DatacenterReport

[ERROR] C:\CloudReports\src\main\java\cloudreports\gui\SimulationSettings.java:44: error: cannot find symbol

[ERROR] numOfSimulationsSpinner.setValue(SettingBusiness.getNumberOfSimulations());

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class SimulationSettings

[ERROR] C:\CloudReports\src\main\java\cloudreports\gui\SimulationSettings.java:45: error: cannot find symbol

[ERROR] timeToSimulateSpinner.setValue(SettingBusiness.getTimeToSimulate());

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class SimulationSettings

[ERROR] C:\CloudReports\src\main\java\cloudreports\gui\SimulationSettings.java:46: error: cannot find symbol

[ERROR] htmlReportsCheckBox.setSelected(SettingBusiness.isHtmlReportsEnabled());

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class SimulationSettings

[ERROR] C:\CloudReports\src\main\java\cloudreports\gui\SimulationSettings.java:48: error: cannot find symbol

[ERROR] rawDataReportsCheckBox.setSelected(SettingBusiness.isRawDataReportsEnabled());

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class SimulationSettings

[ERROR] C:\CloudReports\src\main\java\cloudreports\reports\DataCollector.java:137: error: cannot find symbol

[ERROR] int currentSimulation = SettingBusiness.getCurrentSimulation();

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class DataCollector

[ERROR] C:\CloudReports\src\main\java\cloudreports\reports\DataCollector.java:179: error: cannot find symbol

[ERROR] int currentSimulation = SettingBusiness.getCurrentSimulation();

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class DataCollector

[ERROR] C:\CloudReports\src\main\java\cloudreports\reports\DataCollector.java:223: error: cannot find symbol

[ERROR] int currentSimulation = SettingBusiness.getCurrentSimulation();

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class DataCollector

[ERROR] C:\CloudReports\src\main\java\cloudreports\extensions\vmallocationpolicies\VmAllocationPolicySingleThreshold.java:73: error: method does not override or implement a method from a supertype

[ERROR] @Override

[ERROR] ^

[ERROR]

[ERROR] C:\CloudReports\src\main\java\cloudreports\extensions\vmallocationpolicies\VmAllocationPolicySingleThreshold.java:[99,4] error: method does not override or implement a method from a supertype

[ERROR]

[ERROR] C:\CloudReports\src\main\java\cloudreports\extensions\vmallocationpolicies\VmAllocationPolicySingleThreshold.java:[122,4] error: method does not override or implement a method from a supertype

[ERROR]

[ERROR] C:\CloudReports\src\main\java\cloudreports\extensions\vmallocationpolicies\VmAllocationPolicySingleThreshold.java:[144,4] error: method does not override or implement a method from a supertype

[ERROR]

[ERROR] C:\CloudReports\src\main\java\cloudreports\extensions\vmallocationpolicies\VmAllocationPolicySingleThreshold.java:[379,32] error: cannot find symbol

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class VmAllocationPolicySingleThreshold

[ERROR] C:\CloudReports\src\main\java\cloudreports\extensions\vmallocationpolicies\VmAllocationPolicySingleThreshold.java:446: error: cannot find symbol

[ERROR] int currentSimulation = SettingBusiness.getCurrentSimulation();

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class VmAllocationPolicySingleThreshold

[ERROR] C:\CloudReports\src\main\java\cloudreports\simulation\Simulation.java:117: error: cannot find symbol

[ERROR] isMailNotificationEnabled = SettingBusiness.isMailNotificationEnabled();

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class Simulation

[ERROR] C:\CloudReports\src\main\java\cloudreports\simulation\Simulation.java:118: error: cannot find symbol

[ERROR] int numberOfSimulations = SettingBusiness.getNumberOfSimulations();

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class Simulation

[ERROR] C:\CloudReports\src\main\java\cloudreports\simulation\Simulation.java:121: error: cannot find symbol

[ERROR] SettingBusiness.setCurrentSimulation(simulationId);

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class Simulation

[ERROR] C:\CloudReports\src\main\java\cloudreports\simulation\Simulation.java:148: error: cannot find symbol

[ERROR] CloudSim.terminateSimulation(SettingBusiness.getTimeToSimulate()*60);

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable SettingBusiness

[ERROR] location: class Simulation

[ERROR] C:\CloudReports\src\main\java\cloudreports\simulation\EntityFactory.java:66: error: cannot find symbol

[ERROR] List<DatacenterRegistry> dcrList = DatacenterRegistryBusiness.getListOfDatacenters();

[ERROR] ^

[ERROR]

[ERROR] could not parse error message:   symbol:   variable DatacenterRegistryBusiness

[ERROR] location: class EntityFactory

[ERROR] C:\CloudReports\src\main\java\cloudreports\simulation\EntityFactory.java:227: error: cannot find symbol

[ERROR] List<CustomerRegistry> customerList = CustomerRegistryBusiness.getListOfCustomers();

[ERROR] ^

[ERROR] -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0:compile (default-compile) on project cloudreports: Compilation failure

                at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)

                at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

                at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

                at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)

                at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)

                at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)

                at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)

                at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)

                at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)

                at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)

                at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)

                at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at java.lang.reflect.Method.invoke(Method.java:601)

                at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)

                at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)

                at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)

                at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure

                at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:429)

                at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:110)

                at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)

                at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)

                ... 19 more

--
 
 
 

output.txt

Thiago Sá

unread,
Sep 17, 2012, 8:05:44 PM9/17/12
to clou...@googlegroups.com
Your project is missing some classes that were added on the last commit. Try pulling the project again to get the latest updates, it should be alright now.

Thiago Sá



2012/9/17 Umar. A. Khan <umar...@gmail.com>
--
 
 
 

Umar. A. Khan

unread,
Sep 21, 2012, 8:03:27 PM9/21/12
to clou...@googlegroups.com

Hi again,

 

I have downloaded the latest commit and it compiled just fine but I am still having problems with the PowerVmAllocationPolicyMigrationLocalRegression class.  I thought that I could simply extend it and implement VmAllocationPolicyExtensible and it would work but I was wrong.  I thought this because PowerVmAllocationPolicyMigrationLocalRegression is a sub class of PowerVmAllocationPolicyMigrationAbstract which is a sub class of PowerVmAllocationPolicyAbstract, which is a sub class of VmAllocationPolicy.  But now I see that there are some methods that must be implemented from the interface.  Do I have to implement these or should they be taken care of by PowerVmAllocationPolicyMigrationLocalRegression and its super classes?  My code looks like this at the moment.  Please could you tell me where I am going wrong?  I also attached the file to this email, just in case the formatting doesn’t come out properly.

 

Thank you.

 

Umar.

 

 

package vmallocationpolicies;

 

import java.util.List;

 

import org.cloudbus.cloudsim.Host;

import org.cloudbus.cloudsim.Vm;

import org.cloudbus.cloudsim.power.PowerHost;

import org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationAbstract;

import org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationLocalRegression;

import org.cloudbus.cloudsim.power.PowerVmSelectionPolicy;

 

import cloudreports.extensions.vmallocationpolicies.VmAllocationPolicyExtensible;

import cloudreports.models.Migration;

 

public class LRExtension extends PowerVmAllocationPolicyMigrationLocalRegression implements VmAllocationPolicyExtensible{

               

                private double upperUtilizationThreshold;

 

                public LRExtension(List<? extends Host> hostList,

                                                PowerVmSelectionPolicy vmSelectionPolicy, double safetyParameter,

                                                double schedulingInterval,

                                                PowerVmAllocationPolicyMigrationAbstract fallbackVmAllocationPolicy,

                                                double upperUtilizationThreshold) {

                               

                                super(hostList, vmSelectionPolicy, safetyParameter, schedulingInterval,

                                                                fallbackVmAllocationPolicy);

                                // TODO Auto-generated constructor stub

                                this.upperUtilizationThreshold  =  upperUtilizationThreshold;

                }

 

                @Override

                public void consolidateVms(List<Migration> migrationList) {

                                // TODO Auto-generated method stub

                               

                }

 

                @Override

                public void distributeVms(List<Migration> migrationList, List<PowerHost> hostList) {

                                // TODO Auto-generated method stub

                               

                }

 

                @Override

                public List<Migration> getListOfMigrationsToBeExecuted(

                                                List<? extends Vm> vmList) {

                                // TODO Auto-generated method stub

                                return null;

                }

 

                @Override

                public double getUpperUtilizationThreshold() {

                                // TODO Auto-generated method stub

                                return this.upperUtilizationThreshold;

--
 
 
 

LRExtension.java

Thiago Sá

unread,
Sep 23, 2012, 8:28:23 PM9/23/12
to clou...@googlegroups.com
Hello,

First of all, your feedback is being really important for me to identify bugs and develop some improvements on CloudReports.

After analysing your problem, I realized that a very important piece of information was not present on the tutorial: the constructor signature. Since all extensions are loaded using reflection, it is expected that each type of extension implements a specific type of constructor. This information is available now on the project's wiki.

I am sending a simple example of implementation of the PowerVmAllocationPolicyMigrationLocalRegression class as an extension. Please download again the latest version of the project on github to use it. I have tested this and it works fine.

Thiago Sá



2012/9/21 Umar. A. Khan <umar...@gmail.com>
--
 
 
 

PowerVmAllocationPolicyMigrationLocalRegression.java

Umar. A. Khan

unread,
Sep 24, 2012, 9:38:50 PM9/24/12
to clou...@googlegroups.com

Hi, Thank you so much!  It works great now but I am afraid that I come bearing another bug.  I created a class which basically replicated the one you gave as an example but with a different name and it ran fine.  So I wanted to examine how the power consumption changes with migrations – I of course chose the Local_Regression policy for this and I also changed a few things in the datacentre so that there were more virtual machines than hosts but still enough hosts to have enough power to run virtual machines, e.g. VMs has a total of 4,000 MIPS and hosts have a total of 4,400 MIPS.  I ran the simulation and encountered this error from GUI: “Simulation has been interrupted.  Reports may have been generated with inconsistent data.”  You can see the java Exception error output at the bottom.  I did try to copy the actual PowerVmAllocationPolicyMigrationLocalRegression.java (original cloudsim-3.0) and modify the part where it casts PowerHost to utilizationHistory but I was unsuccessful because I encountered some other errors when I tried to run.

I have tried using PowerVmAllocationPolicyMigrationInterQuartileRange as an extension but I got exact same error as Local Regression.  But the problem goes on to SingleThreshold which is not an extension.  It seems these problems are coming from when the datacentre needs to migrate some virtual machines.

 

Thank you for working so hard on these bugs and I am glad to be helping to test CloudReports.  I find CloudReports really easy to use and it solves SAN Storage – which I couldn’t get working in CloudSim so I am happy to keep at it but I may have to go back to using cloudsim if I start running out of time for my project.

 

 

Umar.

 

 

 

 

SingleThreshold:

 

java.lang.NullPointerException

       at org.cloudbus.cloudsim.HostDynamicWorkload.updateVmsProcessing(HostDynamicWorkload.java:95)

       at cloudreports.extensions.PowerDatacenter.updateCloudletProcessing(PowerDatacenter.java:105)

       at org.cloudbus.cloudsim.Datacenter.processEvent(Datacenter.java:255)

       at org.cloudbus.cloudsim.core.SimEntity.run(SimEntity.java:406)

       at org.cloudbus.cloudsim.core.CloudSim.runClockTick(CloudSim.java:471)

       at org.cloudbus.cloudsim.core.CloudSim.run(CloudSim.java:835)

       at org.cloudbus.cloudsim.core.CloudSim.startSimulation(CloudSim.java:151)

       at cloudreports.simulation.Simulation.runSimulation(Simulation.java:157)

       at cloudreports.simulation.Simulation.runAllSimulations(Simulation.java:129)

       at cloudreports.simulation.Simulation.run(Simulation.java:98)

       at java.lang.Thread.run(Unknown Source)

 

 

 

PowerVmAllocationPolicyMigrationLocalRegression:

 

java.lang.ClassCastException: org.cloudbus.cloudsim.power.PowerHost cannot be cast to org.cloudbus.cloudsim.power.PowerHostUtilizationHistory

       at org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationLocalRegression.isHostOverUtilized(PowerVmAllocationPolicyMigrationLocalRegression.java:92)

       at org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationAbstract.isHostOverUtilizedAfterAllocation(PowerVmAllocationPolicyMigrationAbstract.java:251)

       at org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationAbstract.findHostForVm(PowerVmAllocationPolicyMigrationAbstract.java:221)

       at org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationAbstract.findHostForVm(PowerVmAllocationPolicyMigrationAbstract.java:269)

       at org.cloudbus.cloudsim.power.PowerVmAllocationPolicyAbstract.allocateHostForVm(PowerVmAllocationPolicyAbstract.java:55)

       at org.cloudbus.cloudsim.Datacenter.processVmCreate(Datacenter.java:448)

       at org.cloudbus.cloudsim.Datacenter.processEvent(Datacenter.java:219)

       at org.cloudbus.cloudsim.core.SimEntity.run(SimEntity.java:406)

       at org.cloudbus.cloudsim.core.CloudSim.runClockTick(CloudSim.java:471)

       at org.cloudbus.cloudsim.core.CloudSim.run(CloudSim.java:835)

       at org.cloudbus.cloudsim.core.CloudSim.startSimulation(CloudSim.java:151)

       at cloudreports.simulation.Simulation.runSimulation(Simulation.java:157)

       at cloudreports.simulation.Simulation.runAllSimulations(Simulation.java:129)

       at cloudreports.simulation.Simulation.run(Simulation.java:98)

       at java.lang.Thread.run(Unknown Source)

 

 

PowerVmAllocationPolicyMigrationInterQuartileRange:

 

java.lang.ClassCastException: org.cloudbus.cloudsim.power.PowerHost cannot be cast to org.cloudbus.cloudsim.power.PowerHostUtilizationHistory

       at org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationInterQuartileRange.isHostOverUtilized(PowerVmAllocationPolicyMigrationInterQuartileRange.java:85)

       at org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationAbstract.isHostOverUtilizedAfterAllocation(PowerVmAllocationPolicyMigrationAbstract.java:251)

       at org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationAbstract.findHostForVm(PowerVmAllocationPolicyMigrationAbstract.java:221)

       at org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationAbstract.findHostForVm(PowerVmAllocationPolicyMigrationAbstract.java:269)

       at org.cloudbus.cloudsim.power.PowerVmAllocationPolicyAbstract.allocateHostForVm(PowerVmAllocationPolicyAbstract.java:55)

       at org.cloudbus.cloudsim.Datacenter.processVmCreate(Datacenter.java:448)

       at org.cloudbus.cloudsim.Datacenter.processEvent(Datacenter.java:219)

       at org.cloudbus.cloudsim.core.SimEntity.run(SimEntity.java:406)

       at org.cloudbus.cloudsim.core.CloudSim.runClockTick(CloudSim.java:471)

       at org.cloudbus.cloudsim.core.CloudSim.run(CloudSim.java:835)

       at org.cloudbus.cloudsim.core.CloudSim.startSimulation(CloudSim.java:151)

       at cloudreports.simulation.Simulation.runSimulation(Simulation.java:157)

       at cloudreports.simulation.Simulation.runAllSimulations(Simulation.java:129)

       at cloudreports.simulation.Simulation.run(Simulation.java:98)

       at java.lang.Thread.run(Unknown Source)

--
 
 
 

RAVIKUMAR IGHARE

unread,
Mar 30, 2015, 8:46:32 AM3/30/15
to clou...@googlegroups.com, umar...@gmail.com
hi,

I am new to cloudReports, need some help from you. I want to implement a VmAllocationPolicy based on two thresholds.
 
In cloudreports GUI window we can see there are two thtresholds, upper and lower but there is only one Vm allocation policy implemented (vmAllocationPolicySingleThreshold).
 

I want to migrate VM based on two threshold.

1. If resource utilization is above upper threshold then VM should migrate to avoid overuse of server (this is already implemented in cloud reports)
2. If resource utilization is below lower threshold then VM should migrate and turn off under utilized server to save energy. 

Can you send me any example code for "vmAllocationPolicyDoubleThreshold".


Thank you

Alessandro Leite

unread,
Mar 30, 2015, 9:26:27 AM3/30/15
to clou...@googlegroups.com

--

---
You received this message because you are subscribed to the Google Groups "cloudsim" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloudsim+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

RAVIKUMAR IGHARE

unread,
Mar 30, 2015, 9:56:09 AM3/30/15
to clou...@googlegroups.com
hi Alessandro Leite

thanks for your reply.,

yes, Right now i am studying VmAllocationPolicySingleThreshold class and trying to implement my vmAllocationPolicyDoubleThreshold. If you have any such already implemented class based on double threshold then i can get some idea from it..
thanks again

--

---
You received this message because you are subscribed to a topic in the Google Groups "cloudsim" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cloudsim/l0hx-Q49Ixw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cloudsim+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Thanks and Regards
Ravikumar U. Ighare
Mtech (IT) 
SGGS IE&T, Nanded
07387474022

desai megha

unread,
Mar 30, 2015, 1:36:45 PM3/30/15
to clou...@googlegroups.com, umar...@gmail.com
hi ..
can anyone help me ..how i can cacultate downtime for vm...is there any function

RAVIKUMAR IGHARE

unread,
May 18, 2015, 2:44:13 AM5/18/15
to clou...@googlegroups.com
Hello , 

i have made a VmAllocationPolicyDoubleThreshold based on single threshold policy which is given in cloudReports. my question is how can i add this policy in the gui....... which classes should modify to add this . in Allocation Policy list, i want to show both , single threshold and double threshold. how can i add my double threshold policy to GUI


thanks

vivek athilkar

unread,
Jun 3, 2015, 1:45:25 AM6/3/15
to clou...@googlegroups.com
hello
How can I implement minmin resource scheduling, minmax resource scheduling  algorithms  in cloudreports
My main moto is show comparision between different algorithm in cloudreports,,...
In cloudreport,RoundRobin algorithm is already given but again by adding above algorithm I want to show comparision between them
Plz post early its My project submission time
Thank you
Reply all
Reply to author
Forward
0 new messages