需求描述

在部署完 ARM 模式的虚拟机以后,可以通过 PowerShell 命令来调整虚拟机的尺寸,以下是通过 PowerShell 命令来调整 ARM 模式的虚拟机尺寸。

Note

本文只限于 ARM 模式下的虚拟机,经典模式的虚拟机不适用。

操作步骤

  1. 首先,我们需要使用下面的命令定义需要调整尺寸的虚拟机的基本信息:

     
     #定义资源组名称
    $ResourceGroupName = <资源组名称>
    #定义需要调整尺寸的虚拟机名称
    $VMName = <虚拟机名称>
    #定义虚拟机的新尺寸,这里以Standard_A1为例,详细尺寸列表见附录部分
    $NewVMSize = "Standard_A1"
  2. 定义完成后,使用下面的命令将虚拟机调整到新的尺寸:

     
     #获取虚拟机对象
    $vm = Get-AzureRmVM -ResourceGroupName <资源组名称> -Name <虚拟机名称>
    #设定新尺寸
    $vm.HardwareProfile.vmSize = $NewVMSize
    #将虚拟机调整为新尺寸
    Update-AzureRmVM -ResourceGroupName $ResourceGroupName -VM $vm
  3. 待命令执行完成后,可以看到虚拟机的尺寸已调整完毕:

附录

尺寸名称 尺寸变量名
A0基本 Basic_A0
A1基本 Basic_A1
A2基本 Basic_A2
A3基本 Basic_A3
A4基本 Basic_A4
A0标准 Standard_A0
A1标准 Standard_A1
A1_v2标准 Standard_A1_v2
A2标准 Standard_A2
A2_v2标准 Standard_A2_v2
A2m_v2标准 Standard_A2m_v2
A3标准 Standard_A3
A4标准 Standard_A4
A4_v2标准 Standard_A4_v2
A4m_v2标准 Standard_A4m_v2
A5标准 Standard_A5
A6标准 Standard_A6
A7标准 Standard_A7
A8_v2标准 Standard_A8_v2
A8m_v2标准 Standard_A8m_v2
D1标准 Standard_D1
D1_v2标准 Standard_D1_v2
D11标准 Standard_D11
D11_v2标准 Standard_D11_v2
D11_v2促销 Standard_D11_v2_Promo
D12标准 Standard_D12
D12_v2标准 Standard_D12_v2
D12_v2促销 Standard_D12_v2_Promo
D13标准 Standard_D13
D13_v2标准 Standard_D13_v2
D13_v2_促销 Standard_D13_v2_Promo
D14标准 Standard_D14
D14_v2标准 Standard_D14_v2
D14_v2_促销 Standard_D14_v2_Promo
D15_v2标准 Standard_D15_v2
D2标准 Standard_D2
D2_v2标准 Standard_D2_v2
D2_v2_促销 Standard_D2_v2_Promo
D3标准 Standard_D3
D3_v2标准 Standard_D3_v2
D3_v2_促销 Standard_D3_v2_Promo
D4标准 Standard_D4
D4_v2标准 Standard_D4_v2
D4_v2_促销 Standard_D4_v2_Promo
D5_v2标准 Standard_D5_v2
D5_v2_促销 Standard_D5_v2_Promo
DS1标准 Standard_DS1
DS1_v2标准 Standard_DS1_v2
DS11标准 Standard_DS11
DS11_v2标准 Standard_DS11_v2
DS11_v2_促销 Standard_DS11_v2_Promo
DS12标准 Standard_DS12
DS12_v2标准 Standard_DS12_v2
DS12_v2_促销 Standard_DS12_v2_Promo
DS13标准 Standard_DS13
DS13_v2标准 Standard_DS13_v2
DS13_v2_促销 Standard_DS13_v2_Promo
DS14标准 Standard_DS14
DS14_v2标准 Standard_DS14_v2
DS14_v2_促销 Standard_DS14_v2_Promo
DS15_v2标准 Standard_DS15_v2
DS2标准 Standard_DS2
DS2_v2标准 Standard_DS2_v2
DS2_v2_促销 Standard_DS2_v2_Promo
DS3标准 Standard_DS3
DS3_v2标准 Standard_DS3_v2
DS3_v2_促销 Standard_DS3_v2_Promo
DS4标准 Standard_DS4
DS4_v2标准 Standard_DS4_v2
DS4_v2_促销 Standard_DS4_v2_Promo
DS5_v2标准 Standard_DS5_v2
DS5_v2_促销 Standard_DS5_v2_Promo
F1标准 Standard_F1
F16标准 Standard_F16
F16s标准 Standard_F16s
F1s标准 Standard_F1s
F2标准 Standard_F2
F2s标准 Standard_F2s
F4标准 Standard_F4
F4s标准 Standard_F4s
F8标准 Standard_F8
F8s标准 Standard_F8s

立即访问http://market.azure.cn

