7. Add a networking service

Controller Node:
1. sudo vi /etc/nova/nova.conf
[DEFAULT]
...
network_api_class = nova.network.api.API
security_group_api = nova
 
2. sudo service nova-api restart && sudo service nova-scheduler restart && sudo service nova-conductor restart
 
Compute Node:
1. sudo apt-get install nova-network nova-api-metadata
 
2. sudo vi /etc/nova/nova.conf
[DEFAULT]
...
network_api_class = nova.network.api.API
security_group_api = nova
firewall_driver = nova.virt.libvirt.firewall.IptablesFirewallDriver
network_manager = nova.network.manager.FlatDHCPManager
network_size = 254
allow_same_net_traffic = False
multi_host = True
flat_injected = False
send_arp_for_ha = True
share_dhcp_address = True
force_dhcp_release = True
flat_network_bridge = br100
flat_interface = eth1
public_interface = eth0
 
3. 
sudo service nova-network restart
sudo service nova-api-metadata restart
 
Create initial network (Controller Node):
1. source admin-openrc.sh
 
2. 为实例创建可以被分配的IP Pool
nova network-create demo-net --bridge br100 --multi-host T --fixed-range-v4 172.52.17.0/24
 
3. 生成net-id供第十四步中使用
nova net-list
 
4. 创建Floating IP以使外部网络可以访问到实例
sudo nova-manage floating create --pool nova --ip_range 192.168.0.0/24
sudo nova-manage floating list

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。