openstack 給虛擬機添加網卡
######下面標顏色的地方需要替換為需要新建的接口IP和所屬的網絡名稱
##創建接口
neutron port-create --fixed-ip ip_address=192.168.3.226 public ###將接口綁定到虛擬機 nova interface-attach --port-id $(neutron port-list --network_id=$(neutron net-list |grep public |awk '{print $2}') |grep '192.168.3.226"' |awk '{print $2}') $(nova list |grep web-3 |awk '{print $2}') ###查看虛擬機的接口信息 nova interface-list $(nova list |grep web-3 |awk '{print $2}')