07.計算Nova→3.場景學習→4.Start Instance

背景:html







描述 詳細
  1. 向 nova-api 發送請求
    1. 客戶(能夠是 OpenStack 最終用戶,也能夠是其餘程序)向API(nova-api)發送請求:「幫我啓動這個 Instance」
    2. 查看n-api的日誌。
1
2
3
4
5
6
Jun 18 15:06:00 controller devstack@n-api.service[14704]: 
DEBUG nova.compute.api
[None req-b7d17888-d21d-40c5-a918-e20d02929215 admin admin]
[instance: 0af39618-5d8c-4fc8-bb44-781246bff6dd]
Going to try to start instance
{{(pid=14738) start /opt/stack/nova/nova/compute/api.py:2281
  1. nova-api 發送消息
    1. nova-api 向 Messaging(RabbitMQ)發送了一條消息:「啓動這個 Instance」。查看源代碼 /opt/stack/nova/nova/compute/api.py 的 2281 行,方法是 start。
    2. self.compute_rpcapi.start_instance() 的做用就是向 RabbitMQ 上 nova-compute 的消息隊列裏發送一條 start instance 的消息。
  1. nova-compute 執行操做:
    1. 查看計算節點上n-cpu的日誌
開始啓動
1
2
3
4
5
6
Jun 18 15:06:01 compute nova-compute[5685]: 
DEBUG nova.virt.libvirt.driver
[None req-b7d17888-d21d-40c5-a918-e20d02929215 admin admin]
[instance: 0af39618-5d8c-4fc8-bb44-781246bff6dd]
Start _get_guest_xml network_info=[{"profile": {},
{{(pid=5685) _get_guest_xml /opt/stack/nova/nova/virt/libvirt/driver.
1
2
3
4
5
Jun 18 15:06:01 compute nova-compute[5685]: 
DEBUG nova.virt.libvirt.driver
[None req-b7d17888-d21d-40c5-a918-e20d02929215 admin admin]
[instance: 0af39618-5d8c-4fc8-bb44-781246bff6dd]
End _get_guest_xml xml=<domain type="kvm">
準備 instance 鏡像文件
1
2
3
4
5
6
7
Jun 18 15:06:01 compute nova-compute[5685]: 
DEBUG oslo_concurrency.processutils
[None req-b7d17888-d21d-40c5-a918-e20d02929215 admin admin]
CMD "/usr/bin/python -m oslo_concurrency.prlimit --as=1073741824 -...
qemu-img info /opt/stack/data/nova/instances/0af39618-5d8c-4fc8-bb44-781246bff6dd/disk
...
{{(pid=5685) execute /usr/local/lib/python2.7/dist-packages/oslo_concurrency/processutils.py:409
1
2
3
4
5
6
7
Jun 18 15:06:01 compute nova-compute[5685]: 
DEBUG oslo_concurrency.processutils
[None req-b7d17888-d21d-40c5-a918-e20d02929215 admin admin]
CMD "/usr/bin/python -m oslo_concurrency.prlimit --as=1073741824 --cpu=30 -- env LC_ALL=C LANG=C
qemu-img info /opt/stack/data/nova/instances/_base/f8d0b66bcf04fa163b812946b8b5e0c8af9722c2
--force-share" returned: 0 in 0.036s
{{(pid=5685) execute /usr/local/lib/python2.7/dist-packages/oslo_concurrency/processutils.py:409
準備虛擬網卡
1
2
3
4
5
Jun 18 15:06:01 compute nova-compute[5685]: 
DEBUG nova.virt.libvirt.vif
[None req-b7d17888-d21d-40c5-a918-e20d02929215 admin admin]
vif_type=bridge instance=Instance(access_ip_v4=None,access_ip_v6=None,architecture=Non...
{{(pid=5685) plug /opt/stack/nova/nova/virt/libvirt/vif.py:785
1
2
3
Jun 18 15:06:01 compute nova-compute[5685]: 
INFO os_vif [None req-b7d17888-d21d-40c5-a918-e20d02929215
admin admin] Successfully plugged vif VIFBridge
vif是virtual interface(虛擬網卡)的縮寫
成功啓動
1
2
3
4
5
Jun 18 15:06:02 compute nova-compute[5685]: 
INFO nova.compute.manager
[None req-55b92b99-57ee-4f39-a9dd-63dc885efbb9 None None]
[instance: 0af39618-5d8c-4fc8-bb44-781246bff6dd]
VM Resumed (Lifecycle Event)
resume rɪ'zjum (使)從新開始;(使)繼續進行
1
2
3
4
Jun 18 15:06:02 compute nova-compute[5685]: 
INFO nova.virt.libvirt.driver [-]
[instance: 0af39618-5d8c-4fc8-bb44-781246bff6dd]
Instance rebooted successfully.
相關文章
相關標籤/搜索