问题描述
我刚刚完成了最初的测试阶段使用DSC自动化我们的产品发布天青虚拟机,特别是在这篇文章说明的命令,这是在Azure PowerShell的SDK的一部分。
I just finished the initial tests phase on automating our product release to Azure Virtual Machines using DSC, particularly with the commands described in this article, which are part of the Azure PowerShell SDK.
我可以把使用PowerShell中的DSC配置不错,但由于这个过程是自动的,我希望得到的配置过程是如何进展的反馈。当我打电话更新 - AzureVM
,我得到一个确定,但在此之后,DSC配置情况,异步的,我不知道这是怎么回事,除非我登录到机器(或<一个href=\"http://blogs.msdn.com/b/powershell/archive/2014/10/28/manage-the-powershell-dsc-extension-in-the-azure-$p$pview-portal.aspx\"相对=nofollow>看更新的Azure门户现在显示了这种)。
I can push a DSC configuration fine using PowerShell, but since this process is automated, I wanted to get feedback on how the configuration process progressed. When I call Update-AzureVM
, I get an ok but the DSC configuration happens after that, asynchronously, and I don't know how it is going unless I log into the machine (or look at the updated Azure Portal which now shows this).
我想,如果配置失败失败我自动化的过程。如何从我的脚本检查配置的状态,并优雅地检测成功或失败?
I'd like to fail my automated process if the configuration fails. How can I check the status of the configuration from my script and gracefully detect success or failure?
推荐答案
我们已经添加了一个新的cmdlet的获取,AzureVMDscExtensionStatus获得运行DSC配置的状态。
We have added a new cmdlet Get-AzureVMDscExtensionStatus to obtain status of the running DSC configuration
这文章解释了相同的http://blogs.msdn.com/b/powershell/archive/2015/02/27/introducing-get-azurevmdscextensionstatus-cmdlet-for-azure-powershell-dsc-extension.aspx
这篇关于我如何获得有关DSC执行反馈蔚蓝VM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!