需求描述

在部署完 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. Azure ARM (10) ARM模式下的虚拟机和Classic Model虚拟机的区别

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

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

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

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

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

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

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

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

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

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

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

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

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

随机推荐

  1. ui-grid样式,表格高度自适应行高,没有滚动条,去掉表头

    前后端设置:

  2. POJ_1984 Navigation Nightmare 【并查集】

    一.题面 POJ1984 二.分析 这题还是比较有意思的一题. 首先需要清楚的是,这题与普通并查集的区别在于它的节点之间的权值是二维的,因为是曼哈顿距离,肯定不能直接存距离,这样将不利于后面的路径压缩 ...

  3. 04-树6 Complete Binary Search Tree (30 分)

    A Binary Search Tree (BST) is recursively defined as a binary tree which has the following propertie ...

  4. 牌型种数-dfs-蓝桥杯2015

    牌型种数 牌型种数 小明被劫持到 X 赌城,被迫与其他 3 人玩牌. 一副扑克牌(去掉大小王牌,共 52 张),均匀发给 4 个人,每个人 13 张. 这时,小明脑子里突然冒出一个问题: 如果不考虑花 ...

  5. D. Diverse Garland-----CF字符串

    D. Diverse Garland time limit per test 1 second memory limit per test 256 megabytes input standard i ...

  6. python开头——文件声明 详解

    一.解释器声明 1.声明方式 linux #!/usr/bin/python windowns #!c:/python27/python.exe 放在首行 2.作用 告诉电脑,要用/usr/bin下面 ...

  7. tomcat普通用户启动不了

    Neither the JAVA_HOME nor the JRE_HOME environment variable is defined  At least one of these enviro ...

  8. jQuery随笔-自定义属性获取+tooltip

    1.Jquery自定义属性获取 1) 通过自定义属性值获取document console.log($('[data-id='+item_id+']',listWrap)); $('[data-id= ...

  9. Maven系统学习

    1. 1.1 何为构建? 编译.测试.运行.打包.部署等工作: Maven就是用软件的办法让这一系列工作自动化,只需要一条简单的命令,所有繁琐的工作就会自动完成: Maven最大的消除了构建的重复,抽 ...

  10. rem.js的用法及在浏览器端的适配

    首先介绍下自己,我是从后端转前端,对于前端的见识还不深望各位全当一个新手自述....... 随着移动设配的更新换代,市场上涌现了大量的非主流设备分辨率,比如华为手机...... 更新换代快的大前提下自 ...