2017-10-11 277 views
0

我有一個自定義的centos AMI,我從https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.amzn1.noarch.rpm安裝了aws-cfn-bootstrap。AWS:雲初始化失敗

在運行cloudformation腳本之後,cloud-init會停留在該實例上。 我試圖查看cloud-init.log。我無法調試該問題。 我不知道如何調試。需要幫助,我目前卡在這裏。以下是日誌中的一些錯誤。幫助我解決這個問題。

我需要更改cloud-init.cfg嗎?

2017-10-10 13:12:26,172 - util.py[DEBUG]: Running command ['mount', '-o', 'ro,sync', '-t', 'iso9660', '/dev/xvda', '/tmp/tmptIJHi2'] with allowed return codes [0] (shell=False, capture=True) 
2017-10-10 13:12:26,188 - util.py[DEBUG]: Failed mount of '/dev/xvda' as 'iso9660': Unexpected error while running command. 
Command: ['mount', '-o', 'ro,sync', '-t', 'iso9660', '/dev/xvda', '/tmp/tmptIJHi2'] 
Exit code: 32 
Reason: - 
Stdout: - 

2017-10-10 13:12:27,908 - util.py[DEBUG]: Failed mount of '/dev/xvda' as 'iso9660': Unexpected error while running command. 
Command: ['mount', '-o', 'ro,sync', '-t', 'iso9660', '/dev/xvda', '/tmp/tmpJcAGOG'] 
Exit code: 32 
Reason: - 
Stdout: - 

2017-10-11 04:05:42,847 - util.py[WARNING]: Failed running /var/lib/cloud/instance/scripts/part-001 [1] 
2017-10-11 04:05:42,847 - util.py[DEBUG]: Failed running /var/lib/cloud/instance/scripts/part-001 [1] 
Traceback (most recent call last): 
    File "/usr/lib/python2.7/site-packages/cloudinit/util.py", line 802, in runparts 
    subp(prefix + [exe_path], capture=False) 
    File "/usr/lib/python2.7/site-packages/cloudinit/util.py", line 1858, in subp 
    cmd=args) 
ProcessExecutionError: Unexpected error while running command. 
Command: ['/var/lib/cloud/instance/scripts/part-001'] 
Exit code: 1 
Reason: - 
Stdout: - 
Stderr: - 

的BR, 基蘭

回答

0

你的問題是在安裝命令。 您是否使用現有服務器(使用AMI)啓動實例? 您可以通過在該服務器上運行命令進行檢查,並查看它是否正常工作。

我相信你的命令是這樣的。

mount -o ro,sync -t iso9660 /dev/xvda /tmp/tmptIJHi2 
+0

CloudForms腳本正在觸發正在嘗試爲cloudinit設置某些內容的cloudinit。是的,它正在執行您在過程中提到的類似命令。 – Kiran

+0

是的,我知道這一點。但是我希望您在放入雲初始化之前確保您的命令先行工作。您可以先嚐試運行實例。有時我也有這種問題。 – sin

+0

好吧,我會嘗試並讓你知道。 – Kiran