一、在虚拟机里修改虚拟网卡配置

cd /ect/sysconfig/network-scripts/

vi ifcfg-eth0

改BOOTPROTO=static

cp ifcfg-eth0 ifcfg-eth0:1   #复制配置文件#

vi ifcfg-eth0:1

改DEVICE=eth0:1

改IPADDR=新的IP

service network restart

 

二、找到网络控制节点

在控制节点中使用neutron agent-list,找到其中的Metadata agent节点,即网络控制节点。

 

三、登录网络控制节点

neutron port-update $portID --allowed-address-pairs type=dict list=true ip_address=新的IP

portID可通过:

neutron port-list | grep "原有IP" 查得

 

其它:

可绑定多个
neutron port-update ad33c996-b5e9-4c91-8f73-6d14ab3827d6 --allowed-address-pairs type=dict list=true ip_address=10.133.16.242 ip_address=10.133.16.241 ip_address=10.133.16.243

绑完可根据port-ID查看
neutron port-show portID
neutron port-show ad33c996-b5e9-4c91-8f73-6d14ab3827d6 

 

已建好的虚拟机添加网卡
nova interface-attach --net-id 3e680906-75d7-4d97-aa5f-9466bc1fd811 880e89fd-e2f3-4e67-ac32-7f12267bd6a2

第一串是网络id,第二串是虚机id,都可以在portal里查到。

相关文章:

  • 2021-12-14
  • 2021-11-09
  • 2021-07-15
  • 2021-12-13
  • 2021-06-25
  • 2022-02-17
  • 2021-04-25
猜你喜欢
  • 2021-12-07
  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
  • 2021-11-11
  • 2021-11-29
相关资源
相似解决方案