Instance Live Migration in OpenStack using CLI

Dear friend, in this tutorial we will see Instance Live Migration in OpenStack using CLI. Instance Migration will be needed when we need to migrate our running instance from one host to another host without any network break.

For more details you can see OpenStack site. Click here

Suppose if our one compute node is failing to provide compute services due to memory issue, CPU issue or any hardware issue then we can move our instance to another host and we can repaired our compute node.

We will follow these steps to perform instance live migration

  • Find the Instance ID.
  • Determine the host where instance is running.
  • Select the compute node where you want to migrate the instance.
  • Before migration check the compute node has enough resources.
  • Instance live migration to another host.
  • Verify instance live migration.

Find the Instance ID

We can find the instance, which we want to move to another host. “openstack server list” command can be use to display instance list with Instance ID, where installer is our instance name and ID is our instance ID.

Determine the host where instance is running.

Determine the host where is our instance is running. “openstack server show installer” command can be use to display host were instance is running.

Select the compute node where you want to migrate the instance.

Select the compute node where you want to migrate the instance. In this example, we will migrate the instance to overcloud-sriovperformancecompute-0.localdomain.

[stack@undercloud (cbamrc.v2) ~]$ openstack compute service list

Before migration check the compute node has enough resources.

We need to be checked our compute node has enough resources are available or not? We can check resource status with this command “openstack host show overcloud-sriovperformancecompute-0.localdomain”.

[stack@undercloud (cbamrc.v2) ~]$ openstack host show overcloud-sriovperformancecompute-0.localdomain
+-------------------------------------------------+------------+-----+-----------+---------+
| Host | Project | CPU | Memory MB | Disk GB |
+-------------------------------------------------+------------+-----+-----------+---------+
| overcloud-sriovperformancecompute-0.localdomain | (total) | 56 | 195222 | 210028 |
| overcloud-sriovperformancecompute-0.localdomain | (used_now) | 0 | 2048 | 0 |
| overcloud-sriovperformancecompute-0.localdomain | (used_max) | 0 | 0 | 0 |
+-------------------------------------------------+------------+-----+-----------+---------+
[stack@undercloud (cbamrc.v2) ~]$

Instance live migration to another host.

Now we can use this command “nova live-migration installer overcloud-sriovperformancecompute-0.localdomain” to migrate instance on compute node 0.

[stack@undercloud (cbamrc.v2) ~]$ nova live-migration installer overcloud-sriovperformancecompute-0.localdomain

Verify instance after live migration.

After successfully performed instance migration command, we can check our instance is migrated successfully or not?

[stack@urclouds (cbamrc.v2) ~]$ openstack server show installer
+--------------------------------------+------------------------------------------------------------+
| Field | Value |
+--------------------------------------+------------------------------------------------------------+
| OS-DCF:diskConfig | AUTO |
| OS-EXT-AZ:availability_zone | zone1 |
| OS-EXT-SRV-ATTR:host | overcloud-sriovperformancecompute-1.localdomain |
| OS-EXT-SRV-ATTR:hypervisor_hostname | overcloud-sriovperformancecompute-1.localdomain |
| OS-EXT-SRV-ATTR:instance_name | instance-0000007a |
| OS-EXT-STS:power_state | Running |
| OS-EXT-STS:task_state | None |
| OS-EXT-STS:vm_state | active |
| OS-SRV-USG:launched_at | 2019-02-28T07:27:45.000000 |
| OS-SRV-USG:terminated_at | None |
| accessIPv4 | |
| accessIPv6 | |
| addresses | CBAM-External-net=10.11.182.45 |
| config_drive | |
| created | 2019-02-28T07:27:12Z |
| flavor | CBAM-installer-Node (c16a7c06-7c40-450a-9725-a144cf214377) |
| hostId | 0259399f106b5eae5d0b1bda44fbe327ee4cb5710d987ad2bd91cb01 |
| id | 02e5778c-e081-4125-a1f9-040cacb81ca5 |
| image | installer (a79011d4-f04d-4dad-a91c-c46c54073446) |
| key_name | keypair-installer |
| name | installer |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| project_id | 67eff8b0b01f4d0abeb129df3debcd39 |
| properties | |
| security_groups | [{u'name': u'cbam-installer-sec-group'}] |
| status | ACTIVE |
| updated | 2019-02-28T07:27:45Z |
| user_id | 185ad06f82b445419dcf4cd137144ab3 |
+--------------------------------------+------------------------------------------------------------+
[stack@undercloud (cbamrc.v2) ~]$

