virtual machine migration

3,767 views
Skip to first unread message

suresh moharana

unread,
Feb 24, 2011, 5:01:39 AM2/24/11
to cloudsim
Sir,

I am new to cloudsim. How to implement virtual machine migration in cloudsim.
Do we need to create two separate host or datacenters for vm
migration. Do we need
to create a entirely new code or is it possible to modify an inbulid
code to implement the vm migration. Kindly help me sir.

Rodrigo Calheiros

unread,
Feb 24, 2011, 5:36:20 PM2/24/11
to clou...@googlegroups.com
Dear suresh,

Migration we implemented is only for migrations inside the same data
center. To implement migration across data centers, you have to:

1. Define message tags to be exchanged between data centers to start
and accept the migration;

2. extend data centers to allow them to send and receive such messages; and

3. use the existing methods for migration inside the data center to
stop cloudlets in one side and restart in the other side.

Regards,
Rodrigo

suresh moharana

unread,
Feb 25, 2011, 9:04:29 AM2/25/11
to clou...@googlegroups.com
Sir,
 
i also trying to migrate inside a datacenter between two host. Is there any inbulid class or method that I can use directly or I need to create a new class.What are the steps I will follow. If you will provide a sample code for VM migration within datacenter then it will be more helpful.
 
Thanking You
 
Suresh. 

suresh moharana

unread,
Feb 28, 2011, 10:08:01 PM2/28/11
to clou...@googlegroups.com

Sir,

I have created two hosts in a datacenter. I have also added a VM in one host and one cloudlet to the VM. I want to migrate the VM from the host having the VM to the other host. What are the steps i need to follow to migrate the VM and measure the total migration time for the VM migration. Plz help.

Suresh.

Divya

unread,
May 17, 2013, 3:54:32 PM5/17/13
to clou...@googlegroups.com
Anyone can send me vm migration code

pallavi gupta

unread,
May 29, 2013, 2:20:55 AM5/29/13
to clou...@googlegroups.com
vm migration code is already implemented in cloudsim........in power pacakage.



On Sat, May 18, 2013 at 1:24 AM, Divya <divya....@gmail.com> wrote:
Anyone can send me vm migration code

--

---
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/groups/opt_out.



Tapender Singh Yadav

unread,
Jun 24, 2014, 5:42:11 AM6/24/14
to clou...@googlegroups.com
Hello Suresh Sir,
                         I have been working on the VM Migration algorithm implementation in cloudsim. I wanted to know the steps to follow to migrate the VM from one host to another (similar to the question you asked about 3 years back). Your help in this regard will help me to move forward with my work.

Thanks & Regards,
Tapender Singh Yadav

Muthu Shanmuga Kannan

unread,
Nov 1, 2014, 3:07:22 AM11/1/14
to clou...@googlegroups.com
Sir,

I am new to clousim

can you please explain me how to initiate Vm migration inside datacenter by coding .

Please Help me sir. 

Dixxy Vlad

unread,
Nov 15, 2014, 3:30:06 AM11/15/14
to clou...@googlegroups.com
I don't know if you still want the answer, since it's two weeks ago.
But you can use VM_MIGRATE tag for migrating VMs within one datacenter
example of using is this,
sendNow(datacenterID, CloudSimTags.VM_MIGRATE, migrationData);

where migrationData is created like this,

HashMap<String, Object> migrationData = new HashMap<String, Object>();
migrationData
.put("vm", vmlist.get(0)); //the object of the VM you want to migrate
migrationData
.put("host", datacenter.getHostList().get(1)); //the host you want the VM to migrate in

And for some reasons, in my case, I have to comment out this line
host.removeMigratingInVm(vm);
in Datacenter.processVmMigrate(), or it will crash. (I have no idea why)


เมื่อ วันเสาร์ที่ 1 พฤศจิกายน ค.ศ. 2014, 14 นาฬิกา 7 นาที 22 วินาที UTC+7, Muthu Shanmuga Kannan เขียนว่า:

Anthony H.

