Openstack-M版(双节点)热迁移记录

简介: Openstack-M版(双节点)热迁移记录

本次测试采用如下配置

主机名 配置 IP地址
controller 4G4核 192.168.100.10
compute 4G4核 192.168.100.20

# 1.编辑/etc/sysconfig/libvirtd文件
# 2.编辑/etc/libvirtd/libvirtd.conf文件
# 3.重启libvirtd服务
# 4.测试virsh链接
# 5.编辑/etc/nova/nova.conf文件
# 6.重启nova服务
# 7.开始热迁移
# 8.检查

1.编辑/etc/sysconfig/libvirtd文件

[root@controller ~]# vi /etc/sysconfig/libvirtd 
# Override the default config file
# NOTE: This setting is no longer honoured if using
# systemd. Set '--config /etc/libvirt/libvirtd.conf'
# in LIBVIRTD_ARGS instead.
LIBVIRTD_CONFIG=/etc/libvirt/libvirtd.conf

# Listen for TCP/IP connections
# NB. must setup TLS/SSL keys prior to using this
LIBVIRTD_ARGS="--listen"
[root@compute ~]# vi /etc/sysconfig/libvirtd 
# Override the default config file
# NOTE: This setting is no longer honoured if using
# systemd. Set '--config /etc/libvirt/libvirtd.conf'
# in LIBVIRTD_ARGS instead.
LIBVIRTD_CONFIG=/etc/libvirt/libvirtd.conf

# Listen for TCP/IP connections
# NB. must setup TLS/SSL keys prior to using this
LIBVIRTD_ARGS="--listen"

在这里插入图片描述
+
+
+
+
+
+

2.编辑/etc/libvirtd/libvirtd.conf文件

 22 listen_tls = 0
 23 
 24 # Listen for unencrypted TCP connections on the public TCP/IP port.
 25 # NB, must pass the --listen flag to the libvirtd process for this to
 26 # have any effect.
 27 #
 28 # Using the TCP socket requires SASL authentication by default. Only
 29 # SASL mechanisms which support data encryption are allowed. This is
 30 # DIGEST_MD5 and GSSAPI (Kerberos5)
 31 #
 32 # This is disabled by default, uncomment this to enable it.
 33 listen_tcp = 1
 163 auth_tcp = "none"

在这里插入图片描述在这里插入图片描述

3.重启libvirtd服务

[root@controller ~]# systemctl restart libvirtd
[root@controller ~]# systemctl restart libvirtd    

在这里插入图片描述

4.测试virsh链接

[root@controller ~]# virsh -c qemu+tcp://compute/system
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # 


[root@conmpute ~]# virsh -c qemu+tcp://controller/system
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # 

在这里插入图片描述

5.编辑/etc/nova/nova.conf文件

两个节点都需要操作

   3734 live_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER, VIR_MIGRATE_LIVE, VIR_MIGRATE_TUNNELLED
   3735 
   3736 # Migration flags to be set for block migration (string value)
   3737 # This option is deprecated for removal.
   3738 # Its value may be silently ignored in the future.
   3739 # Reason: The correct block migration flags can be inferred from the new
   3740 # live_migration_tunnelled config option. block_migration_flag will be removed
   3741 # to avoid potential misconfiguration.
   3742 block_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER, VIR_MIGRATE_LIVE, VIR_MIGRATE_NON_SHARED_INC

在这里插入图片描述

6重启nova服务

dd
[root@controller ~]# systemctl restart openstack-nova*
[root@compute ~]# systemctl restart openstack-nova*

7.开始热迁移

查看实例ID (这里的test为实例名称)

[root@controller ~]# nova show test |awk -F '|' NR==29'{print $3}'
 7a3ba94d-da58-4108-b927-29d3469da357 

开始迁移(这里的test实例原本在compute节点,这里需要热迁移到controller节点)

[root@controller ~]# nova live-migration 7a3ba94d-da58-4108-b927-29d3469da357 controller

8.检查