You can see in above output, our instance has been successfully migrated on compute node 1.

You can also check this link: –

Openstack instance management using CLI

This Post Has 20 Comments

  1. vreyrolinomit

    You could definitely see your skills in the work you write. The world hopes for more passionate writers like you who aren’t afraid to say how they believe. At all times follow your heart. “The only way most people recognize their limits is by trespassing on them.” by Tom Morris.

  2. vreyro linomit

    This is the right blog for anyone who wants to find out about this topic. You realize so much its almost hard to argue with you (not that I actually would want…HaHa). You definitely put a new spin on a topic thats been written about for years. Great stuff, just great!

  3. vreyrolinomit

    Good day! Would you mind if I share your blog with my myspace group? There’s a lot of people that I think would really enjoy your content. Please let me know. Many thanks

  4. zortilonrel

    Valuable information. Lucky me I found your web site by accident, and I’m shocked why this accident did not happened earlier! I bookmarked it.

  5. froleprotrem

    Do you have a spam problem on this website; I also am a blogger, and I was wondering your situation; many of us have created some nice procedures and we are looking to trade solutions with others, why not shoot me an e-mail if interested.

  6. froleprotrem

    Utterly composed content material, appreciate it for information .

  7. zortilo nrel

    I have been checking out a few of your posts and i can state pretty clever stuff. I will definitely bookmark your website.

  8. graliontorile

    I like this site its a master peace ! Glad I noticed this on google .

  9. zoritoler imol

    Thanks , I’ve recently been looking for info about this subject for ages and yours is the greatest I’ve discovered so far. But, what about the conclusion? Are you sure about the source?

  10. graliontorile

    Thank you for sharing excellent informations. Your site is so cool. I am impressed by the details that you’ve on this blog. It reveals how nicely you perceive this subject. Bookmarked this web page, will come back for more articles. You, my friend, ROCK! I found just the information I already searched everywhere and just couldn’t come across. What an ideal web-site.

  11. gralion torile

    I truly appreciate this post. I have been looking everywhere for this! Thank goodness I found it on Bing. You have made my day! Thx again

  12. zoritoler imol

    What i don’t realize is actually how you are not actually much more well-liked than you might be now. You are so intelligent. You realize therefore considerably relating to this subject, produced me personally consider it from so many varied angles. Its like men and women aren’t fascinated unless it’s one thing to accomplish with Lady gaga! Your own stuffs excellent. Always maintain it up!

  13. zoritoler imol

    Rattling excellent information can be found on website.

  14. gralion torile

    Whats up are using WordPress for your site platform? I’m new to the blog world but I’m trying to get started and create my own. Do you require any coding expertise to make your own blog? Any help would be really appreciated!

  15. mortgage broker near me

    Yes! Finally something about mortgage broker near me.

  16. zoritoler imol

    Thanks for another informative site. Where else could I get that kind of information written in such an ideal way? I have a project that I’m just now working on, and I’ve been on the look out for such information.

  17. graliontorile

    An impressive share, I simply given this onto a colleague who was doing a bit of analysis on this. And he in truth purchased me breakfast as a result of I found it for him.. smile. So let me reword that: Thnx for the deal with! But yeah Thnkx for spending the time to debate this, I feel strongly about it and love studying more on this topic. If potential, as you grow to be experience, would you thoughts updating your blog with extra particulars? It’s extremely helpful for me. Big thumb up for this weblog submit!

  18. gralion torile

    I haven¦t checked in here for a while as I thought it was getting boring, but the last few posts are great quality so I guess I¦ll add you back to my daily bloglist. You deserve it my friend 🙂

  19. graliontorile

    As soon as I discovered this site I went on reddit to share some of the love with them.

  20. zoritoler imol

    I will right away snatch your rss as I can’t find your e-mail subscription link or e-newsletter service. Do you have any? Please let me recognize in order that I may just subscribe. Thanks.

Leave a Reply