#5, First Floor, 4th Street , Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 pro@slogix.in

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • pro@slogix.in
  • +91- 81240 01111

Social List

How to allocate the cloudlets in the VMs of a specific Host?
  • To allocate the cloudlets to a specific Host means, first choose the specific Host from the created hosts list. Let “host” be the specific Host want to be allocated to cloudlets. Then, have to get the VMs which are created in that specific host. And the cloudlets are assigned to the VMs in that specific Host “host’.
  • protected void submitCloudlets() {
    …..;
    ……..;
    ** Get the HostList;
    getHostList();
    for(int i=0;i<getHostList().size();i++){
    host=//specific Host chosen based on one’s own concept/idea;
    }
    ** Get the VMs created in that specific host.
    List<Vm> vms=new ArrayList<Vm>();
    vms=host.getVmList(); //retrieve the VM list which has been created in Host host.
    ** Get the cloudlets list
    getCloudletList();
    for(Cloudlet cl: getCloudletList()){
    // Let "vi" be the VM chosen from vms list.
    cl.setVmId(vi.getId());
    sendNow(getVmsToDatacentersMap().get(vi.getId()), CloudSimTags.CLOUDLET_SUBMIT,cl);
    cloudletsSubmitted++;
    getCloudletSubmittedList().add(cl);
    }
    }