使用CLI将VM挂载到Linux驱动器 [英] Mount VM to linux drive with CLI
问题描述
我喜欢这样:
  az vm disk attach \
      --name $ disk_name \
      --size-gb $ disk_capacity \
      --sku $ disk_sku \
      --vm-name $ vm_name \
      --group-name $ RESOURCE_GROUP_NAME \
      --new
但我不知道如何在VM内部完成其余的挂载过程
我需要编写脚本而无需人工干预。任何帮助都表示赞赏。
我们实际上有一个关于完成此任务的文档
根据脚本编写它,你可以使用上面链接中的命令并使用自定义脚本扩展来自动化它
https://docs.microsoft.com/en-us/azure/virtual-machines / extensions / custom-script-linux
I am attachinglike this:
az vm disk attach \
--name $disk_name \
--size-gb $disk_capacity \
--sku $disk_sku \
--vm-name $vm_name \
--group-name $RESOURCE_GROUP_NAME \
--new
but I don't know how to get the rest of the mount process done inside the VM
I need to script it with no human intervention. Any help is appreciated.
We actually have a doc on accomplishing this
As per scripting it, you could use the commands in the above link and use Custom Script Extension to automate it
https://docs.microsoft.com/en-us/azure/virtual-machines/extensions/custom-script-linux
这篇关于使用CLI将VM挂载到Linux驱动器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!