CloudStack SSVM啟動條件源碼閱讀與問題解決方案_CloudStack

來源:互聯網
上載者:User

CloudStack SSVM啟動條件源碼閱讀與問題解決方案:

 在CloudStack建立zone的時候,經常遇到SSVM不啟動,或者根本就沒有SSVM的情況,分析CloudStack日誌,會發現有“Zone 1 is not ready to launch secondary storage VM yet”列印,意思是zone還未準備好啟動SSVM。

通過查詢CloudStack原始碼,發現啟動SSVM前有如下檢查:

        擷取Zone裡的template。

        select a.* from vm_template a, host h where h.type = 'Routing' and h.data_center_id = 1 and a.type = 'System' and a.hypervisor_type = h.hypervisor_type limit 1;   

        如果沒有擷取到,會列印如下警告:

        Warn: Zone host is ready, but secondary storage vm template  3 is not ready on secondary storage: 1

        解決辦法:檢查system template是否已經下載完成(注意,要下載自己環境的hypervisor的system template)。

        擷取zone的二級儲存。

        select * from host where type = 'SecondaryStorage' and data_center_id = 1;  # host id is 3

        如果沒有擷取到,會列印如下警告:

        Warn: No secondary storage available in zone 1, wait until it is ready to launch secondary storage vm

        解決辦法:為zone 1建立secondary storage pool。

        擷取template和host的關聯。

        select * from template_host_ref where host_id = 3 and template_id = 1 and download_state = 'DOWNLOADED'; # host id and template id is query by before.

        如果沒有擷取到,會列印如下警告:

        Warn: Zone host is ready, but secondary storage vm template  3 is not ready on secondary storage: 1

        如果secondary storage是NFS,可以通過mount來檢查secondary storage是否能夠正常工作,如果secondary storage沒有問題,則只能等待CloudStack自動關聯上。

        獲得host的主儲存。

        SELECT p.data_center_id,  count(ph.host_id) count  FROM storage_pool p, storage_pool_host_ref ph WHERE p.id = ph.pool_id AND p.data_center_id = 1 GROUP by p.data_center_id;

        主儲存數量需要大於0,如果等於0,會列印如下警告:

        Warn: Primary storage is not ready, wait until it is ready to launch secondary storage vm

沒有問題後,CS會列印:Zone  1 is ready to launch secondary storage VM。 CS將會啟動 start secondary storage VM工作。

         感謝閱讀,希望能協助到大家,謝謝大家對本站的支援!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.