How To Migrate Running Instances From One Openstack Compute Server To Another Openstack Compute Server

0 votes

Hi Guys,

In AWS we can migrate our instance from one account to another account, one Dedicated host to another Dedicated host. I have one instance in OpenStack and I want to migrate it from One Openstack Compute Server To Another Openstack Compute Server. How can I do that?

Thank You

Mar 17, 2020 in OpenStack by akhtar
• 38,260 points
1,162 views

1 answer to this question.

0 votes

Hi@akhtar,

You can migrate your instance in OpenStack also. Follow the below given steps.

  • Check the ID of the instance to be migrated.
$ openstack server list
+--------------------------------------+------+--------+-----------------+------------+
| ID                                   | Name | Status | Networks        | Image Name |
+--------------------------------------+------+--------+-----------------+------------+
| d1df1b5a-70c4-4fed-98b7-423362f2c47c | vm1  | ACTIVE | private=a.b.c.d | ...        |
+--------------------------------------+------+--------+-----------------+------------+
| d693db9e-a7cf-45ef-a7c9-b3ecb5f22645 | vm2  | ACTIVE | private=e.f.g.h | ...        |
+--------------------------------------+------+--------+-----------------+------------+
  •  Check the information associated with the instance. In this example, vm1 is running on HostB.

$ openstack server show d1df1b5a-70c4-4fed-98b7-423362f2c47c
+----------------------+--------------------------------------+
| Field                | Value                                |
+----------------------+--------------------------------------+
| ...                  | ...                                  |
| OS-EXT-SRV-ATTR:host | HostB                                |
| ...                  | ...                                  |
| addresses            | a.b.c.d                              |
| flavor               | m1.tiny                              |
| id                   | d1df1b5a-70c4-4fed-98b7-423362f2c47c |
| name                 | vm1                                  |
| status               | ACTIVE                               |
| ...                  | ...                                  |
+----------------------+--------------------------------------+
  • Select the compute node the instance will be migrated to. In this example, we will migrate the instance to HostC.

$ openstack compute service list
+----+------------------+-------+----------+---------+-------+----------------------------+
| ID | Binary           | Host  | Zone     | Status  | State | Updated At                 |
+----+------------------+-------+----------+---------+-------+----------------------------+
|  3 | nova-conductor   | HostA | internal | enabled | up    | 2017-02-18T09:42:29.000000 |
|  4 | nova-scheduler   | HostA | internal | enabled | up    | 2017-02-18T09:42:26.000000 |
|  5 | nova-consoleauth | HostA | internal | enabled | up    | 2017-02-18T09:42:29.000000 |
|  6 | nova-compute     | HostB | nova     | enabled | up    | 2017-02-18T09:42:29.000000 |
|  7 | nova-compute     | HostC | nova     | enabled | up    | 2017-02-18T09:42:29.000000 |
+----+------------------+-------+----------+---------+-------+----------------------------+
  • Check that HostC has enough resources for migration.

$ openstack host show HostC
+-------+------------+-----+-----------+---------+
| Host  | Project    | CPU | Memory MB | Disk GB |
+-------+------------+-----+-----------+---------+
| HostC | (total)    |  16 |     32232 |     878 |
| HostC | (used_now) |  22 |     21284 |     422 |
| HostC | (used_max) |  22 |     21284 |     422 |
| HostC | p1         |  22 |     21284 |     422 |
| HostC | p2         |  22 |     21284 |     422 |
+-------+------------+-----+-----------+---------+
  • Migrate the instance using the openstack server migrate command.

$ openstack server migrate SERVER --live HOST_NAME

Check that the instance has been migrated successfully, using openstack server list.

Hope it will help you.

Thank You

answered Mar 17, 2020 by MD
• 95,460 points

Related Questions In OpenStack

0 votes
1 answer

How to assign public IP to OpenStack instances?

You can have a look at this ...READ MORE

answered Feb 25, 2019 in OpenStack by Priyaj
• 58,020 points
1,608 views
0 votes
1 answer

How to create an image in OpenStack from CLI?

Hi@akhtar, You have to first download one preinstalled ...READ MORE

answered Jul 6, 2020 in OpenStack by MD
• 95,460 points
2,047 views
0 votes
1 answer

Which one is better to learn OpenStack or AWS?

Hi@akhtar, It depends on you what you are ...READ MORE

answered Mar 13, 2020 in OpenStack by MD
• 95,460 points
1,225 views
0 votes
1 answer

How to get OpenStack software for installation?

Hi@akhtar, There are two ways to get OpenStack ...READ MORE

answered Mar 13, 2020 in OpenStack by MD
• 95,460 points
803 views
0 votes
1 answer

Can anyone explain, how nova works internally?

Hi@akhtar, Nova is comprised of multiple server process, ...READ MORE

answered Mar 17, 2020 in OpenStack by MD
• 95,460 points
1,711 views
0 votes
1 answer

How to create an instance in OpenStack?

Hi@akhtar, When we try to launch an instance ...READ MORE

answered Mar 17, 2020 in OpenStack by anonymous
• 95,460 points
2,643 views
0 votes
1 answer

Instance is not pingable from outside in OpenStack!

Ho@akhtar, There is nothing wrong. But when you ...READ MORE

answered Mar 17, 2020 in OpenStack by MD
• 95,460 points
6,438 views
0 votes
1 answer

How to reset error state of a instance into active in OpenStack env?

Hi@akhtar, There are some scenarios where some instances ...READ MORE

answered Mar 17, 2020 in OpenStack by MD
• 95,460 points
9,621 views
0 votes
1 answer

How to launch one instance in OpenStack from CLI?

Hi@akhtar, You need to login to your OpenStack ...READ MORE

answered Jul 5, 2020 in OpenStack by MD
• 95,460 points
1,046 views
0 votes
1 answer

How to login with demo account in OpenStack from CLI?

Hi@akhtar, Packstack program will generate to file when ...READ MORE

answered Jul 3, 2020 in OpenStack by MD
• 95,460 points
956 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP