DevStack:未能创建新的 CentOS 实例
DevStack: failed to create new CentOS instance
部署 DevStack 后,我成功创建了 cirros 实例。现在我要创建 CentOS 实例:
- 我从[这里]下载图片
CentOS-7-x86_64-GenericCloud-1608.qcow2
。(http://cloud.centos.org/centos/7/images/)
- 那我运行
nova boot --flavor 75c84ea2-d5b0-4d99-b935-08f654122aa3 --image 997f51bd-1ee2-4cdb-baea-6cef766bf191 --security-groups 207880e9-165f-4295-adfd-1f91ac96aaaa --nic net-id=26c05c99-b82d-403f-a988-fc07d3972b6b centos-1
- 然后我运行
nova list
,它给出:b9f97618-085b-4d2b-bc94-34f3b953e2ee | centos-1 | ERROR | - | NOSTATE
它处于ERROR
状态,所以我用那个b9f97618-085b-4d2b-bc94-34f3b953e2ee
(实例id)grep日志:grep b9f97618-085b-4d2b-bc94-34f3b953e2ee *.log
grep returns:
结果:
n-api.log:2016-10-13 22:09:27.975 DEBUG nova.compute.api
[req-6b5bf92a-ce53-46d4-8965-b54e02d21aef admin admin] [instance:
b9f97618-085b-4d2b-bc94-34f3b953e2ee] block_device_mapping
[BlockDeviceMapping(boot_index=0,connection_info=None,created_at=,delete_on_termination=True,deleted=,deleted_at=,destination_type='local',device_name=None,device_type='disk',disk_bus=None,guest_format=None,id=,image_id='997f51bd-1ee2-4cdb-baea-6cef766bf191',instance=,instance_uuid=,no_device=False,snapshot_id=None,source_type='image',tag=None,updated_at=,volume_id=None,volume_size=None),
BlockDeviceMapping(boot_index=-1,connection_info=None,created_at=,delete_on_termination=True,deleted=,deleted_at=,destination_type='local',device_name=None,device_type='disk',disk_bus=None,guest_format=None,id=,image_id=None,instance=,instance_uuid=,no_device=False,snapshot_id=None,source_type='blank',tag=None,updated_at=,volume_id=None,volume_size=1)]
from (pid=12331) _bdm_validate_set_size_and_instance
/opt/stack/nova/nova/compute/api.py:1239 n-api.log:2016-10-13
22:09:28.117 DEBUG nova.compute.api
[req-d9327bbd-d333-4d37-8651-57e95d21396b admin admin] [instance:
b9f97618-085b-4d2b-bc94-34f3b953e2ee] Fetching instance by UUID from
(pid=12331) get /opt/stack/nova/nova/compute/api.py:2215
n-api.log:2016-10-13 22:09:28.184 DEBUG neutronclient.v2_0.client
[req-d9327bbd-d333-4d37-8651-57e95d21396b admin admin] GET call to
neutron for
http://10.61.148.89:9696/v2.0/ports.json?device_id=b9f97618-085b-4d2b-bc94-34f3b953e2ee
used request id req-2b427b03-67d9-474e-be93-b631b6a2ba78 from
(pid=12331) _append_request_id
/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py:127
n-api.log:2016-10-13 22:09:28.195 INFO nova.osapi_compute.wsgi.server
[req-d9327bbd-d333-4d37-8651-57e95d21396b admin admin] 10.61.148.89
"GET /v2.1/servers/b9f97618-085b-4d2b-bc94-34f3b953e2ee HTTP/1.1"
status: 200 len: 2018 time: 0.0843861 n-api.log:2016-10-13
22:09:52.232 DEBUG neutronclient.v2_0.client
[req-415982d6-9ff4-4c80-99a8-46e1765a58d9 admin admin] GET call to
neutron for
http://10.61.148.89:9696/v2.0/ports.json?device_id=b9f97618-085b-4d2b-bc94-34f3b953e2ee&device_id=d6c67c2f-0d21-4ef8-bcfe-eba852ed0cc1 used request id req-645a777a-35df-456e-a982-433e97cdb0e7 from
(pid=12331) _append_request_id
/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py:127
n-api.log:2016-10-13 22:17:04.476 DEBUG neutronclient.v2_0.client
[req-3b1c4dff-d9e9-41a5-9719-5bbb7c68085c admin admin] GET call to
neutron for
http://10.61.148.89:9696/v2.0/ports.json?device_id=b9f97618-085b-4d2b-bc94-34f3b953e2ee&device_id=d6c67c2f-0d21-4ef8-bcfe-eba852ed0cc1 used request id req-eb8bd6ef-1ecb-4c41-9355-26e4edb84d5c from
(pid=12330) _append_request_id
/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py:127
n-cond.log:2016-10-13 22:09:28.170 WARNING nova.scheduler.utils
[req-6b5bf92a-ce53-46d4-8965-b54e02d21aef admin admin] [instance:
b9f97618-085b-4d2b-bc94-34f3b953e2ee] Setting instance to ERROR state.
n-cond.log:2016-10-13 22:09:28.304 DEBUG nova.network.neutronv2.api
[req-6b5bf92a-ce53-46d4-8965-b54e02d21aef admin admin] [instance:
b9f97618-085b-4d2b-bc94-34f3b953e2ee] deallocate_for_instance() from
(pid=19162) deallocate_for_instance
/opt/stack/nova/nova/network/neutronv2/api.py:1154
n-cond.log:2016-10-13 22:09:28.350 DEBUG neutronclient.v2_0.client
[req-6b5bf92a-ce53-46d4-8965-b54e02d21aef admin admin] GET call to
neutron for
http://10.61.148.89:9696/v2.0/ports.json?device_id=b9f97618-085b-4d2b-bc94-34f3b953e2ee
used request id req-9dc53ce3-1f4e-4619-a22e-ce98a6f1c382 from
(pid=19162) _append_request_id
/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py:127
n-cond.log:2016-10-13 22:09:28.351 DEBUG nova.network.neutronv2.api
[req-6b5bf92a-ce53-46d4-8965-b54e02d21aef admin admin] [instance:
b9f97618-085b-4d2b-bc94-34f3b953e2ee] Instance cache missing network
info. from (pid=19162) _get_preexisting_port_ids
/opt/stack/nova/nova/network/neutronv2/api.py:2133
n-cond.log:2016-10-13 22:09:28.362 DEBUG nova.network.base_api
[req-6b5bf92a-ce53-46d4-8965-b54e02d21aef admin admin] [instance:
b9f97618-085b-4d2b-bc94-34f3b953e2ee] Updating instance_info_cache
with network_info: [] from (pid=19162)
update_instance_cache_with_nw_info
/opt/stack/nova/nova/network/base_api.py:43 grep: n-dhcp.log: No such
file or directory n-sch.log:2016-10-13 22:09:28.166 DEBUG nova.filters
[req-6b5bf92a-ce53-46d4-8965-b54e02d21aef admin admin] Filtering
removed all hosts for the request with instance ID
'b9f97618-085b-4d2b-bc94-34f3b953e2ee'. Filter results:
[('RetryFilter', [(u'i-z78fw9mn', u'i-z78fw9mn')]),
('AvailabilityZoneFilter', [(u'i-z78fw9mn', u'i-z78fw9mn')]),
('RamFilter', [(u'i-z78fw9mn', u'i-z78fw9mn')]), ('DiskFilter', None)]
from (pid=19243) get_filtered_objects
/opt/stack/nova/nova/filters.py:129 n-sch.log:2016-10-13 22:09:28.166
INFO nova.filters [req-6b5bf92a-ce53-46d4-8965-b54e02d21aef admin
admin] Filtering removed all hosts for the request with instance ID
'b9f97618-085b-4d2b-bc94-34f3b953e2ee'. Filter results: ['RetryFilter:
(start: 1, end: 1)', 'AvailabilityZoneFilter: (start: 1, end: 1)',
'RamFilter: (start: 1, end: 1)', 'DiskFilter: (start: 1, end: 0)']
q-svc.log:2016-10-13 22:09:28.184 INFO neutron.wsgi
[req-2b427b03-67d9-474e-be93-b631b6a2ba78 admin
55a846ac28f847eca8521ff71dea8633] 10.61.148.89 - - [13/Oct/2016
22:09:28] "GET
/v2.0/ports.json?device_id=b9f97618-085b-4d2b-bc94-34f3b953e2ee
HTTP/1.1" 200 211 0.038510 q-svc.log:2016-10-13 22:09:28.350 INFO
neutron.wsgi [req-9dc53ce3-1f4e-4619-a22e-ce98a6f1c382 admin
55a846ac28f847eca8521ff71dea8633] 10.61.148.89 - - [13/Oct/2016
22:09:28] "GET
/v2.0/ports.json?device_id=b9f97618-085b-4d2b-bc94-34f3b953e2ee
HTTP/1.1" 200 211 0.042906 q-svc.log:2016-10-13 22:09:52.233 INFO
neutron.wsgi [req-645a777a-35df-456e-a982-433e97cdb0e7 admin
55a846ac28f847eca8521ff71dea8633] 10.61.148.89 - - [13/Oct/2016
22:09:52] "GET
/v2.0/ports.json?device_id=b9f97618-085b-4d2b-bc94-34f3b953e2ee&device_id=d6c67c2f-0d21-4ef8-bcfe-eba852ed0cc1 HTTP/1.1" 200 1241 0.041629 q-svc.log:2016-10-13 22:17:04.477 INFO
neutron.wsgi [req-eb8bd6ef-1ecb-4c41-9355-26e4edb84d5c admin
55a846ac28f847eca8521ff71dea8633] 10.61.148.89 - - [13/Oct/2016
22:17:04] "GET
/v2.0/ports.json?device_id=b9f97618-085b-4d2b-bc94-34f3b953e2ee&device_id=d6c67c2f-0d21-4ef8-bcfe-eba852ed0cc1 HTTP/1.1" 200 1241 0.044646
现在我不知道那个实例部署出了什么问题,有人能给我一些建议吗?
为了解决常见问题的一些建议:
味道:你用的味道和cirros用的一样吗?答案是肯定的:那种风格包括根磁盘的特定磁盘大小?。如果"yes",请检查您正在使用的centos 通用映像所需的最小磁盘大小。图像需要更大的磁盘,或者磁盘对于您的盒子来说太大了。然后,检查可用的高清 space、风格规格和图像规格。
网络:让我们丢弃中子吧。不是分配网络,而是分配一个端口。在neutron中创建端口,在nova boot命令中,将端口分配给vm而不是分配网络(--nic port-id=port-uuid).
Glance 图像定义:当您从下载的 qcow2 文件创建 glance 图像时,您是否包含任何强制图像请求基于 cinder 的磁盘的元数据项?。您是否包含任何元数据?如果是这样,请删除 glance 图像上的所有元数据项。
再次尝试启动 cirros 实例。如果 cirros 没问题,那么它与图像有关(可能是以上任何一个:glance,flavor,disk space)。
让我知道你找到了什么!
部署 DevStack 后,我成功创建了 cirros 实例。现在我要创建 CentOS 实例:
- 我从[这里]下载图片
CentOS-7-x86_64-GenericCloud-1608.qcow2
。(http://cloud.centos.org/centos/7/images/) - 那我运行
nova boot --flavor 75c84ea2-d5b0-4d99-b935-08f654122aa3 --image 997f51bd-1ee2-4cdb-baea-6cef766bf191 --security-groups 207880e9-165f-4295-adfd-1f91ac96aaaa --nic net-id=26c05c99-b82d-403f-a988-fc07d3972b6b centos-1
- 然后我运行
nova list
,它给出:b9f97618-085b-4d2b-bc94-34f3b953e2ee | centos-1 | ERROR | - | NOSTATE
它处于
ERROR
状态,所以我用那个b9f97618-085b-4d2b-bc94-34f3b953e2ee
(实例id)grep日志:grep b9f97618-085b-4d2b-bc94-34f3b953e2ee *.log
grep returns:
结果:
n-api.log:2016-10-13 22:09:27.975 DEBUG nova.compute.api [req-6b5bf92a-ce53-46d4-8965-b54e02d21aef admin admin] [instance: b9f97618-085b-4d2b-bc94-34f3b953e2ee] block_device_mapping [BlockDeviceMapping(boot_index=0,connection_info=None,created_at=,delete_on_termination=True,deleted=,deleted_at=,destination_type='local',device_name=None,device_type='disk',disk_bus=None,guest_format=None,id=,image_id='997f51bd-1ee2-4cdb-baea-6cef766bf191',instance=,instance_uuid=,no_device=False,snapshot_id=None,source_type='image',tag=None,updated_at=,volume_id=None,volume_size=None), BlockDeviceMapping(boot_index=-1,connection_info=None,created_at=,delete_on_termination=True,deleted=,deleted_at=,destination_type='local',device_name=None,device_type='disk',disk_bus=None,guest_format=None,id=,image_id=None,instance=,instance_uuid=,no_device=False,snapshot_id=None,source_type='blank',tag=None,updated_at=,volume_id=None,volume_size=1)] from (pid=12331) _bdm_validate_set_size_and_instance /opt/stack/nova/nova/compute/api.py:1239 n-api.log:2016-10-13 22:09:28.117 DEBUG nova.compute.api [req-d9327bbd-d333-4d37-8651-57e95d21396b admin admin] [instance: b9f97618-085b-4d2b-bc94-34f3b953e2ee] Fetching instance by UUID from (pid=12331) get /opt/stack/nova/nova/compute/api.py:2215 n-api.log:2016-10-13 22:09:28.184 DEBUG neutronclient.v2_0.client [req-d9327bbd-d333-4d37-8651-57e95d21396b admin admin] GET call to neutron for http://10.61.148.89:9696/v2.0/ports.json?device_id=b9f97618-085b-4d2b-bc94-34f3b953e2ee used request id req-2b427b03-67d9-474e-be93-b631b6a2ba78 from (pid=12331) _append_request_id /usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py:127 n-api.log:2016-10-13 22:09:28.195 INFO nova.osapi_compute.wsgi.server [req-d9327bbd-d333-4d37-8651-57e95d21396b admin admin] 10.61.148.89 "GET /v2.1/servers/b9f97618-085b-4d2b-bc94-34f3b953e2ee HTTP/1.1" status: 200 len: 2018 time: 0.0843861 n-api.log:2016-10-13 22:09:52.232 DEBUG neutronclient.v2_0.client [req-415982d6-9ff4-4c80-99a8-46e1765a58d9 admin admin] GET call to neutron for http://10.61.148.89:9696/v2.0/ports.json?device_id=b9f97618-085b-4d2b-bc94-34f3b953e2ee&device_id=d6c67c2f-0d21-4ef8-bcfe-eba852ed0cc1 used request id req-645a777a-35df-456e-a982-433e97cdb0e7 from (pid=12331) _append_request_id /usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py:127 n-api.log:2016-10-13 22:17:04.476 DEBUG neutronclient.v2_0.client [req-3b1c4dff-d9e9-41a5-9719-5bbb7c68085c admin admin] GET call to neutron for http://10.61.148.89:9696/v2.0/ports.json?device_id=b9f97618-085b-4d2b-bc94-34f3b953e2ee&device_id=d6c67c2f-0d21-4ef8-bcfe-eba852ed0cc1 used request id req-eb8bd6ef-1ecb-4c41-9355-26e4edb84d5c from (pid=12330) _append_request_id /usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py:127 n-cond.log:2016-10-13 22:09:28.170 WARNING nova.scheduler.utils [req-6b5bf92a-ce53-46d4-8965-b54e02d21aef admin admin] [instance: b9f97618-085b-4d2b-bc94-34f3b953e2ee] Setting instance to ERROR state. n-cond.log:2016-10-13 22:09:28.304 DEBUG nova.network.neutronv2.api [req-6b5bf92a-ce53-46d4-8965-b54e02d21aef admin admin] [instance: b9f97618-085b-4d2b-bc94-34f3b953e2ee] deallocate_for_instance() from (pid=19162) deallocate_for_instance /opt/stack/nova/nova/network/neutronv2/api.py:1154 n-cond.log:2016-10-13 22:09:28.350 DEBUG neutronclient.v2_0.client [req-6b5bf92a-ce53-46d4-8965-b54e02d21aef admin admin] GET call to neutron for http://10.61.148.89:9696/v2.0/ports.json?device_id=b9f97618-085b-4d2b-bc94-34f3b953e2ee used request id req-9dc53ce3-1f4e-4619-a22e-ce98a6f1c382 from (pid=19162) _append_request_id /usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py:127 n-cond.log:2016-10-13 22:09:28.351 DEBUG nova.network.neutronv2.api [req-6b5bf92a-ce53-46d4-8965-b54e02d21aef admin admin] [instance: b9f97618-085b-4d2b-bc94-34f3b953e2ee] Instance cache missing network info. from (pid=19162) _get_preexisting_port_ids /opt/stack/nova/nova/network/neutronv2/api.py:2133 n-cond.log:2016-10-13 22:09:28.362 DEBUG nova.network.base_api [req-6b5bf92a-ce53-46d4-8965-b54e02d21aef admin admin] [instance: b9f97618-085b-4d2b-bc94-34f3b953e2ee] Updating instance_info_cache with network_info: [] from (pid=19162) update_instance_cache_with_nw_info /opt/stack/nova/nova/network/base_api.py:43 grep: n-dhcp.log: No such file or directory n-sch.log:2016-10-13 22:09:28.166 DEBUG nova.filters [req-6b5bf92a-ce53-46d4-8965-b54e02d21aef admin admin] Filtering removed all hosts for the request with instance ID 'b9f97618-085b-4d2b-bc94-34f3b953e2ee'. Filter results: [('RetryFilter', [(u'i-z78fw9mn', u'i-z78fw9mn')]), ('AvailabilityZoneFilter', [(u'i-z78fw9mn', u'i-z78fw9mn')]), ('RamFilter', [(u'i-z78fw9mn', u'i-z78fw9mn')]), ('DiskFilter', None)] from (pid=19243) get_filtered_objects /opt/stack/nova/nova/filters.py:129 n-sch.log:2016-10-13 22:09:28.166 INFO nova.filters [req-6b5bf92a-ce53-46d4-8965-b54e02d21aef admin admin] Filtering removed all hosts for the request with instance ID 'b9f97618-085b-4d2b-bc94-34f3b953e2ee'. Filter results: ['RetryFilter: (start: 1, end: 1)', 'AvailabilityZoneFilter: (start: 1, end: 1)', 'RamFilter: (start: 1, end: 1)', 'DiskFilter: (start: 1, end: 0)'] q-svc.log:2016-10-13 22:09:28.184 INFO neutron.wsgi [req-2b427b03-67d9-474e-be93-b631b6a2ba78 admin 55a846ac28f847eca8521ff71dea8633] 10.61.148.89 - - [13/Oct/2016 22:09:28] "GET /v2.0/ports.json?device_id=b9f97618-085b-4d2b-bc94-34f3b953e2ee HTTP/1.1" 200 211 0.038510 q-svc.log:2016-10-13 22:09:28.350 INFO neutron.wsgi [req-9dc53ce3-1f4e-4619-a22e-ce98a6f1c382 admin 55a846ac28f847eca8521ff71dea8633] 10.61.148.89 - - [13/Oct/2016 22:09:28] "GET /v2.0/ports.json?device_id=b9f97618-085b-4d2b-bc94-34f3b953e2ee HTTP/1.1" 200 211 0.042906 q-svc.log:2016-10-13 22:09:52.233 INFO neutron.wsgi [req-645a777a-35df-456e-a982-433e97cdb0e7 admin 55a846ac28f847eca8521ff71dea8633] 10.61.148.89 - - [13/Oct/2016 22:09:52] "GET /v2.0/ports.json?device_id=b9f97618-085b-4d2b-bc94-34f3b953e2ee&device_id=d6c67c2f-0d21-4ef8-bcfe-eba852ed0cc1 HTTP/1.1" 200 1241 0.041629 q-svc.log:2016-10-13 22:17:04.477 INFO neutron.wsgi [req-eb8bd6ef-1ecb-4c41-9355-26e4edb84d5c admin 55a846ac28f847eca8521ff71dea8633] 10.61.148.89 - - [13/Oct/2016 22:17:04] "GET /v2.0/ports.json?device_id=b9f97618-085b-4d2b-bc94-34f3b953e2ee&device_id=d6c67c2f-0d21-4ef8-bcfe-eba852ed0cc1 HTTP/1.1" 200 1241 0.044646
现在我不知道那个实例部署出了什么问题,有人能给我一些建议吗?
为了解决常见问题的一些建议:
味道:你用的味道和cirros用的一样吗?答案是肯定的:那种风格包括根磁盘的特定磁盘大小?。如果"yes",请检查您正在使用的centos 通用映像所需的最小磁盘大小。图像需要更大的磁盘,或者磁盘对于您的盒子来说太大了。然后,检查可用的高清 space、风格规格和图像规格。
网络:让我们丢弃中子吧。不是分配网络,而是分配一个端口。在neutron中创建端口,在nova boot命令中,将端口分配给vm而不是分配网络(--nic port-id=port-uuid).
Glance 图像定义:当您从下载的 qcow2 文件创建 glance 图像时,您是否包含任何强制图像请求基于 cinder 的磁盘的元数据项?。您是否包含任何元数据?如果是这样,请删除 glance 图像上的所有元数据项。
再次尝试启动 cirros 实例。如果 cirros 没问题,那么它与图像有关(可能是以上任何一个:glance,flavor,disk space)。
让我知道你找到了什么!