unread,
Nov 17, 2014, 3:38:21 PM11/17/14
to clou...@googlegroups.com
Can you tell me the VM and Cloudlet Scheduler that you chose for the hosts and VMs ?
I managed to migrate one VM from an host to an another, but only with the CloudletSchedulerSpaceShared() scheduler and when the host has VmSchedulerTimeShared scheduler.

Otherwise, it crashed. I think that the simulator deletes the VM twice with the other schedulers (it can explain why your comment resolves this problem... but it may not work for the other schedulers).

Muhammad Yousaf

unread,
Nov 19, 2014, 12:19:18 AM11/19/14
to clou...@googlegroups.com
Hi,
I am also trying vm migration simulations, however, when I run simulation with Power Datacenter, it goes in some infinite loop and simulation is never completed. It happens after following message:
"Trying sending Cloudlet # to Vm #".

Anthony, can you please share that how you managed to migrate the vm?
Thanks.

--

---
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.


Dixxy Vlad

unread,
Nov 19, 2014, 3:56:42 AM11/19/14
to clou...@googlegroups.com
Hello Anthony,

With my, code any scheduler is fine. I tried using all of the scheduler, both VM scheduler and Cloudlet scheduler.
Could you tell me where you insert the migration code (what method and class)?

About the commented line, I think the CloudSim's dev expect the users to call 
host.addMigratingInVm(vm);
before we start the migration for some kinds of temporary resource allocation issues.
So when the migration is almost finished, they call
host.removeMigratingInVm(vm);
to let the VmAllocationPolicy does its job.




เมื่อ วันอังคารที่ 18 พฤศจิกายน ค.ศ. 2014, 3 นาฬิกา 38 นาที 21 วินาที UTC+7, Anthony H. เขียนว่า:

Anthony H.

unread,
Nov 19, 2014, 4:50:47 AM11/19/14
to clou...@googlegroups.com
I did the same as Dixxy Vlad said. Create a class which extends the Datacenter class and you override de processOtherEvent() method. Nevertheless, my program goes also into an infinite loop if a extend PowerDatacenter instead of Datacenter...

So, I created a new class (DatacenterMigration) which extends the Datacenter class. I overrode the registerOtherEntity() method (which will be called at the end of startEntity() ) in order to trigger a migration event (maybe it is the problem ? Where did you put that trigger ?) : 

send(this.getId() , this.getInitMigrDelay(), INITIATE_VM_MIGRATION); // INITIATE_VM_MIGRATION is my user tag - it will be recognized in processOtherEvent()

When the entity (itself) will receive the event notification in processOtherEvent(), it will do the same as you wrote before (create a Map and send the MV_MIGRATE event).
The rest of my program is based on the example 8, but here I create only two hosts within the same DatacenterMigration, with one VM that I want to move to an another Host. But I have problems with some schedulers ...

Did you proceed differently ?

Dixxy Vlad

unread,
Nov 19, 2014, 6:00:08 AM11/19/14
to clou...@googlegroups.com
Hello Anthony,

