Friday, April 11, 2014

Installation of cloudsim

so like I thought I'll pen down how I installed cloudsim with netbeans.
I downloaded the jar file, cloudsim 3.0.2.
I installed the library with Netbeans.
I used these instructions in order to install cloudsim with Netbeans
http://cloudsim-setup.blogspot.in/2012/01/cloudsim-installation-with-netbeans.html

I did something else to make it run but I forgot what... initially it wasn't running properly.

Ex 1 : how to create a datacenter with one host and run one cloudlet on it.

1. Initialize the cloudsim package, it should be called before creating any entities.
2.  Create a datacenter.... they are resource providers... at least one is required
3.  create broker....
4.  Create one virtual machine.
     a.  Give VM description, vmid, mips, image size, ram, bw, number of PC's, VM name
     b.  Create vM by calling the constructor.
     c.  Add VM to the VM list
     d. submit the list to the broker.
5.  Create one cloudlet.
    a.  create cloudlet properties: id, length, file size, output size, utilization model
    b.  set user id to the broker id
    c.  set VM id
    d.  add cloudlet to list
    e.  submit cloudlet list to broker.
6.  Start and stop the simulation
7.  Print results when simulation is over.
     print the debt of each user to each datacenter.

Creating the datacenter

1.  Create a list to store our machine
2.  a machine contains one or more PE's(processing elements) or CPU/cores.  in this example 1
3.  Create PE's and add these to a list.
4.  Create host with its id and list of PE's and add them to the list.
5.  Create a datacenter Characteristics object that stores the properties of the  datacenter: architecture, OS, list of m/c, allocation policy: time or space shared, time zone and its price.
     set the timezone
     set the cost of processing in this resource.
     cost of using memory in this resource
     cost of using storage in this resource
     cost of using bw in this resource
6.  Create a PowerDatacenter object

Creating the broker
according to our specifications

Print the log



 

No comments:

Post a Comment