You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure中是否存在查看无法启动虚拟机控制台消息的CLI命令?

Azure 查看虚拟机启动控制台日志的CLI命令

Azure平台有对应的CLI命令,可实现和AWS中aws ec2 get-console-output --instance-id类似的功能,用于查看虚拟机启动阶段的控制台日志。

具体命令格式如下:

az vm boot-diagnostics get-boot-log --resource-group <资源组名称> --name <虚拟机名称>

若需要将日志保存到本地文件,可添加--file参数:

az vm boot-diagnostics get-boot-log --resource-group <资源组名称> --name <虚拟机名称> --file <本地文件路径>

注意:使用该命令前,需确保目标虚拟机已启用启动诊断功能,否则无法获取日志。

内容的提问来源于stack exchange,提问作者VaTo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.17 21:12:31