The way you initiate the migration may be the problem. I found out that the VMs will be ready to be used (created and allocated to its host) after all entity (datacenter, broker) is started.
So you have to initiate the migration when the VMs are ready, and of course, before all the cloudlet is done sending (CloudSim will be shutdown if there's no cloudlet left for sending).
I don't know where is the proper place to insert the code, but I insert it in the DatacenterBroker.processVmCreate() where Cloudsim starts submitting cloudlets right after all VM is done creating.
To be specific, I insert it at
if (getVmsCreatedList().size() == getVmList().size() - getVmsDestroyed()) {
   sendNow(srcDatacenterID, CloudSimTags.START_VM_MIRGRATE, data) //Initiate the migration here
   submitCloudlets();
}
Note that my research is about migrating VMs across two datacenters, so the objects like cloudlets is not in my interest.
You may need to do it in different way.

เมื่อ วันพุธที่ 19 พฤศจิกายน ค.ศ. 2014, 16 นาฬิกา 50 นาที 47 วินาที UTC+7, Anthony H. เขียนว่า:

Anthony H.

unread,
Nov 20, 2014, 5:01:28 AM11/20/14
to clou...@googlegroups.com
It seems weird to me to put this code there. Nevertheless, I tried your solution : it has the same behavior as before, it only works for some specific scheduler...

Giridharan Venugopal

unread,
Jun 1, 2015, 6:58:09 AM6/1/15
to clou...@googlegroups.com
hey hi,

I'm trying VM migration in cloudsim example 3, where there're 2 hosts in 1 datacenter. I'm trying to migrate the VM from host 1 to host 0. I've tried inserting your code in datacenterbroker.java class, but migration is not happening.

Can you please tell me how to perform VM migration for the above case.

Thanks,
Giridharan

Dixxy Vlad

unread,
Jun 1, 2015, 8:39:42 PM6/1/15
to clou...@googlegroups.com
Hi Giridharan,
My code posted earlier is for doing the cross-datacenter migration, in case of migrating within the same datacetner CloudSim has already had a function for it.

In class "org.cloudbus.cloudsim.Datacenter" in the 493th line:
protected void processVmMigrate(SimEvent ev, boolean ack) {...}

And there's the example of function using in class "org.cloudbus.cloudsim.power.PowerDatacenterNonPowerAware" in the 167th line:
send(getId(),
   vm.getRam() / ((double) vm.getBw() / 8000) + 10,
   CloudSimTags.VM_MIGRATE,
   migrate);

Also, there's similar code in "org.cloudbus.cloudsim.power.PowerDatacenter" in 87th line too:
protected void updateCloudletProcessing() {...}

You can either adapt the code in this power datacenter for a direct use (initiating a power datacenter is a bit complicated, at least in my thought), or you can insert these code into the default datacenter. Be sure that the code you insert will be called when you execute the program.

Hope this will help,
Vlad

Giridharan Venugopal

unread,
Jun 2, 2015, 11:11:51 PM6/2/15
to clou...@googlegroups.com
Thanks Vlad.

It'd be of great help if you could tell me how to call the processVmMigrate(SimEvent ev, boolean ack) method in the datacenter class from cloudsim3 example.

What should be passed as arguments?

Thanks,
Giridharan

Dixxy Vlad

unread,
Jun 3, 2015, 12:26:51 AM6/3/15
to clou...@googlegroups.com
Hi Giridharan,

1.) about calling function
protected void processVmMigrate(SimEvent ev, boolean ack) {...}

You need not to call it directly. You can just use a CloudSim's static function "send" or "sendNow" and leave the rest jobs to CloudSim, you have to specify the time to do the event for the former and have not to specify for the latter.
And the example of using those two function is existed in "org.cloudbus.cloudsim.power.PowerDatacenterNonPowerAware" in the 167th line:
send(getId(),
   vm.getRam() / ((double) vm.getBw() / 8000) + 10,
  CloudSimTags.VM_MIGRATE,
  migrate);
As you can see, it need 4 args. 
1.1) The destination of the migration, simply the id of the datacenter containing the VM being migrated itself since you want to migrate within one datacenter. 
1.2) The delay of the event, i.e., the second counted from now to start the event you want. 
1.3) The tag used by destination of "send" to specify which type of event is this, of course, you  have to use "CloudSimTags.VM_MIGRATE"
1.4) The data object for being used in the event

For 

protected void processVmMigrate(SimEvent ev, boolean ack) {...}
the object in 1.4) has to be the type "Map<String, Object>" with two keys in it, "vm" and "host" which the former is the VM being migrated and the latter is the destination host of the migration. You have to specify those yourselves.

2.) Where to call "send"?
The problem is , as far as I know, you cannot just simply call it in your main class since CloudSim will be terminated if all cloudlet has been sent (i.e., no cloudlet left).
So if you call "send" like this in your main class (CloudSimExample3)
CloudSim.startSimulation();
   send(dest, delayCloudSimTags.VM_MIGRATEdata);
CloudSim.stopSimulation();
your program will be crashed, "send" will not be able to find the destination because all entity, such as datacenters, is terminated (no cloudlet left before executing "send" function).

You have to find the other place to call "send" where it is executed by CloudSim before there is no cloudlet left.
For me, I insert the code at DatacenterBroker.processVmCreate()
if (getVmsCreatedList().size() == getVmList().size() - getVmsDestroyed()) {

   send(destDatacenterID, delay, CloudSimTags.VM_MIRGRATE, data) //Initiate the migration here
   submitCloudlets();
}
In this way, "send" will be called right after every VM is created and allocated to hosts (does not start sending cloudlets yet).
I don't know if this is the appropriate way to do it, but it does a trick for me.

