如何使用 Azure CLI 创建 VM 指定 Azure Linux OS 磁盘类型 [英] How to specify Azure Linux OS Disk Type with Azure CLI Create VM

查看:22
本文介绍了如何使用 Azure CLI 创建 VM 指定 Azure Linux OS 磁盘类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Azure CLI 命令成功创建 Linux VM...

I am successfully creating a Linux VMs with the Azure CLI Command...

vm create --resource-group myResourceGroup --name myVMName --image credativ:Debian:9:latest --size Standard_B1s

我注意到生成的 OS 磁盘是 30GiB 高级 SSD.

I note that the resulting OS disk is a 30GiB Premium SSD.

是否可以在创建 VM 时将相同的 VM 映像建立到非高级磁盘或不同大小的磁盘上,还是由我请求 VM 所基于的映像决定?

Is it possible to stand up the same VM image to non-premium disk or a different size at the point the VM is created, or is this determined by the image I have requested the VM is based upon?

推荐答案

如果你想使用非高级磁盘创建 Azure VM,例如 HDD 磁盘.您可以像这样使用 CLI 命令:

If you want to create the Azure VM with the non-premium disk, for example, HDD disk. You can use the CLI command like this:

az vm create -g charlesTestVM -n myVM1 --size Standard_B1s --image UbuntuLTS --storage-sku Standard_LRS --os-disk-size-gb 63

结果如下:

这意味着您可以使用 CLI 命令 az vm create 带有参数----storage-sku 来控制磁盘类型和参数--os-disk-size-gb 控制操作系统磁盘大小.

So it means you can use the CLI command az vm create with the parameter ----storage-sku to control the disk type and the parameter --os-disk-size-gb to control the os disk size.

这篇关于如何使用 Azure CLI 创建 VM 指定 Azure Linux OS 磁盘类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