Openstack 启动一个实例
Posted 风满楼9527
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Openstack 启动一个实例相关的知识,希望对你有一定的参考价值。
Openstack 启动一个实例(九)
创建一个提供者网络:
# 创建一个提供者网络:
openstack network create --share --external --provider-physical-network linux36 --provider-network-type flat linux36
--external # 声明是一个外部网络
--provider-physical-network linux36 # 自定义的网络名, ```/etc/neutron/plugins/ml2/ml2_conf.ini``` 中,flat_networks = linux36定义.
--provider-network-type flat linux36 # flat 单一扁平网络(就是桥接).
[root@cont-1 ~]# source admin.sh
oot@cont-1 ~]# openstack network create --share --external --provider-physical-network linux36 --provider-network-type flat linux36
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | |
| availability_zones | |
| created_at | 2020-05-31T11:09:34Z |
| description | |
| dns_domain | None |
| id | 8bcf8753-71da-48eb-a2e8-22438d6b95ca |
| ipv4_address_scope | None |
| ipv6_address_scope | None |
| is_default | None |
| mtu | 1500 |
| name | linux36 |
| port_security_enabled | True |
| project_id | 7895c74b24e640498acb869a790f7092 |
| provider:network_type | flat |
| provider:physical_network | linux36 |
| provider:segmentation_id | None |
| qos_policy_id | None |
| revision_number | 4 |
| router:external | External |
| segments | None |
| shared | True |
| status | ACTIVE |
| subnets | |
| updated_at | 2020-05-31T11:09:34Z |
+---------------------------+--------------------------------------+
# 创建一个子网:
openstack subnet create --network linux36 --allocation-pool start=10.10.5.50,end=10.10.5.100 --dns-nameserver 10.10.5.1 --gateway 10.10.5.1 --subnet-range 10.10.5.0/24 linux36
[root@cont-1 ~]# openstack subnet create --network linux36 > --allocation-pool start=10.10.5.50,end=10.10.5.100 > --dns-nameserver 10.10.5.1 --gateway 10.10.5.1 > --subnet-range 10.10.5.0/24 linux36
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| allocation_pools | 10.10.5.50-10.10.5.100 |
| cidr | 10.10.5.0/24 |
| created_at | 2020-05-31T12:16:48Z |
| description | |
| dns_nameservers | 10.10.5.1 |
| enable_dhcp | True |
| gateway_ip | 10.10.5.1 |
| host_routes | |
| id | ecae924f-1a23-4b40-b32e-49f06dcfd2b9 |
| ip_version | 4 |
| ipv6_address_mode | None |
| ipv6_ra_mode | None |
| name | linux36 |
| network_id | 8bcf8753-71da-48eb-a2e8-22438d6b95ca |
| project_id | 7895c74b24e640498acb869a790f7092 |
| revision_number | 2 |
| segment_id | None |
| service_types | |
| subnetpool_id | None |
| updated_at | 2020-05-31T12:16:48Z |
+-------------------+--------------------------------------+
创建m1.nano类型
#
openstack flavor create --id 0 --vcpus 1 --ram 64 --disk 1 m1.nano
[root@cont-1 ~]# 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 |
+----------------------------+---------+
生成一个键值对(不是必须的)
以上是关于Openstack 启动一个实例的主要内容,如果未能解决你的问题,请参考以下文章