Hope this will help,
Vlad

Giridharan Venugopal

unread,
Jun 3, 2015, 1:53:46 AM6/3/15
to clou...@googlegroups.com
Thank you so much Vlad.

As I've said earlier, I'm trying to migrate a VM in host 2 to host 1 in a single datacenter, by modifying example 3. This should be simple, right?

But no matter where I insert the code snippet, migration doesn't seem to be happening. I tried inserting it in the main method, then in the datacenterbroker class, and then in datacenter class. But no luck.

Can you please help?

Thanks,
Giridharan

Dixxy Vlad

unread,
Jun 3, 2015, 3:35:54 AM6/3/15
to clou...@googlegroups.com
Hi Giridharan,
Do you use JAR file of CloudSim? If yes, you have to build the JAR file first or the modified code won't affect. There's a "build.xml" tag along with CloudSim complete package as you can see in the picture.
And you can read its usage in "readme.txt".


But if you use CloudSim's source code directly, I have no idea.

Regards,

Vlad

Giridharan Venugopal

unread,
Jun 7, 2015, 1:24:06 AM6/7/15
to clou...@googlegroups.com
Thanks a lot Vlad. I tried building the jar file, but still no luck. 

Can't we initiate a migration from the main method? I mean how do we tell the program that I'm trying to initiate a migration?

a) We're creating cloudlets b) Then we create VMs c) Then we bind the cloudlets to VMs d) Then we create hosts and datacenters.

Once the VMs are placed in the hosts, i want to migrate the VMs from 1 host to another.

Why can't I insert this block in main method?

HashMap<String, Object> migrationData = new HashMap<String, Object>();
migrationData.put("vm", vmlist.get(1)); //the object of the VM you want to migrate
migrationData.put("host", 0); //the host you want the VM to migrate in
send(datacenterId,(vm1.getRam() / ((double) vm1.getBw() / 8000) + 10),CloudSimTags.VM_MIGRATE,migrationData);

If it cannot be called from main method, should I have to place these lines in Datacenter.java class or DatacenterBroker.java class?

Regards,
Giridharan

Dixxy Vlad

unread,
Jun 7, 2015, 1:45:17 AM6/7/15
to clou...@googlegroups.com
Like I posted earlier, CloudSim will be terminated if no cloudlet left to be sent.
To be more specific, if you call a line

CloudSim.startSimulation();
CloudSim will do jobs (send cloudlets) until nothing left and shutdown itself. Yes, it shuts itself down when all cloudlet done sending EVEN IF the line

CloudSim.stopSimulation();
has not been executed yet.

Therefore, putting the migration code between those 2 lines has no meaning since all cloudlet might be done sending before the migration code is called. If you have such a luck the migration code may be called right before all cloudlet done sending, but luck is not an option in the programs, right?. So, you have to find another place that will be called before it starts sending the cloudlets.

DatacenterBroker (the line I told you in earlier post) is perfectly fit to put the migration code for my project because it will be called right after ALL vm is allocated into hosts. If you have no problem with this way to call the migration, I recommend it.

For Datacenter, it's not appropriate to call the migration in this object because it does not know exactly when all vm is already allocated into its hosts. By the way, I'm not sure about this, you can check the flow of CloudSim by debugging the line "CloudSim.startSimulation();" to see if Datacenter knows when all vm is ready or not.

Regards,
Vlad

Dixxy Vlad

unread,
Jun 7, 2015, 1:55:57 AM6/7/15
to clou...@googlegroups.com
Oh, and you can just inherit class DatacenterBroker and override its method to modify the code instead of modifying the original one. This way will need not to build the CloudSim's JAR file.

Giridharan Venugopal

unread,
Jun 17, 2015, 11:50:24 PM6/17/15
to clou...@googlegroups.com
Thanks Vlad. One more silly doubt. Below are the properties of the cloudlets. If I want to increase the load, which of the below parameters should I have to increase?