【虚拟机-部署】通过 Powershell 来调整 ARM 模式下虚拟机的尺寸的更多相关文章

  1. 通过 Powershell 来调整 ARM 模式下虚拟机的尺寸

    需求描述 在部署完 ARM 模式的虚拟机以后,可以通过 PowerShell 命令来调整虚拟机的尺寸,以下是通过 PowerShell 命令来调整 ARM 模式的虚拟机尺寸. Note 本文只限于 A ...

  2. 通过 Powershell 来替换 ARM 模式下虚拟机的网络接口

    需求描述 客户在部署完 ARM 模式的虚拟机以后,由于误操作在虚拟机内部禁用了网卡导致远程访问虚拟机受到限制,以下是通过 Powershell 命令来替换原有虚拟网络接口实现虚拟网卡重置功能. Not ...

  3. 订阅无法在 ARM 模式下创建虚拟机,只能在 ASM 模式下创建 Azure VM 部署

    问题描述 资源组所有者可以在新版 portal 创建经典模式的虚拟机,但是无法创建 ARM 模式的虚拟机. 问题现象 环境中有个相对权限比较高的账户,比如 account admin (以下简称为 A ...

  4. Azure ARM (10) ARM模式下的虚拟机和Classic Model虚拟机的区别

    <Windows Azure Platform 系列文章目录> 本文内容比较多,请大家仔细阅读,谢谢! 请读者注意,在Azure ARM平台,有两种虚拟机模式:经典虚拟机和ARM虚拟机 A ...

  5. Azure ARM (11) ARM模式下,创建虚拟机并配置负载均衡器

    <Windows Azure Platform 系列文章目录> 本文内容比较多,请大家仔细阅读,谢谢! 在前几章中,我们做了准备工作: 1.创建ARM Resouce Group,叫Lei ...

  6. Azure ARM (9) 创建ARM模式下的虚拟机网络

    <Windows Azure Platform 系列文章目录> 笔者在之前几章内容中,创建了ARM Resource Group,然后在这个ARM Resource Group下创建Azu ...

  7. Azure ARM模式下VNet配置中需要注意的几点事项

    虚拟网络的配置是所有公有云中非常重要的环节.把虚拟网络配置好,对整个系统的管理.维护,以及安全性都非常重要. 本文将介绍Azure在ARM模式下VNet配置中需要特别注意的几点. 一 Azure的VN ...

  8. Azure ARM (12) ARM模式下,在负载均衡器上设置多个公网IP地址

    <Windows Azure Platform 系列文章目录> 最近在帮助一个客户设置WAF (Web Application Firewall),WAF厂商要求在负载均衡器上,设置多个公 ...

  9. 在ARM模式下捕获VM并创建新VM

    在ASM模式下,可以通过Manage Portal上捕获VM的Image,并创建新的VM.在ARM模式下,在Portal上目前还没有这个功能,要做VM镜像的捕获和创建新的VM需要用powershell ...

随机推荐

  1. jQuery contextMenu使用

    地址:jQuery contextMenu 需要以下文件: jquery.contextMenu.css jquery.min.css jquery.contextMenu.js jquery.ui. ...

  2. Hibernate延迟加载与opensessioninviewFilter

    转自:https://blog.csdn.net/skk_7/article/details/17917339 hibernate延迟加载: 一个person对应多个school,使用hibernat ...

  3. Swing 添加Esc快捷键退出程序

    JFrame demo = new JFrame(); demo.addKeyListener( new KeyListener(){ public void keyReleased(KeyEvent ...

  4. WPF学习系列之五(WPF控件)

    控件:    1.内容控件------这些控件能够包含嵌套的元素,为它们提供几乎无限的显示能力.内容控件包括Lable,Button 以及ToolTip类. 内容控件是更特殊的控件类型,它们可以包含( ...

  5. Struts&nbsp;result&nbsp;param详细设置

    <</span>result type="json"> <</span>param name="root">da ...

  6. WP之样式

    1.定义资源 <Window.Resources> <!--下面用样式--> <Style x:Key="BigFontButtonStyle"> ...

  7. LeetCode: 669 Trim a Binary Search Tree(easy)

    题目: Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so th ...

  8. 数据库路由中间件MyCat - 源代码篇(3)

    此文已由作者张镐薪授权网易云社区发布. 欢迎访问网易云社区,了解更多网易技术产品运营经验. 2. 前端连接建立与认证 Title:MySql连接建立以及认证过程client->MySql:1.T ...

  9. TensorFlow中tf.ConfigProto()配置Sesion运算方式

    博主个人网站:https://chenzhen.online tf.configProto用于在创建Session的时候配置Session的运算方式,即使用GPU运算或CPU运算: 1. tf.Con ...

  10. js call apply bind

    call.apply.bindcat.call(dog, a, b) == cat.apply(dog, [a, b]) == (cat.bind(dog, a, b))() 1.作用 改变函数内的t ...