Amazing technological breakthrough possible @S-Logix 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 migrate the cloudlet from one VM to another VM?

  • The task/cloudlet migration can be done in “Datacenter” class, “Cloudlet Scheduler” class. Here, in “Datacentcenter” class, in “processCloudletSubmit()” method, a cloudlet is chosen with its id as a checking condition and its VM id is collected and the CLOUDLET_MOVE event is triggered.
  • protected void processCloudletSubmit(SimEvent ev, boolean ack) {
    ……;
    ……;
    Cloudlet cl = (Cloudlet) ev.getData();
    ……;
    ……;
    cl.setResourceParameter(getId(),getCharacteristics().getCostPerSecond(), getCharacteristics().getCostPerBw());
    int userId = cl.getUserId();
    int vmId = cl.getVmId();
    if(cl.getCloudletId()==3){ // the cloudlet which has id 3 is chosen
    arr[0] = cl.getCloudletId(); //cloudlet id which is going to migrate
    arr[1] = cl.getUserId(); // migrating cloudlet's userid
    arr[2] = cl.getVmId(); //migrating cloudlet's VM id
    arr[3] = 4; //migrating cloudlet's new VM id
    arr[4] = getId(); //datacenter idsendNow(getId(), CloudSimTags.CLOUDLET_MOVE, arr); // the Move event is triggered.
    }
    ………;
    ………;
    }