long length = 1000;
long fileSize = 300;
long outputSize = 300;
int pesNumber = 1;





--

---
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/-_Vi3SCURcY/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.



--
Giridharan   

Amir Borhani

unread,
Jun 29, 2015, 3:16:36 AM6/29/15
to clou...@googlegroups.com
Hi Giridharan,
The cloudlet load equals (length * pesNumber) with the unit known as MI (Million Instruction). Therefore, In your example the cloudlet has 1000 MI load.
if you bind it to a Vm with 1 core and Mips=500, your cloudlet will be finished in 2 seconds.


I hope that helps you.
Amir

Mrugesh Master

unread,
Oct 22, 2015, 12:48:21 AM10/22/15
to cloudsim
Hello everyone,

I've created migration map. Also made necessary changes required to perform the migration inside updateCloudletProcessing() method of Datacenter.java file. The simulator performs the pre-defined part of the method but skips the code I've inserted for the migration. 

Do i need to make any other changes ?

Thank you

soumya grampurohit

unread,
Nov 15, 2015, 3:24:44 AM11/15/15
to cloudsim
Respected,

we are trying to migrate virtual machine from one host to another host in same datacenter using cloudsim 3 example.
we are getting error in datacenterbroker line 222.it is as 
 int[]  data= (int[]) ev.getdata();

processvmcreate(simevent ev)
 in this method the above line is used.
As your reply given on this same issue
i.e using 
send(destdatacenterid,0,cloudsimTags,data);
placing it in 
if(getVmscreationlist().size() ==getvmlist().size() - getvmsdestroyed())
{send(destdatacenterid,0,cloudsimTags,data);
submitcloudlets();
}

the sending data in the send line is in the form of int[] 
how to convert it to HashMap<string,object> 
we are getting error there .
please do help its very urgent ....


Atyaf

unread,
Nov 15, 2015, 2:25:53 PM11/15/15
to cloudsim
Hello
for load balancing based task how can I CALCULATE the load on  each vm how I startT  AND IF I use bee colony algorithm for scheduling where use or write it
pls can anyone help


Thank you

Meenakshi Dahiya

unread,
Nov 17, 2015, 10:20:22 AM11/17/15
to cloudsim
Hey vlad I want to do Task Migration, will it be done using the same procedure which is used for the VM migration or some other procedure is need to be follow? Please help me.

Dixxy Vlad

unread,
Nov 17, 2015, 1:07:16 PM11/17/15
to cloudsim
Hi Dahiya,

CloudSim has a variable names "cloudlets" that represents the data or tasks for VM to process. It also already has had the examples for cloudlet migration (not sure which example, and of course, it is the migration within the same data center). I am not sure if that variable will satisfy your objective. 

You may use what CloudSim provides or just inherit CloudSim's classes, define some other variables and create your own functions to do your jobs. Hope this will help :). 

Dixxy Vlad

unread,
Nov 17, 2015, 1:17:05 PM11/17/15
to cloudsim
Dear Grampurohit,

Don't know if you still want this help. 

HashMap hashData = new HashMap<String, Object>{"dataName",data};

The code above would satisfy your need (probably with a little better syntax). It simply just has to initialize the HashMap object and put "data" within it. Please note that "dataName" can be anything in the String form since it will be used to retrieve the "data" when you want to read this HashMap with hash name (it is not necessary if you have only one data within this HashMap).

Hetal Bhadja

unread,
Mar 3, 2016, 1:48:05 AM3/3/16
to cloudsim


On Friday, February 25, 2011 at 4:06:20 AM UTC+5:30, Rodrigo Calheiros wrote:
Dear suresh,

Migration we implemented is only for migrations inside the same data
center. To implement migration across data centers, you have to:

1. Define message tags to be exchanged between data centers to start
and accept the migration;

2. extend data centers to allow them to send and receive such messages; and

3. use the existing methods for migration inside the data center to
stop cloudlets in one side and restart in the other side.

Regards,
Rodrigo

Binal Parekh

unread,
Mar 14, 2016, 10:34:06 AM3/14/16
to cloudsim


how to migrate vm from one host to another ?


plz help me 

Manoel Campos