[root@controller ~]# nova show test
+--------------------------------------+----------------------------------------------------------+
| Property                             | Value                                                    |
+--------------------------------------+----------------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                                   |
| OS-EXT-AZ:availability_zone          | nova                                                     |
| OS-EXT-SRV-ATTR:host                 | controller                                               |
| OS-EXT-SRV-ATTR:hostname             | test                                                     |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | controller                                               |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000004                                        |
| OS-EXT-SRV-ATTR:kernel_id            |                                                          |
| OS-EXT-SRV-ATTR:launch_index         | 0                                                        |
| OS-EXT-SRV-ATTR:ramdisk_id           |                                                          |
| OS-EXT-SRV-ATTR:reservation_id       | r-coe0peip                                               |
| OS-EXT-SRV-ATTR:root_device_name     | /dev/vda                                                 |
| OS-EXT-SRV-ATTR:user_data            | -                                                        |
| OS-EXT-STS:power_state               | 1                                                        |
| OS-EXT-STS:task_state                | -                                                        |
| OS-EXT-STS:vm_state                  | active                                                   |
| OS-SRV-USG:launched_at               | 2019-11-05T07:00:26.000000                               |
| OS-SRV-USG:terminated_at             | -                                                        |
| accessIPv4                           |                                                          |
| accessIPv6                           |                                                          |
| config_drive                         |                                                          |
| created                              | 2019-11-05T06:59:24Z                                     |
| description                          | -                                                        |
| flavor                               | m1.small (2)                                             |
| hostId                               | 8ffe301f6f31cde750b8a8ce296684831da56b737e0ef3580d86f305 |
| host_status                          | UP                                                       |
| id                                   | 7a3ba94d-da58-4108-b927-29d3469da357                     |
| image                                | centos7.2 (8d98c502-70ee-44d1-8c75-bfef2d1ca444)         |
| int-net network                      | 10.0.0.6                                                 |
| key_name                             | -                                                        |
| locked                               | False                                                    |
| metadata                             | {}                                                       |
| name                                 | test                                                     |
| os-extended-volumes:volumes_attached | []                                                       |
| progress                             | 0                                                        |
| security_groups                      | default                                                  |
| status                               | ACTIVE                                                   |
| tenant_id                            | 01bf9902a50c4fddb601a0e3edf37c32                         |
| updated                              | 2019-11-05T11:11:16Z                                     |
| user_id                              | 8a163fbfcf80471883d1c3d34ae2aeef                         |
+--------------------------------------+----------------------------------------------------------+
目录
相关文章
openstack实例热迁移
[DEFAULT]scheduler_default_filters=AllHostsFilterallow_resize_to_same_host=Trueallow_migrate_to_same_host=Truecpu_allocation_ration=158.
1014 0
|
网络协议 Linux 网络安全
openstack 云平台一体化部署(超详细)
openstack 云平台一体化部署(超详细)
1337 0
openstack 云平台一体化部署(超详细)
|
消息中间件 Kubernetes 关系型数据库
教程get | K8S部署OpenStack容器云(下)
如何借助OpenStack Kolla-K8S项目,通过K8S对OpenStack进行容器化部署?并最终部署一套All-In-One类型的OpenStack容器云?让我们继续部署: 部署kolla-kubernetes ■  覆盖默认的RBAC设置 通过kubectl replace命令进行默.
4690 0
|
4月前
|
消息中间件 缓存 Shell
跟我一起来学OpenStack部署
跟我一起来学OpenStack部署
340 0
|
5月前
|
存储 数据安全/隐私保护 Docker
Kolla-ansible部署openStack
Kolla-ansible部署openStack
456 11
|
7月前
|
Linux 网络安全 数据库
openstack 部署单节点
在CentOS 7系统上,配置了一台拥有4核CPU、8GB内存和300GB磁盘的服务器,安装了OpenStack Trian版本。安装完成后,获取了OpenStack管理控制台的登录凭证(admin用户和密码),可访问IP地址192.168.200.249/dashboard进行登录。如果遇到问题,可能需要重新安装以确保纯净环境。
337 0
|
存储 弹性计算 资源调度
openstack组件部署 3
openstack组件部署
154 0
|
7月前
|
存储 Ubuntu KVM
Ubuntu部署OpenStack踩坑指南:还要看系统版本?
Ubuntu部署OpenStack踩坑指南:还要看系统版本?
Ubuntu部署OpenStack踩坑指南:还要看系统版本?
|
7月前
|
存储 安全 Linux
云计算|OpenStack|社区版OpenStack安装部署文档(一 --- 前期硬件准备和部署规划)
云计算|OpenStack|社区版OpenStack安装部署文档(一 --- 前期硬件准备和部署规划)
1409 0
|
负载均衡 安全 网络安全
openstack组件部署 4
openstack组件部署