VM Migration failing on Re-allocate step

0 views
Skip to first unread message

Kaiyi Huang

unread,
Oct 7, 2021, 4:44:04 PM10/7/21
to CloudSim Plus: Cloud Simulation Framework
Hello,

I am a Master's student trying to implement some migration-based load balancing algorithms in Cloudsim Plus. I am a novice at this.

I modified one of the migration examples (MigrationExample1), adding a clocktick that lowers the overutilization threshold so a migration would be triggered. However, when the migration happens, it appears that the allocation map drops many of the other VMs with a message like "ERROR VmAllocationPolicy: Couldn't restore 1  on Host 1/DC 1" and the migration itself would also fail with "Creation of 0  on Host 5/DC 1 failed due to lack of PEs." despite the Host having more than enough PEs to accommodate the VM.

Am I doing something wrong? What could be causing this issue?

Can somebody shed some light on this?

Thanks

Prof. Manoel Campos

unread,
Oct 8, 2021, 6:01:17 AM10/8/21
to clouds...@googlegroups.com
Hello Kaiyi,

I don't think you are doing anything wrong.
It seems to be some bug.
I haven't worked much in this VM migration feature and it inherits critical issues from CloudSim yet, such as this one.
I'll take a look and let you know.

Thanks for reporting.

Manoel Campos da Silva Filho Software Engineer

Computer Science and Engineering Ph.D. Student at University of Beira Interior (Portugal)

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

http://manoelcampos.com


 about.me


--
If you received an answer that worked for you, please be kind and reply to let everybody knows it worked.
http://cloudsimplus.org
---
You received this message because you are subscribed to the Google Groups "CloudSim Plus: Cloud Simulation Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloudsim-plu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudsim-plus/347c81a4-6dcc-4349-84f8-19b96aa348b9n%40googlegroups.com.

Kaiyi Huang

unread,
Oct 8, 2021, 7:46:17 PM10/8/21
to CloudSim Plus: Cloud Simulation Framework
Hi Manoel,

Thank you so much for the quick response, I really appreciate it!

Is there a rough ETA on a fix or a band-aid for this issue? My current masters project is due not far in the future involves simulating VM migration procedures through CloudSim.

Thanks again!

Prof. Manoel Campos

unread,
Oct 8, 2021, 7:50:47 PM10/8/21
to clouds...@googlegroups.com
I just need a couple of days. I'm already working on it.

Prof. Manoel Campos

unread,
Oct 9, 2021, 6:57:09 AM10/9/21
to clouds...@googlegroups.com
Hello Kaiyi,

The issue has just been fixed in PR #353.
Update to v7.1.0 (which will be available in Maven Central in some minutes).
Thanks for reporting. 
If you haven't given CloudSim Plus a star at GitHub, please take a second to do it.
That helps promote the project. I really appreciate it.

Best regards,

Manoel Campos da Silva Filho Software Engineer

Computer Science and Engineering Ph.D. Student at University of Beira Interior (Portugal)

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

http://manoelcampos.com


 about.me

Kaiyi Huang

unread,
Oct 9, 2021, 11:29:42 PM10/9/21
to CloudSim Plus: Cloud Simulation Framework
Hi Manoel,

Thanks for the timely response! I'll be sure to leave a star!

Kaiyi Huang

unread,
Oct 10, 2021, 12:17:58 AM10/10/21
to CloudSim Plus: Cloud Simulation Framework
Hi Manoel,

I updated to the latest repo and updated my custom derivations of the base classes, making sure that the pushed fix is included. However, I am still getting this issue.

Thanks!
Kaiyi

Prof. Manoel Campos

unread,
Oct 10, 2021, 7:58:05 AM10/10/21
to clouds...@googlegroups.com
Hello Kaiyi,

I confirmed the migrations happen as expected and the MIPS for VM migration are used for MigrationExample1 and ManualMigrationExample1.

Taking a look at your repo, I've checked you are doing things in the wrong way.
This is a mistake that many users make. I warn about that in the IMPORTANT section at the top of CloudSim Plus README.

You created specific objects such as VmSocial, SocialHost and SocialDatacenter by duplicating the entire class file, instead of using OOP principles such as inheritance to extend existing classes. CloudSim Plus code base is huge and several classes are involved in migration processes. Some of the classes you duplicated from a previous CloudSim Plus version may have some differences from the current version. CloudSim Plus has a fast development speed and the number of changes performed every week is sometimes huge.
The way you followed is expected to bring some issues for you. As more bugs are fixed in CloudSim Plus, more difficult will be for you to update your fork and duplicated files (which will require manual work).

The correct way to implement new projects based on CloudSim Plus is to create an empty maven project, add CloudSim Plus as a dependency and then extend the classes you want (instead of duplicating their source files).
If you check the Related Projects section, all relevant projects using CloudSim Plus have followed that way.

I don't know how your Social classes are different from the original ones, but I suggest you try creating an empty project and just include CloudSim Plus as a dependency in your pom.xml. Then, make your classes extend the original ones such as VmSimples, HostSimple and DatacenterSimple.

Then, try to run your example again.

Manoel Campos da Silva Filho Software Engineer

Computer Science and Engineering Ph.D. Student at University of Beira Interior (Portugal)

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

http://manoelcampos.com


 about.me

Prof. Manoel Campos

unread,
Oct 10, 2021, 8:08:11 AM10/10/21
to clouds...@googlegroups.com
Just to make clear how the approach you follow will bring lots of issues,
the examples that work on the original CloudSim Plus repo don't work on your fork.
You have changes on critical classes such as VmSchedulerAbstract.

The baseline is: if you are making changes to CloudSim Plus classes that aren't general-purpose changes, you may be doing something in the wrong way.
 

Manoel Campos da Silva Filho Software Engineer

Computer Science and Engineering Ph.D. Student at University of Beira Interior (Portugal)

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

http://manoelcampos.com


 about.me

Kaiyi Huang

unread,
Oct 10, 2021, 10:12:52 PM10/10/21
to CloudSim Plus: Cloud Simulation Framework
Thanks for the clarification! I've gotten it working now and have re-coded the classes through inheritance instead.

Kaiyi

Prof. Manoel Campos

unread,
Oct 11, 2021, 7:29:55 AM10/11/21
to clouds...@googlegroups.com
Great :D

Manoel Campos da Silva Filho Software Engineer

Computer Science and Engineering Ph.D. Student at University of Beira Interior (Portugal)

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

http://manoelcampos.com


 about.me

Reply all
Reply to author
Forward
0 new messages