unread,
Mar 16, 2016, 10:21:47 AM3/16/16
to clou...@googlegroups.com
You can start by studying the PowerVmAllocationPolicyMigrationStaticThreshold class.
It extends (not directly) the VmAllocationPolicy class. When you create a datacenter,  you have
to inform what VmAllocationPolicy will be used to place VM. Using the PowerVmAllocationPolicyMigrationStaticThreshold, for instance, it will perform VM migrations based on CPU utilisation threshold of hosts.
But it is supposed to use this class with PowerDatacenter, PowerHost and PowerVm classes instead of the traditional ones.

You can see a complete examples in the package org.cloudbus.cloudsim.examples.power.planetlab. There are lots of examples using this policy, for instance the ThrMc one.


Manoel Campos da Silva Filho Professor and Software Engineer
manoel...@gmail.com | www.manoelcampos.com

Professor at Federal Institute of Education, Science and Technology of Tocantins - Brazil
Computer Science and Engineering PhD Student at University of Beira Interior - Portugal

 about.me

On Mon, Mar 14, 2016 at 2:34 PM, Binal Parekh <binalp...@gmail.com> wrote:


how to migrate vm from one host to another ?


plz help me 

--

---
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.

Binal Parekh

unread,
Mar 21, 2016, 12:00:45 PM3/21/16
to clou...@googlegroups.com
thank you sir

i did the migration but after migration there is no change in host utilization and no change in power. i destroyed vms from the old host but old host utilization is still same no change 

so whats problem there ? why i get same utilization and power after migration ??

--

---
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/-_Vi3SCURcY/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.



--



Thank you  

Binal Parekh

Manoel Campos

unread,
Mar 28, 2016, 6:49:52 PM3/28/16
to clou...@googlegroups.com
See the previous message I just posted. I included a simple example to perform VM migration.
You can study the example to try figure out what is wrong with your code.
After that, if you cannot find out the problem, I may try to help you.

Manoel Campos da Silva Filho Software Engineer

Computer Science and Engineering PhD Student at University of Beira Interior (Portugal)

Professor at Federal Institute of Education, Science and Technology of Tocantins (Brazil)

http://manoelcampos.com


 about.me

Muhammad Zakarya

unread,
Apr 7, 2016, 7:49:41 PM4/7/16
to cloudsim
see my recent post

Binal Parekh

unread,
Apr 17, 2016, 5:44:44 AM4/17/16
to clou...@googlegroups.com
sorry sir where you posted message related to VM migration?

Manoel Campos

unread,
Apr 18, 2016, 9:18:38 AM4/18/16
to clou...@googlegroups.com
You have to search in the forum for "VM migration" or "virtual machine migration". You can also filter for posts started by me.

Manoel Campos da Silva Filho Software Engineer

Computer Science and Engineering PhD Student at University of Beira Interior (Portugal)

Professor at Federal Institute of Education, Science and Technology of Tocantins (Brazil)

http://manoelcampos.com


 about.me

samar e

unread,
Oct 30, 2016, 2:35:32 PM10/30/16
to cloudsim
plz Dr Manoel Campos where's the example which perform VM migration.
i can't found it

gopi krishnan

unread,
Nov 3, 2016, 7:56:41 AM11/3/16
to cloudsim
Hi Giridharan

      I am new to  cloudsim and the clousim group. I am doing my research in VM migration using cloudsim and as per the previous conversations in this group I can see that you tried with CloudExample3 (for VM migration). When I tried to do the same  process using CloudExample3 in cloudsim for verification (I followed the same instructions as mentioned in this group) , I got stuck a little bit in the step after the  insertion of  'Send' [send(destDatacenterID, delay, CloudSimTags.VM_MIRGRATE, data)] command in DatacenterBroker.processVmCreate() method. Please help me how to call this method in Main program (Example3)...??

       Awaiting for your reply...

Thanks,
Gopi
Message has been deleted

samar e

unread,
Nov 3, 2016, 3:33:38 PM11/3/16
to cloudsim
i have same problem with (send )
and i need to migrate vm with pre-copy and post copy 
can any one help me plz 

gopi krishnan

