上一篇我們安裝到了nova的管理節(jié)點,今天從nova的計算節(jié)點安裝開始.
7.2 計算節(jié)點安裝配置nova
[root@Marvin-Compute ~]# yum install openstack-nova-compute -y
[root@Marvin-Compute ~]# cd /etc/nova/
[root@Marvin-Compute nova]# ll
total 300
-rw-r----- 1 root nova 2717 May 31 00:07 api-paste.ini
-rw-r----- 1 root nova 289748 Aug 3 17:52 nova.conf
-rw-r----- 1 root nova 4 May 31 00:07 policy.json
-rw-r--r-- 1 root root 64 Aug 3 17:52 release
-rw-r----- 1 root nova 966 May 31 00:07 rootwrap.conf
## 修改nova.conf的配置,我們直接從管理節(jié)點拷貝一個過來修改
[root@Marvin-Compute nova]# mv nova.conf nova.conf.marvin20170902
[root@Marvin-Compute nova]# scp 10.0.0.56:/etc/nova/nova.conf .
The authenticity of host '10.0.0.56 (10.0.0.56)' can't be established.
ECDSA key fingerprint is 6c:10:78:9b:94:7e:90:93:fb:65:37:3c:98:9b:83:d1.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.0.56' (ECDSA) to the list of known hosts.
root@10.0.0.56's password:
nova.conf 100% 283KB 283.3KB/s 00:00
[root@Marvin-Compute nova]# ll
total 584
-rw-r----- 1 root nova 2717 May 31 00:07 api-paste.ini
-rw-r----- 1 root root 290057 Sep 3 17:26 nova.conf
-rw-r----- 1 root nova 289748 Aug 3 17:52 nova.conf.marvin20170902
-rw-r----- 1 root nova 4 May 31 00:07 policy.json
-rw-r--r-- 1 root root 64 Aug 3 17:52 release
-rw-r----- 1 root nova 966 May 31 00:07 rootwrap.conf
[root@Marvin-Compute nova]# chgrp nova nova.conf
[root@Marvin-Compute nova]# ll
total 584
-rw-r----- 1 root nova 2717 May 31 00:07 api-paste.ini
-rw-r----- 1 root nova 290057 Sep 3 17:26 nova.conf
-rw-r----- 1 root nova 289748 Aug 3 17:52 nova.conf.marvin20170902
-rw-r----- 1 root nova 4 May 31 00:07 policy.json
-rw-r--r-- 1 root root 64 Aug 3 17:52 release
-rw-r----- 1 root nova 966 May 31 00:07 rootwrap.conf
## 修改nova.conf
[root@Marvin-Compute nova]# vim nova.conf
[api_database]
connection=mysql+pymysql://nova:nova@10.0.0.56/nova_api ## 3661行,直接刪除
[database]
connection=mysql+pymysql://nova:nova@10.0.0.56/nova ## 4677行,直接刪除
[vnc]
vncserver_proxyclient_address=10.0.0.57 ## 8394行地址改為本機的地址
novncproxy_base_url=http://10.0.0.56:6080/vnc_auto.html ## 8413行取消注釋,并修改
[libvirt]
virt_type=kvm ## 5672行取消注釋,如果環(huán)境不支持虛擬化,需要改為qemu
enabled=true ## 8359取消注釋
keymap=en-us ## 8375取消注釋
## 查看nova.conf總共修改的內(nèi)容
[root@Marvin-Compute nova]# grep '^[a-z]' nova.conf
auth_strategy=keystone
use_neutron=true
enabled_apis=osapi_compute,metadata
firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver
transport_url=rabbit://openstack:openstack@10.0.0.56
api_servers=10.0.0.56:9292
auth_uri = http://10.0.0.56:5000
auth_url = http://10.0.0.56:35357
memcached_servers = 10.0.0.56:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = nova
virt_type=kvm
lock_path=/var/lib/nova/tmp
enabled=true
keymap=en-us
vncserver_listen=0.0.0.0
vncserver_proxyclient_address=10.0.0.57
novncproxy_base_url=http://10.0.0.56:6080/vnc_auto.html
## 查看自己的計算節(jié)點是否支持虛擬化
[root@Marvin-Compute nova]# egrep \ '(vmx|svm)' /proc/cpuinfo
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc aperfmperf eagerfpu pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc aperfmperf eagerfpu pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc aperfmperf eagerfpu pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc aperfmperf eagerfpu pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap
[root@Marvin-Compute nova]# egrep -c '(vmx|svm)' /proc/cpuinfo
4
## 執(zhí)行以上命令,如果沒有反饋或者反饋數(shù)字為0,那么virt_type的值就要改為qemu
## 啟動計算節(jié)點的nova程序
[root@Marvin-Compute nova]# systemctl enable libvirtd.service openstack-nova-compute.service
Created symlink from /etc/systemd/system/multi-user.target.wants/openstack-nova-compute.service to /usr/lib/systemd/system/openstack-nova-compute.service.
[root@Marvin-Compute nova]# systemctl start libvirtd.service openstack-nova-compute.service
## 在管理節(jié)點上驗證
[root@Marvin-OpenStack ~]# nova service-list
+----+------------------+------------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+------------------+----------+---------+-------+----------------------------+-----------------+
| 1 | nova-scheduler | Marvin-OpenStack | internal | enabled | up | 2017-09-03T09:56:36.000000 | - |
| 2 | nova-consoleauth | Marvin-OpenStack | internal | enabled | up | 2017-09-03T09:56:36.000000 | - |
| 3 | nova-conductor | Marvin-OpenStack | internal | enabled | up | 2017-09-03T09:56:38.000000 | - |
| 6 | nova-compute | Marvin-Compute | nova | enabled | up | 2017-09-03T09:56:35.000000 | - |
+----+------------------+------------------+----------+---------+-------+----------------------------+-----------------+
[root@Marvin-OpenStack ~]# openstack compute service list
+----+------------------+------------------+----------+---------+-------+----------------------------+
| ID | Binary | Host | Zone | Status | State | Updated At |
+----+------------------+------------------+----------+---------+-------+----------------------------+
| 1 | nova-scheduler | Marvin-OpenStack | internal | enabled | up | 2017-09-03T09:56:56.000000 |
| 2 | nova-consoleauth | Marvin-OpenStack | internal | enabled | up | 2017-09-03T09:56:56.000000 |
| 3 | nova-conductor | Marvin-OpenStack | internal | enabled | up | 2017-09-03T09:56:58.000000 |
| 6 | nova-compute | Marvin-Compute | nova | enabled | up | 2017-09-03T09:56:55.000000 |
+----+------------------+------------------+----------+---------+-------+----------------------------+
可以看到已經(jīng)發(fā)現(xiàn)了我們的計算節(jié)點
到此,管理節(jié)點和計算節(jié)點nova就配置完成了
8. 安裝配置neutron服務,neutron也是需要在兩個節(jié)點安裝的服務
8.1 管理節(jié)點安裝配置neutron服務
[root@Marvin-OpenStack ~]# yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables -y
[root@Marvin-OpenStack ~]# cd /etc/neutron/
[root@Marvin-OpenStack neutron]# ll
total 120
drwxr-xr-x 11 root root 4096 Sep 3 18:14 conf.d
-rw-r----- 1 root neutron 8592 Aug 16 02:08 dhcp_agent.ini
-rw-r----- 1 root neutron 11119 Aug 16 02:09 l3_agent.ini
-rw-r----- 1 root neutron 10140 Aug 16 02:09 metadata_agent.ini
-rw-r----- 1 root neutron 63378 Aug 16 02:09 neutron.conf
drwxr-xr-x 3 root root 16 Sep 3 18:14 plugins
-rw-r----- 1 root neutron 10148 Jun 1 23:39 policy.json
-rw-r--r-- 1 root root 1195 Jun 1 23:39 rootwrap.conf
[root@Marvin-OpenStack neutron]# vim neutron.conf
[database]
connection = mysql+pymysql://neutron:neutron@10.0.0.56/neutron ## 722行修改數(shù)據(jù)庫信息
[DEFAULT]
auth_strategy = keystone ## 27行取消注釋
core_plugin = ml2 ## 30行取消注釋,并修改為ml2
service_plugins = ## 33行取消注釋
transport_url = rabbit://openstack:openstack@10.0.0.56 ## 530行修改消息隊列
notify_nova_on_port_status_changes = true ## 118行取消注釋
notify_nova_on_port_data_changes = true ## 122行取消注釋
[keystone_authtoken] ## 802行,模塊下加入下面的信息
auth_uri = http://10.0.0.56:5000
auth_url = http://10.0.0.56:35357
memcached_servers = 10.0.0.56:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron
[nova] ## 1001行nova模塊下加入下面的信息
auth_url = http://10.0.0.56:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = nova
password = nova
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp ## 1123行取消注釋并修改
查看neutron.conf修改的內(nèi)容
[root@Marvin-OpenStack neutron]# grep '^[a-z]' neutron.conf
auth_strategy = keystone
core_plugin = ml2
service_plugins =
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true
transport_url = rabbit://openstack:openstack@10.0.0.56
connection = mysql+pymysql://neutron:neutron@10.0.0.56/neutron
auth_uri = http://10.0.0.56:5000
auth_url = http://10.0.0.56:35357
memcached_servers = 10.0.0.56:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron
auth_url = http://10.0.0.56:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = nova
password = nova
lock_path = /var/lib/neutron/tmp
## 修改/etc/neutron/plugins/ml2/ml2_conf.ini文件
[root@Marvin-OpenStack neutron]# cd plugins/ml2/
[root@Marvin-OpenStack ml2]# vim ml2_conf.ini
109 type_drivers = flat,vlan,gre,vxlan,geneve
114 tenant_network_types = flat,vlan,gre,vxlan,geneve
118 mechanism_drivers = linuxbridge
123 extension_drivers = port_security
159 flat_networks = public
236 enable_ipset = true
## ml2_conf.ini配置文件修改簡單,按照上面的行數(shù)對照進行修改就好了
[root@Marvin-OpenStack ml2]# grep '^[a-z]' ml2_conf.ini
type_drivers = flat,vlan,gre,vxlan,geneve
tenant_network_types = flat,vlan,gre,vxlan,geneve
mechanism_drivers = linuxbridge
extension_drivers = port_security
flat_networks = public
enable_ipset = true
## 配置Linuxbridge代理
[root@Marvin-OpenStack ml2]# vim linuxbridge_agent.ini
143 physical_interface_mappings = public:eth0 ## 這里和前面flat_networks的名稱對應,eth0是網(wǎng)卡的名稱,有的網(wǎng)卡并不一定都是eth0,記得修改成自己的網(wǎng)卡名稱
156 firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
161 enable_security_group = true
176 enable_vxlan = false
[root@Marvin-OpenStack ml2]# grep '^[a-z]' linuxbridge_agent.ini ## 這個文件修改也簡單,按照行數(shù)對照修改
physical_interface_mappings = public:eth0
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
enable_security_group = true
enable_vxlan = false
## 配置DHCP代理
[root@Marvin-OpenStack ml2]# cd /etc/neutron/
[root@Marvin-OpenStack neutron]# vim dhcp_agent.ini ## 還是一樣的,根據(jù)行號修改
16 interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
32 dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
41 enable_isolated_metadata = true
[root@Marvin-OpenStack neutron]# grep '^[a-z]' dhcp_agent.ini
interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true
## 配置元數(shù)據(jù)代理
[root@Marvin-OpenStack neutron]# vim metadata_agent.ini
22 nova_metadata_ip = 10.0.0.56
34 metadata_proxy_shared_secret = marvin ##共享秘鑰
## 配制nova服務來使用網(wǎng)絡
[root@Marvin-OpenStack neutron]# cd /etc/nova
[root@Marvin-OpenStack nova]# vim nova.conf
[neutron] ## 6469行neutron模塊下添加如下信息
url = http://10.0.0.56:9696
auth_url = http://10.0.0.56:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron
service_metadata_proxy = True
metadata_proxy_shared_secret = marvin
## 設置ml2的軟鏈接
[root@Marvin-OpenStack ~]# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
## 同步數(shù)據(jù)庫
[root@Marvin-OpenStack ~]# su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \
> --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
Running upgrade for neutron ...
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> kilo, kilo_initial
INFO [alembic.runtime.migration] Running upgrade kilo -> 354db87e3225, nsxv_vdr_metadata.py
INFO [alembic.runtime.migration] Running upgrade 354db87e3225 -> 599c6a226151, neutrodb_ipam
INFO [alembic.runtime.migration] Running upgrade 599c6a226151 -> 52c5312f6baf, Initial operations in support of address scopes
INFO [alembic.runtime.migration] Running upgrade 52c5312f6baf -> 313373c0ffee, Flavor framework
INFO [alembic.runtime.migration] Running upgrade 313373c0ffee -> 8675309a5c4f, network_rbac
INFO [alembic.runtime.migration] Running upgrade 8675309a5c4f -> 45f955889773, quota_usage
INFO [alembic.runtime.migration] Running upgrade 45f955889773 -> 26c371498592, subnetpool hash
INFO [alembic.runtime.migration] Running upgrade 26c371498592 -> 1c844d1677f7, add order to dnsnameservers
INFO [alembic.runtime.migration] Running upgrade 1c844d1677f7 -> 1b4c6e320f79, address scope support in subnetpool
INFO [alembic.runtime.migration] Running upgrade 1b4c6e320f79 -> 48153cb5f051, qos db changes
INFO [alembic.runtime.migration] Running upgrade 48153cb5f051 -> 9859ac9c136, quota_reservations
INFO [alembic.runtime.migration] Running upgrade 9859ac9c136 -> 34af2b5c5a59, Add dns_name to Port
INFO [alembic.runtime.migration] Running upgrade 34af2b5c5a59 -> 59cb5b6cf4d, Add availability zone
INFO [alembic.runtime.migration] Running upgrade 59cb5b6cf4d -> 13cfb89f881a, add is_default to subnetpool
INFO [alembic.runtime.migration] Running upgrade 13cfb89f881a -> 32e5974ada25, Add standard attribute table
INFO [alembic.runtime.migration] Running upgrade 32e5974ada25 -> ec7fcfbf72ee, Add network availability zone
INFO [alembic.runtime.migration] Running upgrade ec7fcfbf72ee -> dce3ec7a25c9, Add router availability zone
INFO [alembic.runtime.migration] Running upgrade dce3ec7a25c9 -> c3a73f615e4, Add ip_version to AddressScope
INFO [alembic.runtime.migration] Running upgrade c3a73f615e4 -> 659bf3d90664, Add tables and attributes to support external DNS integration
INFO [alembic.runtime.migration] Running upgrade 659bf3d90664 -> 1df244e556f5, add_unique_ha_router_agent_port_bindings
INFO [alembic.runtime.migration] Running upgrade 1df244e556f5 -> 19f26505c74f, Auto Allocated Topology - aka Get-Me-A-Network
INFO [alembic.runtime.migration] Running upgrade 19f26505c74f -> 15be73214821, add dynamic routing model data
INFO [alembic.runtime.migration] Running upgrade 15be73214821 -> b4caf27aae4, add_bgp_dragent_model_data
INFO [alembic.runtime.migration] Running upgrade b4caf27aae4 -> 15e43b934f81, rbac_qos_policy
INFO [alembic.runtime.migration] Running upgrade 15e43b934f81 -> 31ed664953e6, Add resource_versions row to agent table
INFO [alembic.runtime.migration] Running upgrade 31ed664953e6 -> 2f9e956e7532, tag support
INFO [alembic.runtime.migration] Running upgrade 2f9e956e7532 -> 3894bccad37f, add_timestamp_to_base_resources
INFO [alembic.runtime.migration] Running upgrade 3894bccad37f -> 0e66c5227a8a, Add desc to standard attr table
INFO [alembic.runtime.migration] Running upgrade 0e66c5227a8a -> 45f8dd33480b, qos dscp db addition
INFO [alembic.runtime.migration] Running upgrade 45f8dd33480b -> 5abc0278ca73, Add support for VLAN trunking
INFO [alembic.runtime.migration] Running upgrade 5abc0278ca73 -> d3435b514502, Add device_id index to Port
INFO [alembic.runtime.migration] Running upgrade d3435b514502 -> 30107ab6a3ee, provisioning_blocks.py
INFO [alembic.runtime.migration] Running upgrade 30107ab6a3ee -> c415aab1c048, add revisions table
INFO [alembic.runtime.migration] Running upgrade c415aab1c048 -> a963b38d82f4, add dns name to portdnses
INFO [alembic.runtime.migration] Running upgrade a963b38d82f4 -> 3d0e74aa7d37, Add flavor_id to Router
INFO [alembic.runtime.migration] Running upgrade 3d0e74aa7d37 -> 030a959ceafa, uniq_routerports0port_id
INFO [alembic.runtime.migration] Running upgrade 030a959ceafa -> a5648cfeeadf, Add support for Subnet Service Types
INFO [alembic.runtime.migration] Running upgrade a5648cfeeadf -> 0f5bef0f87d4, add_qos_minimum_bandwidth_rules
INFO [alembic.runtime.migration] Running upgrade 0f5bef0f87d4 -> 67daae611b6e, add standardattr to qos policies
INFO [alembic.runtime.migration] Running upgrade kilo -> 30018084ec99, Initial no-op Liberty contract rule.
INFO [alembic.runtime.migration] Running upgrade 30018084ec99 -> 4ffceebfada, network_rbac
INFO [alembic.runtime.migration] Running upgrade 4ffceebfada -> 5498d17be016, Drop legacy OVS and LB plugin tables
INFO [alembic.runtime.migration] Running upgrade 5498d17be016 -> 2a16083502f3, Metaplugin removal
INFO [alembic.runtime.migration] Running upgrade 2a16083502f3 -> 2e5352a0ad4d, Add missing foreign keys
INFO [alembic.runtime.migration] Running upgrade 2e5352a0ad4d -> 11926bcfe72d, add geneve ml2 type driver
INFO [alembic.runtime.migration] Running upgrade 11926bcfe72d -> 4af11ca47297, Drop cisco monolithic tables
INFO [alembic.runtime.migration] Running upgrade 4af11ca47297 -> 1b294093239c, Drop embrane plugin table
INFO [alembic.runtime.migration] Running upgrade 1b294093239c -> 8a6d8bdae39, standardattributes migration
INFO [alembic.runtime.migration] Running upgrade 8a6d8bdae39 -> 2b4c2465d44b, DVR sheduling refactoring
INFO [alembic.runtime.migration] Running upgrade 2b4c2465d44b -> e3278ee65050, Drop NEC plugin tables
INFO [alembic.runtime.migration] Running upgrade e3278ee65050 -> c6c112992c9, rbac_qos_policy
INFO [alembic.runtime.migration] Running upgrade c6c112992c9 -> 5ffceebfada, network_rbac_external
INFO [alembic.runtime.migration] Running upgrade 5ffceebfada -> 4ffceebfcdc, standard_desc
INFO [alembic.runtime.migration] Running upgrade 4ffceebfcdc -> 7bbb25278f53, device_owner_ha_replicate_int
INFO [alembic.runtime.migration] Running upgrade 7bbb25278f53 -> 89ab9a816d70, Rename ml2_network_segments table
INFO [alembic.runtime.migration] Running upgrade 89ab9a816d70 -> c879c5e1ee90, Add segment_id to subnet
INFO [alembic.runtime.migration] Running upgrade c879c5e1ee90 -> 8fd3918ef6f4, Add segment_host_mapping table.
INFO [alembic.runtime.migration] Running upgrade 8fd3918ef6f4 -> 4bcd4df1f426, Rename ml2_dvr_port_bindings
INFO [alembic.runtime.migration] Running upgrade 4bcd4df1f426 -> b67e765a3524, Remove mtu column from networks.
INFO [alembic.runtime.migration] Running upgrade b67e765a3524 -> a84ccf28f06a, migrate dns name from port
INFO [alembic.runtime.migration] Running upgrade a84ccf28f06a -> 7d9d8eeec6ad, rename tenant to project
INFO [alembic.runtime.migration] Running upgrade 7d9d8eeec6ad -> a8b517cff8ab, Add routerport bindings for L3 HA
INFO [alembic.runtime.migration] Running upgrade a8b517cff8ab -> 3b935b28e7a0, migrate to pluggable ipam
INFO [alembic.runtime.migration] Running upgrade 3b935b28e7a0 -> b12a3ef66e62, add standardattr to qos policies
INFO [alembic.runtime.migration] Running upgrade b12a3ef66e62 -> 97c25b0d2353, Add Name and Description to the networksegments table
INFO [alembic.runtime.migration] Running upgrade 97c25b0d2353 -> 2e0d7a8a1586, Add binding index to RouterL3AgentBinding
INFO [alembic.runtime.migration] Running upgrade 2e0d7a8a1586 -> 5c85685d616d, Remove availability ranges.
INFO [alembic.runtime.migration] Running upgrade 67daae611b6e -> 6b461a21bcfc, uniq_floatingips0floating_network_id0fixed_port_id0fixed_ip_addr
INFO [alembic.runtime.migration] Running upgrade 6b461a21bcfc -> 5cd92597d11d, Add ip_allocation to port
OK
## 重啟nova-api服務,啟動neutron服務,并設置開機自啟
[root@Marvin-OpenStack ~]# systemctl restart openstack-nova-api.service
[root@Marvin-OpenStack ~]# systemctl enable neutron-server.service \
> neutron-linuxbridge-agent.service neutron-dhcp-agent.service \
> neutron-metadata-agent.service
Created symlink from /etc/systemd/system/multi-user.target.wants/neutron-server.service to /usr/lib/systemd/system/neutron-server.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/neutron-linuxbridge-agent.service to /usr/lib/systemd/system/neutron-linuxbridge-agent.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/neutron-dhcp-agent.service to /usr/lib/systemd/system/neutron-dhcp-agent.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/neutron-metadata-agent.service to /usr/lib/systemd/system/neutron-metadata-agent.service.
[root@Marvin-OpenStack ~]# systemctl start neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service
## 創(chuàng)建Neutron服務實體
[root@Marvin-OpenStack ~]# openstack service create --name neutron \
> --description "OpenStack Networking" network
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Networking |
| enabled | True |
| id | 4ae2380a5bb9497e9f84899de97778d6 |
| name | neutron |
| type | network |
+-------------+----------------------------------+
## 注冊endpoint
[root@Marvin-OpenStack ~]# openstack endpoint create --region RegionOne \
> network public http://10.0.0.56:9696
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 12c323c8747947999471026d2f1dec0a |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 4ae2380a5bb9497e9f84899de97778d6 |
| service_name | neutron |
| service_type | network |
| url | http://10.0.0.56:9696 |
+--------------+----------------------------------+
[root@Marvin-OpenStack ~]# openstack endpoint create --region RegionOne network internal http://10.0.0.56:9696
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 9c3cdef26ff543dc8ebb4a206a92bb47 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 4ae2380a5bb9497e9f84899de97778d6 |
| service_name | neutron |
| service_type | network |
| url | http://10.0.0.56:9696 |
+--------------+----------------------------------+
[root@Marvin-OpenStack ~]# openstack endpoint create --region RegionOne network admin http://10.0.0.56:9696
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 344c8833f7194d669d1837120f7a94ec |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 4ae2380a5bb9497e9f84899de97778d6 |
| service_name | neutron |
| service_type | network |
| url | http://10.0.0.56:9696 |
+--------------+----------------------------------+
## 驗證管理端的neutrun配置
[root@Marvin-OpenStack ~]# neutron agent-list
+------------------+------------------+------------------+-------------------+-------+----------------+----------------------+
| id | agent_type | host | availability_zone | alive | admin_state_up | binary |
+------------------+------------------+------------------+-------------------+-------+----------------+----------------------+
| 01efe4d9-53f5-48 | Metadata agent | Marvin-OpenStack | | :-) | True | neutron-metadata- |
| 6f-8869-40546a68 | | | | | | agent |
| 8fd1 | | | | | | |
| 41127c68-fb5d-46 | DHCP agent | Marvin-OpenStack | nova | :-) | True | neutron-dhcp-agent |
| 41-acdd- | | | | | | |
| 1fba6b78735d | | | | | | |
| 88e9488b-18cf-4c | Linux bridge | Marvin-OpenStack | | :-) | True | neutron-linuxbridge- |
| a4-b0a8-8a916231 | agent | | | | | agent |
| 1315 | | | | | | |
+------------------+------------------+------------------+-------------------+-------+----------------+----------------------+
管理端的neutron配置完成
8.2 計算節(jié)點安裝配置neutrun服務
[root@Marvin-Compute ~]# yum install openstack-neutron-linuxbridge ebtables ipset -y
[root@Marvin-Compute ~]# vim /etc/neutron/neutron.conf
[DEFAULT]
27 auth_strategy = keystone
530 transport_url = rabbit://openstack:openstack@10.0.0.56
[keystone_authtoken] ## 802行,添加如下內(nèi)容
auth_uri = http://10.0.0.56:5000
auth_url = http://10.0.0.56:35357
memcached_servers = 10.0.0.56:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron
[oslo_concurrency]
1115 lock_path = /var/lib/neutron/tmp
[root@Marvin-Compute ~]# grep '^[a-z]' /etc/neutron/neutron.conf
auth_strategy = keystone
transport_url = rabbit://openstack:openstack@10.0.0.56
auth_uri = http://10.0.0.56:5000
auth_url = http://10.0.0.56:35357
memcached_servers = 10.0.0.56:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron
lock_path = /var/lib/neutron/tmp
## 配置linuxbridge代理,因為管理節(jié)點和計算節(jié)點修改的內(nèi)容一樣,我們直接在管理節(jié)點拷貝過來,修改權(quán)限即可
[root@Marvin-Compute ~]# cd /etc/neutron/plugins/ml2/
[root@Marvin-Compute ml2]# mv linuxbridge_agent.ini linuxbridge_agent.ini.marvin20170902
[root@Marvin-Compute ml2]# scp 10.0.0.56:/etc/neutron/plugins/ml2/linuxbridge_agent.ini .
root@10.0.0.56's password:
linuxbridge_agent.ini 100% 8376 8.2KB/s 00:00
[root@Marvin-Compute ml2]# ll
total 24
-rw-r----- 1 root root 8376 Sep 3 19:11 linuxbridge_agent.ini
-rw-r----- 1 root neutron 8313 Aug 16 02:09 linuxbridge_agent.ini.marvin20170902
[root@Marvin-Compute ml2]# chgrp neutron linuxbridge_agent.ini
[root@Marvin-Compute ml2]# ll
total 24
-rw-r----- 1 root neutron 8376 Sep 3 19:11 linuxbridge_agent.ini
-rw-r----- 1 root neutron 8313 Aug 16 02:09 linuxbridge_agent.ini.marvin20170902
## 在計算節(jié)點的nova中配置網(wǎng)絡信息
[root@Marvin-Compute ml2]# cd /etc/nova
[root@Marvin-Compute nova]# vim nova.conf
[neutron] ## 6467行,添加如下內(nèi)容
url = http://10.0.0.56:9696
auth_url = http://10.0.0.56:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron
## 重啟nova服務,啟動linuxbridge代理,并設置開機自啟
[root@Marvin-Compute nova]# systemctl restart openstack-nova-compute.service
[root@Marvin-Compute nova]# systemctl enable neutron-linuxbridge-agent.service
Created symlink from /etc/systemd/system/multi-user.target.wants/neutron-linuxbridge-agent.service to /usr/lib/systemd/system/neutron-linuxbridge-agent.service.
[root@Marvin-Compute nova]# systemctl start neutron-linuxbridge-agent.service
## 管理節(jié)點上進行驗證
[root@Marvin-OpenStack ~]# neutron agent-list
+------------------+------------------+------------------+-------------------+-------+----------------+----------------------+
| id | agent_type | host | availability_zone | alive | admin_state_up | binary |
+------------------+------------------+------------------+-------------------+-------+----------------+----------------------+
| 01efe4d9-53f5-48 | Metadata agent | Marvin-OpenStack | | :-) | True | neutron-metadata- |
| 6f-8869-40546a68 | | | | | | agent |
| 8fd1 | | | | | | |
| 41127c68-fb5d-46 | DHCP agent | Marvin-OpenStack | nova | :-) | True | neutron-dhcp-agent |
| 41-acdd- | | | | | | |
| 1fba6b78735d | | | | | | |
| 88e9488b-18cf-4c | Linux bridge | Marvin-OpenStack | | :-) | True | neutron-linuxbridge- |
| a4-b0a8-8a916231 | agent | | | | | agent |
| 1315 | | | | | | |
| fdc0270e-3b6f-47 | Linux bridge | Marvin-Compute | | :-) | True | neutron-linuxbridge- |
| 53-8e05-428a4f3a | agent | | | | | agent |
| 0e2a | | | | | | |
+------------------+------------------+------------------+-------------------+-------+----------------+----------------------+
[root@Marvin-OpenStack ~]# nova service-list
+----+------------------+------------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+------------------+----------+---------+-------+----------------------------+-----------------+
| 1 | nova-scheduler | Marvin-OpenStack | internal | enabled | up | 2017-09-03T11:17:37.000000 | - |
| 2 | nova-consoleauth | Marvin-OpenStack | internal | enabled | up | 2017-09-03T11:17:38.000000 | - |
| 3 | nova-conductor | Marvin-OpenStack | internal | enabled | up | 2017-09-03T11:17:39.000000 | - |
| 6 | nova-compute | Marvin-Compute | nova | enabled | up | 2017-09-03T11:17:34.000000 | - |
+----+------------------+------------------+----------+---------+-------+----------------------------+-----------------+
到此,neutrun的配置全部完成
9. 創(chuàng)建云主機
9.1 創(chuàng)建提供者網(wǎng)絡
[root@Marvin-OpenStack ~]# neutron net-create --shared --provider:physical_network public \
> --provider:network_type flat public
Created a new network:
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | |
| availability_zones | |
| created_at | 2017-09-03T11:19:56Z |
| description | |
| id | 11a77b36-fc41-4fcd-babc-1bd3051ee064 |
| ipv4_address_scope | |
| ipv6_address_scope | |
| mtu | 1500 |
| name | public |
| port_security_enabled | True |
| project_id | 8e8448db75034b1e8be0f7d6931be2d4 |
| provider:network_type | flat |
| provider:physical_network | public |
| provider:segmentation_id | |
| revision_number | 3 |
| router:external | False |
| shared | True |
| status | ACTIVE |
| subnets | |
| tags | |
| tenant_id | 8e8448db75034b1e8be0f7d6931be2d4 |
| updated_at | 2017-09-03T11:19:56Z |
+---------------------------+--------------------------------------+
## 創(chuàng)建子網(wǎng)
[root@Marvin-OpenStack ~]# openstack subnet create --network public \
> --allocation-pool start=10.0.0.100,end=10.0.0.200 \
> --dns-nameserver 10.0.0.2 --gateway 10.0.0.2 \
> --subnet-range 10.0.0.0/24 public-subnet
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| allocation_pools | 10.0.0.100-10.0.0.200 |
| cidr | 10.0.0.0/24 |
| created_at | 2017-09-03T11:22:17Z |
| description | |
| dns_nameservers | 10.0.0.2 |
| enable_dhcp | True |
| gateway_ip | 10.0.0.2 |
| headers | |
| host_routes | |
| id | 5d749512-4d93-4b97-b09d-ff13029b999f |
| ip_version | 4 |
| ipv6_address_mode | None |
| ipv6_ra_mode | None |
| name | public-subnet |
| network_id | 11a77b36-fc41-4fcd-babc-1bd3051ee064 |
| project_id | 8e8448db75034b1e8be0f7d6931be2d4 |
| project_id | 8e8448db75034b1e8be0f7d6931be2d4 |
| revision_number | 2 |
| service_types | [] |
| subnetpool_id | None |
| updated_at | 2017-09-03T11:22:17Z |
+-------------------+--------------------------------------+
## 查看網(wǎng)絡信息
[root@Marvin-OpenStack ~]# neutron net-list
+--------------------------------------+--------+--------------------------------------------------+
| id | name | subnets |
+--------------------------------------+--------+--------------------------------------------------+
| 11a77b36-fc41-4fcd-babc-1bd3051ee064 | public | 5d749512-4d93-4b97-b09d-ff13029b999f 10.0.0.0/24 |
+--------------------------------------+--------+--------------------------------------------------+
[root@Marvin-OpenStack ~]# neutron subnet-list
+--------------------------------------+---------------+-------------+----------------------------------------------+
| id | name | cidr | allocation_pools |
+--------------------------------------+---------------+-------------+----------------------------------------------+
| 5d749512-4d93-4b97-b09d-ff13029b999f | public-subnet | 10.0.0.0/24 | {"start": "10.0.0.100", "end": "10.0.0.200"} |
+--------------------------------------+---------------+-------------+----------------------------------------------+
[root@Marvin-OpenStack ~]# openstack network list
+--------------------------------------+--------+--------------------------------------+
| ID | Name | Subnets |
+--------------------------------------+--------+--------------------------------------+
| 11a77b36-fc41-4fcd-babc-1bd3051ee064 | public | 5d749512-4d93-4b97-b09d-ff13029b999f |
+--------------------------------------+--------+--------------------------------------+
9.2 創(chuàng)建云主機類型,生成一個鍵值對
[root@Marvin-OpenStack ~]# openstack flavor create --id 0 --vcpus 1 --ram 64 --disk 1 m1.nano
+----------------------------+---------+
| Field | Value |
+----------------------------+---------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| disk | 1 |
| id | 0 |
| name | m1.nano |
| os-flavor-access:is_public | True |
| properties | |
| ram | 64 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 1 |
+----------------------------+---------+
[root@Marvin-OpenStack ~]# source demo-openstack
[root@Marvin-OpenStack ~]# ssh-keygen -q -N ""
Enter file in which to save the key (/root/.ssh/id_rsa):
[root@Marvin-OpenStack ~]# openstack keypair create --public-key ~/.ssh/id_rsa.pub mykey ## 將生成的鍵值對上傳到openstack
+-------------+-------------------------------------------------+
| Field | Value |
+-------------+-------------------------------------------------+
| fingerprint | fa:bd:6d:4e:24:56:41:c6:37:11:65:81:7f:04:41:53 |
| name | mykey |
| user_id | bccfde0f0711448c8e3855ac4dcb8e19 |
+-------------+-------------------------------------------------+
## 增加安全組規(guī)則,開發(fā)22端口
[root@Marvin-OpenStack ~]# openstack security group rule create --proto icmp default
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| created_at | 2017-09-03T11:28:19Z |
| description | |
| direction | ingress |
| ethertype | IPv4 |
| headers | |
| id | 79d3f638-7efc-422f-9db2-4e739de3814c |
| port_range_max | None |
| port_range_min | None |
| project_id | 9e6ed2044de448c5b6064da5e61108f3 |
| project_id | 9e6ed2044de448c5b6064da5e61108f3 |
| protocol | icmp |
| remote_group_id | None |
| remote_ip_prefix | 0.0.0.0/0 |
| revision_number | 1 |
| security_group_id | e08a5e52-71df-4349-92e3-412b5aee27c5 |
| updated_at | 2017-09-03T11:28:19Z |
+-------------------+--------------------------------------+
[root@Marvin-OpenStack ~]# openstack security group rule create --proto tcp --dst-port 22 default
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| created_at | 2017-09-03T11:28:37Z |
| description | |
| direction | ingress |
| ethertype | IPv4 |
| headers | |
| id | 17ac408e-f270-4bd6-ab18-7f926246ac76 |
| port_range_max | 22 |
| port_range_min | 22 |
| project_id | 9e6ed2044de448c5b6064da5e61108f3 |
| project_id | 9e6ed2044de448c5b6064da5e61108f3 |
| protocol | tcp |
| remote_group_id | None |
| remote_ip_prefix | 0.0.0.0/0 |
| revision_number | 1 |
| security_group_id | e08a5e52-71df-4349-92e3-412b5aee27c5 |
| updated_at | 2017-09-03T11:28:37Z |
+-------------------+--------------------------------------+
9.3 創(chuàng)建云主機需要驗證的信息
[root@Marvin-OpenStack ~]# openstack flavor list ## 云主機類型
+----+---------+-----+------+-----------+-------+-----------+
| ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public |
+----+---------+-----+------+-----------+-------+-----------+
| 0 | m1.nano | 64 | 1 | 0 | 1 | True |
+----+---------+-----+------+-----------+-------+-----------+
[root@Marvin-OpenStack ~]# openstack image list ## 鏡像
+--------------------------------------+--------+--------+
| ID | Name | Status |
+--------------------------------------+--------+--------+
| a131bcba-8fa7-4a0e-8333-a36046c31a9c | cirros | active |
+--------------------------------------+--------+--------+
[root@Marvin-OpenStack ~]# openstack network list ## 網(wǎng)絡
+--------------------------------------+--------+--------------------------------------+
| ID | Name | Subnets |
+--------------------------------------+--------+--------------------------------------+
| 11a77b36-fc41-4fcd-babc-1bd3051ee064 | public | 5d749512-4d93-4b97-b09d-ff13029b999f |
+--------------------------------------+--------+--------------------------------------+
[root@Marvin-OpenStack ~]# openstack security group list ## 安全策略
+--------------------------------------+---------+------------------------+----------------------------------+
| ID | Name | Description | Project |
+--------------------------------------+---------+------------------------+----------------------------------+
| e08a5e52-71df-4349-92e3-412b5aee27c5 | default | Default security group | 9e6ed2044de448c5b6064da5e61108f3 |
+--------------------------------------+---------+------------------------+----------------------------------+
9.4 創(chuàng)建云主機
[root@Marvin-OpenStack ~]# source demo-openstack
[root@Marvin-OpenStack ~]# openstack server create --flavor m1.nano --image cirros \
> --nic net-id=11a77b36-fc41-4fcd-babc-1bd3051ee064 --security-group default \
> --key-name mykey marvinopen1-instance
+--------------------------------------+-----------------------------------------------+
| Field | Value |
+--------------------------------------+-----------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | |
| OS-EXT-STS:power_state | NOSTATE |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | None |
| OS-SRV-USG:terminated_at | None |
| accessIPv4 | |
| accessIPv6 | |
| addresses | |
| adminPass | k2HpAW2f5ELA |
| config_drive | |
| created | 2017-09-03T11:34:24Z |
| flavor | m1.nano (0) |
| hostId | |
| id | c75fa09b-cb20-4e16-9def-116bfc39a4ec |
| image | cirros (a131bcba-8fa7-4a0e-8333-a36046c31a9c) |
| key_name | mykey |
| name | marvinopen1-instance |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| project_id | 9e6ed2044de448c5b6064da5e61108f3 |
| properties | |
| security_groups | [{u'name': u'default'}] |
| status | BUILD |
| updated | 2017-09-03T11:34:32Z |
| user_id | bccfde0f0711448c8e3855ac4dcb8e19 |
+--------------------------------------+-----------------------------------------------+
[root@Marvin-OpenStack ~]# openstack server list
+--------------------------------------+----------------------+--------+-------------------+------------+
| ID | Name | Status | Networks | Image Name |
+--------------------------------------+----------------------+--------+-------------------+------------+
| c75fa09b-cb20-4e16-9def-116bfc39a4ec | marvinopen1-instance | ACTIVE | public=10.0.0.107 | cirros |
+--------------------------------------+----------------------+--------+-------------------+------------+
[root@Marvin-OpenStack ~]# ping 10.0.0.107 -c4
PING 10.0.0.107 (10.0.0.107) 56(84) bytes of data.
64 bytes from 10.0.0.107: icmp_seq=1 ttl=64 time=0.878 ms
64 bytes from 10.0.0.107: icmp_seq=2 ttl=64 time=1.40 ms
64 bytes from 10.0.0.107: icmp_seq=3 ttl=64 time=0.898 ms
64 bytes from 10.0.0.107: icmp_seq=4 ttl=64 time=1.01 ms
--- 10.0.0.107 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 0.878/1.050/1.408/0.215 ms
## 因為前面配置了鍵值對,可以直接ssh登錄,不需要密碼
[root@Marvin-OpenStack ~]# ssh cirros@10.0.0.107
The authenticity of host '10.0.0.107 (10.0.0.107)' can't be established.
RSA key fingerprint is a4:cf:41:2f:4e:eb:6f:1e:84:e7:23:f7:46:a6:4a:af.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.0.107' (RSA) to the list of known hosts.
$ ifconfig
eth0 Link encap:Ethernet HWaddr FA:16:3E:C0:83:39
inet addr:10.0.0.107 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::f816:3eff:fec0:8339/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:255 errors:0 dropped:0 overruns:0 frame:0
TX packets:184 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:31309 (30.5 KiB) TX bytes:20644 (20.1 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
## 第一臺云主機就這樣建成了,美不美呢,哈哈!!!
## 查看VNC的url地址
[root@Marvin-OpenStack ~]# openstack console url show marvinopen1-instance
+-------+--------------------------------------------------------------------------------+
| Field | Value |
+-------+--------------------------------------------------------------------------------+
| type | novnc |
| url | http://10.0.0.56:6080/vnc_auto.html?token=3a4766ca-443a-469b-b2a7-328d95ad7109 |
+-------+--------------------------------------------------------------------------------+
下面可以使用vnc的地址去直接訪問瀏覽器,就可以直接控制虛擬機了
瀏覽器訪問: http://10.0.0.56:6080/vnc_auto.html?token=3a4766ca-443a-469b-b2a7-328d95ad7109
可以看到虛擬機正在運行,輸入帳號cirros,密碼: cubswin:) 可以登錄到服務器
nova stop 云主機的ID == 停止云主機
nova start 云主機的ID == 啟動云主機
nova delete 云主機的ID == 刪除云主機
到此已經(jīng)可以創(chuàng)建云主機了,很爽吧,下次更新,我們將通過web界面來管理openstack的云主機
筆者QQ: 779734791 昵稱: Marvin 歡迎大家一起討論進步.