如何指定VM IP

手動創建Neutron Port

neutron port-create --fixed-ip subnet_id=<subnet id from neutron net-list>,ip_address=<10.230.80.71> --name <port-name>  <network-name>

指定到VM

方法一:

Horizon boot VM時,不要選擇Network,改選擇Port

方法二:

nova interface-attach --port-id <port id you just created> <instance id from nova list>

方法三:

nova boot --image <img> --flavor <flavor> --nic port-id=<port-id> <vm-name>

後遺症:

你得手動刪除這個port,不然network是不能刪除了,他不會隨著VM刪除而刪除。

results for ""

    No results matching ""