unread,
Nov 6, 2016, 9:58:24 AM11/6/16
to cloudsim
Hi Samar

      Did you try to implement the changes using pre-copy/post-copy migration approach in cloudsim before?? Because I need to migrate VM using pre-copy approach in cloudsim and it will be very helpful for me to proceed further. 

Thanks 

Simar Preet Singh

unread,
Jan 12, 2017, 2:08:23 AM1/12/17
to cloudsim
Hi All,

Anyone has the final code of migrating vm with pre-copy and post copy from one host to another?
can any one help me in this.

Thanks,
Simar Preet
09815816740 

Amir Borhani

unread,
Jan 12, 2017, 3:00:22 AM1/12/17
to clou...@googlegroups.com
The general form of precopy migration is already implemented. Do you need to implement the actual precopy mechanism including dirty page etc?

Regards
Amir

Sent from BlueMail
On Jan 12, 2017, at 3:08 PM, Simar Preet Singh <er.simarp...@gmail.com> wrote:
Hi All,

Anyone has the final code of migrating vm with  pre-copy and  post copy from one host to another?
can any one help me in this.

Thanks,
Simar Preet
09815816740 

On Sunday, November 6, 2016 at 8:28:24 PM UTC+5:30, gopi krishnan wrote:
Hi Samar

      Did you try to implement the changes using pre-copy/post-copy migration approach in cloudsim before?? Because I need to migrate VM using pre-copy approach in cloudsim and it will be very helpful for me to proceed further. 

Thanks 

On Thursday, November 3, 2016 at 7:33:38 PM UTC, samar e wrote:
i have same problem with (send )
and i need to migrate vm with pre-copy and post copy 
can any one help me plz 



On Thursday, November 3, 2016 at 1:56:41 PM UTC+2, gopi krishnan wrote:
Hi Giridharan

      I am new to  cloudsim and the clousim group. I am doing my research in VM migration using cloudsim and as per the previous conversations in this group I can see that you tried with CloudExample3 (for VM migration). When I tried to do the same  process using CloudExample3 in cloudsim for verification (I followed the same instructions as mentioned in this group) , I got stuck a little bit in the step after the  insertion of  'Send' [ send(destDatacenterID, delay, CloudSimTags.VM_MIRGRATE, data)] command in DatacenterBroker. processVmCreate() method. Please help me how to call this method in Main program (Example3)...??
For 
protected void processVmMigrate ( SimEvent ev , boolean ack ) {...}
In class "org.cloudbus.cloudsim. Datacenter" in the 493th line:
protected void processVmMigrate(SimEvent ev, boolean ack) {...}

And there's the example of function using in class "org.cloudbus.cloudsim.power. PowerDatacenterNonPowerAware" in the 167th line:
send( getId(),
   vm.getRam() / ((double) vm.getBw() / 8000) + 10,
   CloudSimTags.VM_MIGRATE,
   migrate);

Also, there's similar code in "org.cloudbus.cloudsim.power. PowerDatacenter" in 87th line too:
protected void updateCloudletProcessing() {...}

You can either adapt the code in this power datacenter for a direct use (initiating a power datacenter is a bit complicated, at least in my thought), or you can insert these code into the default datacenter. Be sure that the code you insert will be called when you execute the program.

Hope this will help,
Vlad

On Monday, June 1, 2015 at 5:58:09 PM UTC+7, Giridharan Venugopal wrote:
hey hi,

I'm trying VM migration in cloudsim example 3, where there're 2 hosts in 1 datacenter. I'm trying to migrate the VM from host 1 to host 0. I've tried inserting your code in datacenterbroker.java class, but migration is not happening.

Can you please tell me how to perform VM migration for the above case.

Thanks,
Giridharan

On Saturday, 15 November 2014 16:30:06 UTC+8, Dixxy Vlad wrote:
I don't know if you still want the answer, since it's two weeks ago.
But you can use VM_MIGRATE tag for migrating VMs within one datacenter
example of using is this,
sendNow ( datacenterID , CloudSimTags . VM_MIGRATE , migrationData );

where migrationData is created like this,

HashMap < String , Object > migrationData = new HashMap < String , Object >();
migrationData
. put ( "vm" , vmlist . get ( 0 )); //the object of the VM you want to migrate
migrationData
. put ( "host" , datacenter . getHostList (). get ( 1 )); //the host you want the VM to migrate in

