0

I have a classic D-series VM on azure whose load on the disks increased to the point where it needs more IOPS than supported by the regular disk blobs.

I tried resizing it to DS-series, but I can't, since the resize is not supported:

enter image description here

Ok, then I tried deleting the machine and re-crating it with the same VHD but a new scale. Unfortunately, new portal doesn't support creating a VM from an existing disk (or at least I couldn't figure out how to do it). Ok, then I figured I'll just do it with the old portal, except the old portal doesn't support creating v DS machine:

enter image description here

can anyone suggest a way to resize my machine?

2

Basically:

  • Create a Premium Storage
  • Use Azcopy or Storage Explorer to copy your VHD to the new premium storage
  • Use template deployment to bring your VM back to life

There's no GUI feature to help you on this job. Either use Template Deployment or Powershell/Cli to recreate the VM. I'm assuming you sysprep (Windows) or deprovision the agent (Linux) from your OS before deleting it.

Here's an easy to use json script to deploy from user image:

{
  "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/VM_IP.json",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "vmName": {
      "type": "string"
    },
    "vmSize": {
      "type": "string",
      "defaultValue": "<$size_of_vm>"
    },
    "adminUserName": {
      "type": "string"
    },
    "adminPassword": {
      "type": "securestring"
    },
    "networkInterfaceId": {
      "type": "string"
    }
  },
  "resources": [
    {
      "apiVersion": "2016-03-30",
      "properties": {
        "hardwareProfile": {
          "vmSize": "[parameters('vmSize')]"
        },
        "storageProfile": {
          "osDisk": {
            "osType": "<$Windows/Linux>",
            "name": "<$name_of_your_os_disk>",
            "createOption": "FromImage",
            "image": {
              "uri": "<$path_to_vhd_image>"
            },
            "vhd": {
              "uri": "<$path_to_storage_new_disk>"
            },
            "caching": "ReadWrite"
          },
          "dataDisks": [
            {
              "lun": 0,
              "name": "<$name_of_your_data_disk>",
              "createOption": "FromImage",
              "image": {
                "uri": "<$path_to_vhd_image>"
              },
              "vhd": {
                "uri": "<$path_to_storage_new_disk>"
              },
              "caching": "ReadOnly"
            }
          ]
        },
        "osProfile": {
          "computerName": "[parameters('vmName')]",
          "adminUsername": "[parameters('adminUsername')]",
          "adminPassword": "[parameters('adminPassword')]"
        },
        "networkProfile": {"networkInterfaces":[{"id":"[parameters('networkInterfaceId')]"}]},
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "enabled": true,
            "storageUri": "<$path_to_diag_storage>"
          }
        },
        "provisioningState": 0
      },
      "name": "[parameters('vmName')]",
      "type": "Microsoft.Compute/virtualMachines",
      "location": "<$datacenter_region>"
    }
  ]
}

Make sure to change variables "<$...>" accordingly. Also, make sure to create a network interface before using this particular template for deployment. If you don't have a datadisk attached, remove entire "dataDisks" section.

1

I haven't tried Bruno Fria's answer, so I can't tell whether it'll work. I did however manage to find a fairly simple solution myself by using only the portal.

I've simply created an image of the VM using Azure's capture feature, which is accessible from the portal. Then I created a new DS-series VM based on this image. Once the machine was created, I've deleted the image and its associated vhds.

  • glad to hear. I don't work with classic resources anymore, but the capture/recreate from image was really handy. :) – Bruno Faria Jul 19 '16 at 11:30
1

Update for latest Azure changes:

Now you can resize your VM to "s" sizes for theoretical premium storage support (storage has to be upgraded separately) but there is one caveat: the VM has to be fully stopped for "s" sizes to appear in the portal "Size" page for the VM. If machine is not stopped, the list is empty if you select SSD storage in the size filters.

  • this is the simplest answer to proceed, thanks! – Andrzej Martyna Oct 10 '18 at 10:29

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.