Execution of examples in cloudsim

3,348 views
Skip to first unread message

rashmi k.s

unread,
Dec 19, 2011, 3:27:49 AM12/19/11
to cloudsim
Hello

I have created my own classes namely PowerDatacenter, PowerDatacenterBroker, PowerVmAllocationPolicy etc and implemented them in the DVFS example given in the cloudsim package. But on execution I am getting following errors. Please can anybody tell me how to get arround them.

C:\Program Files\Java\jdk1.6.0_17\bin\cloudsim-2.1.1[p]>javac -classpath jars\cl
oudsim-new.jar examples\org\cloudbus\cloudsim\examples\power\DVFS.java

C:\Program Files\Java\jdk1.6.0_17\bin\cloudsim-2.1.1[p]>java -classpath jars\clo
udsim-new.jar;examples org.cloudbus.cloudsim.examples.power.DVFS
Starting DVFS example...
Initialising...
Starting CloudSim version 2.0
Datacenter_0 is starting...
Broker is starting...
Entities started.
0.0: Broker: Cloud Resource List received with 1 resource(s)
0.0: Broker: Trying to Create VM #0 in Datacenter_0
0.0: Broker: Trying to Create VM #1 in Datacenter_0
0.0: Broker: Trying to Create VM #2 in Datacenter_0
0.0: Broker: Trying to Create VM #3 in Datacenter_0
0.0: Broker: Trying to Create VM #4 in Datacenter_0
0.0: Broker: Trying to Create VM #5 in Datacenter_0
0.0: Broker: Trying to Create VM #6 in Datacenter_0
0.0: Broker: Trying to Create VM #7 in Datacenter_0
0.0: Broker: Trying to Create VM #8 in Datacenter_0
0.0: Broker: Trying to Create VM #9 in Datacenter_0
0.0: Broker: Trying to Create VM #10 in Datacenter_0
0.0: Broker: Trying to Create VM #11 in Datacenter_0
0.0: Broker: Trying to Create VM #12 in Datacenter_0
0.0: Broker: Trying to Create VM #13 in Datacenter_0
0.0: Broker: Trying to Create VM #14 in Datacenter_0
0.0: Broker: Trying to Create VM #15 in Datacenter_0
0.0: Broker: Trying to Create VM #16 in Datacenter_0
0.0: Broker: Trying to Create VM #17 in Datacenter_0
0.0: Broker: Trying to Create VM #18 in Datacenter_0
0.0: Broker: Trying to Create VM #19 in Datacenter_0
0.00: VM #0 has been allocated to the host #2
0.00: VM #1 has been allocated to the host #2
0.00: VM #2 has been allocated to the host #2
0.00: VM #3 has been allocated to the host #5
0.00: VM #4 has been allocated to the host #5
0.00: VM #5 has been allocated to the host #5
0.00: VM #6 has been allocated to the host #8
0.00: VM #7 has been allocated to the host #8
0.00: VM #8 has been allocated to the host #8
0.00: VM #9 has been allocated to the host #1
0.00: VM #10 has been allocated to the host #1
0.00: VM #11 has been allocated to the host #4
0.00: VM #12 has been allocated to the host #4
0.00: VM #13 has been allocated to the host #7
0.00: VM #14 has been allocated to the host #7
0.00: VM #15 has been allocated to the host #0
0.00: VM #16 has been allocated to the host #3
0.00: VM #17 has been allocated to the host #6
0.00: VM #18 has been allocated to the host #9
java.lang.NullPointerException
        at org.cloudbus.cloudsim.power.PowerDatacenterBroker.processVmCreate(Unk
nown Source)
        at org.cloudbus.cloudsim.power.PowerDatacenterBroker.processEvent(Unknow
n Source)
        at org.cloudbus.cloudsim.core.SimEntity.run(Unknown Source)
        at org.cloudbus.cloudsim.core.CloudSim.runClockTick(Unknown Source)
        at org.cloudbus.cloudsim.core.CloudSim.run(Unknown Source)
        at org.cloudbus.cloudsim.core.CloudSim.startSimulation(Unknown Source)
        at org.cloudbus.cloudsim.examples.power.DVFS.main(DVFS.java:99)
Unwanted errors happen
DVFS example finished!

I am attaching the code also with this.
Please help me its very urgent.

Regards
Rashmi
DVFS.java

farzaneh

unread,
Dec 1, 2012, 1:58:50 PM12/1/12
to clou...@googlegroups.com
hello
i run the singlethreshold minimum migration (ThrMu) in cloudsim3 in netbeans
when i run it,it create 50 vm.
i want create for example 20 vm
but i don't know which parametr or which class should be change!!!!
please help me

Neda Maleki

unread,
Dec 1, 2012, 2:45:00 PM12/1/12
to clou...@googlegroups.com
Hi Fahimeh
I am so sorry for not replying ur previous email. i am so busy.by the way, it is so easy. u should change the input of CreateVMs() method. i mean u should change input of method from 50 to 20. so go to Random Constant.java class and change it. chunk of code is below:
public class RandomConstants {

public final static int NUMBER_OF_VMS = 20;

public final static int NUMBER_OF_HOSTS = 10;

public final static long CLOUDLET_UTILIZATION_SEED = 1;

}
also ur class name is ThrMU= threshold,Minimum Utilization  dont make mistake.
So Simple!
Cheers
Neda

--
 
 
 

347.png

Far zaneh

unread,
Dec 1, 2012, 2:48:55 PM12/1/12
to clou...@googlegroups.com
thanks Neda :)


--
 
 
 

347.png

massak

unread,
Dec 30, 2013, 4:06:16 AM12/30/13
to clou...@googlegroups.com, nedama...@gmail.com
Hello Neda
I'm working on the same thing,
I tried to follow your instructions, i changed no. of hosts and vms but still in the result shows 50 vms and 50 hosts.
In the same manner, i want to change no of cloudlets or generate them dynamically, where should i change?
Please help, its urgent.
Any one know can help.
Thank you

Binal Parekh

unread,
Feb 9, 2016, 10:48:50 AM2/9/16
to cloudsim
hello 

m getting same error 

u find any solution 

Binal Parekh

unread,
Feb 9, 2016, 10:51:32 AM2/9/16
to cloudsim


On Tuesday, February 9, 2016 at 9:18:50 PM UTC+5:30, Binal Parekh wrote:
hello rakshi

souad

unread,
Apr 28, 2016, 9:50:14 AM4/28/16
to cloudsim
I think you have not saved before running that is why. 
I did the same and I got 20 VMs and 1 Hosts. 

Owais Qurani

unread,
Aug 19, 2016, 12:31:37 AM8/19/16
to cloudsim
hi,
please send me all codes related to power(Number of SLA violations,Total simulation time,Number of VM migrations,Average SLA violation). and how to calculate vm performance degradation on host.
thanks
owais
 
Reply all
Reply to author
Forward
0 new messages