And for some reasons, in my case, I have to comment out this line
host . removeMigratingInVm ( vm );
in Datacenter.processVmMigrate(), or it will crash. (I have no idea why)


เมื่อ วันเสาร์ที่ 1 พฤศจิกายน ค.ศ. 2014, 14 นาฬิกา 7 นาที 22 วินาที UTC+7, Muthu Shanmuga Kannan เขียนว่า:
Sir,

I am new to clousim

can you please explain me how to initiate Vm migration inside datacenter by coding .

Please Help me sir. 

On Thursday, February 24, 2011 3:31:39 PM UTC+5:30, suresh moharana wrote:
Sir,

I am new to cloudsim. How to implement virtual machine migration in cloudsim.
Do we need to create two separate host or datacenters for vm
migration. Do we need
to create a entirely new code or is it possible to modify an inbulid
code to implement the vm migration. Kindly help me sir.

--

aya.a...@gmail.com

unread,
Apr 2, 2017, 3:56:23 AM4/2/17
to cloudsim


Hello all

 can anyone help me please, I'm trying VM  migration in cloudsim example 8,where there're 3 hosts in 1 datacenter ,I implemented the algorithm in a class  which is extended from 

VmAllocationPolicySimple class.  

my problem is when I run the code the  data center is starting and  the broker is starting then it fails in creating the VMs.    


aaina arora

unread,
May 8, 2017, 11:16:54 AM5/8/17
to cloudsim
Hey!

Can you tell me how to implement vm migration in workflow sim?
Message has been deleted
Message has been deleted

muzzamm...@gmail.com

unread,
May 3, 2019, 12:11:19 AM5/3/19
to cloudsim
hi, suresh, please how can I migrate cloudlet from one VM to another Vm in cloudsim
thank you


On Tuesday, March 1, 2011 at 11:08:01 AM UTC+8, suresh moharana wrote:

Sir,

I have created two hosts in a datacenter. I have also added a VM in one host and one cloudlet to the VM. I want to migrate the VM from the host having the VM to the other host. What are the steps i need to follow to migrate the VM and measure the total migration time for the VM migration. Plz help.

Suresh.

Mohammed Alanzy

unread,
May 3, 2019, 4:00:36 AM5/3/19
to clou...@googlegroups.com
I think you have to make your simulation run based on a period of time then every several mins you should check the utilization for the VMs then you select a specific cloudlet to migrate it, 

you can see the examples in the power or PlanetLab packages, it may help if you follow the same process 


Yours faithfully,
M. Alanzy 


--

---
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.

Muzzammil Mansur

unread,
May 3, 2019, 7:18:44 AM5/3/19
to clou...@googlegroups.com
Thank you for the information.
Really appreciate it

Saira Manzoor

unread,
May 4, 2019, 6:19:41 AM5/4/19
to clou...@googlegroups.com
sir could u please specify example name  in  PlanetLab ?
thanks 

Mohammed Alanzy

unread,
May 5, 2019, 8:49:53 PM5/5/19
to clou...@googlegroups.com
for instance "IqrMmt" the 3rd example which implementing minimum migration time 
class "PowerVmAllocationPolicyMigrationAbstract" in the sources>power
Class "HostDynamicWorkload " in source/cloudsim/HostDynamicWorkload.java

you can see them and try to understand the concepts 


Yours faithfully,
M. Alanzy 

Saira Manzoor

unread,
May 6, 2019, 6:14:58 AM5/6/19
to clou...@googlegroups.com
sir is it task migration example or VM migration example?

Mohammed Alanzy

unread,
May 6, 2019, 7:15:52 PM5/6/19
to clou...@googlegroups.com
VM migration example
read the previous emails, I told him/her to see the structure of migration, as far as I know, there's no "task migration" example in cloudsim


Thanks
M. Alanzy 

Saira Manzoor

unread,
May 7, 2019, 5:50:03 AM5/7/19
to clou...@googlegroups.com
yup, that's wt I was asking. 
thanks 
Reply all
Reply to author
Forward
0 new messages