openstack 删除计算节点

停止计算节点服务,此时该节点上的 vm 还能使用

[root@k8s01 ~]# nova service-list | grep  cmp38
| aeebc762-6bf8-49be-8809-e779658f0411 | nova-compute     | cmp38     | nova     | enabled | up    | 2020-09-18T11:26:24.000000 | -               | False       |
[root@k8s01 ~]# nova service-disable aeebc762-6bf8-49be-8809-e779658f0411
+--------------------------------------+-------+--------------+----------+
| ID                                   | Host  | Binary       | Status   |
+--------------------------------------+-------+--------------+----------+
| aeebc762-6bf8-49be-8809-e779658f0411 | cmp38 | nova-compute | disabled |
+--------------------------------------+-------+--------------+----------+
...

cmp38 down 掉,迁移该节点上的 vm

[root@k8s01 ~]# nova service-list
+--------------------------------------+------------------+-----------+----------+----------+-------+----------------------------+-----------------+-------------+
| Id                                   | Binary           | Host      | Zone     | Status   | State | Updated_at                 | Disabled Reason | Forced down |
+--------------------------------------+------------------+-----------+----------+-----

host-evacuate 迁移 cmp38 上面的 vm

[root@k8s01 ~]# nova hypervisor-servers cmp38
[root@k8s01 ~]# nova  host-evacuate cmp38
+--------------------------------------+-------------------+---------------+
| Server UUID                          | Evacuate Accepted | Error Message |
+--------------------------------------+-------------------+---------------+
| 184d5af2-f802-448d-81ff-299ee032ba59 | True              |               |
+--------------------------------------+-------------------+---------------+

删除计算节点服务

nova service-delete c cmp38
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值