I've been trying to get Premium managed disks (SSD) enabled for Azure Virtual Machine Scale Sets, but I don't seem to get it setup.
Standard (HHD) seems to work for managed disks.
Anybody got this working?
Just pick SSD capable VM's when creating the VMSS.
The VMSS portal page would say that its still using HDD, but if you check the actual resource properties it would say:
"storageProfile": {
"osDisk": {
"createOption": "FromImage",
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "Premium_LRS"
}
},
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2016-Datacenter",
"version": "latest"
}
},
Related
I am currently deploying some new azure VMs using a template. This template contains a link to a VHD image and uses availability sets.
After having a look at the azure docs, I cannot seem to tell or find out if it's possible to use my current procedure to deploy the VM in a specific zone.
I changed my template to use zones rather than sets but when I use it in Azure CLI I have this error message returned:
"Virtual Machines deployed to an Availability Zone must use managed disks."
I then tried to add the managed disk section to the template without success.
Below there is the pseudocode of the template related to the storage of the VM:
"storageProfile": {
"osDisk": {
"managedDisk": {
"storageAccountType": "StandardSSD_LRS"
},
"osType": "Linux",
"name": "myName.vhd",
"createOption": "FromImage",
"image": {
"uri": "myUri.vhd"
},
"vhd": {
"uri": "myVhdImageUri.vhd"
},
"caching": "ReadWrite"
}
}
You have to convert disk to managed disk first. Then you will be able to use it in your template.
We are using Azure SQL template to deploy VMs with managed disks instead of storage blobs. Unfortunately, the auto generated managed disk names are not desired and we cannot find a way to change them in the deployment template.
Is there a way to rename a managed disk post deployment? (or during)
Well, it is super easy to give them names. there's a name property for that...
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2016-Datacenter",
"version": "latest"
},
"osDisk": {
"createOption": "FromImage",
"name": "somename" <<< THIS IS IT
}
},
I'm not sure that its possible to rename after you've created the disk. might be possible if you create a managed disk out of managed disk and you would be able to supply the name for the new one.
Does anybody know how to set up Service Fabric cluster with VMs on managed disks(both OS and Data)? I would be very interested to know how to do this using template config.
You need to change VMSS api version to 2016-04-30-preview and storageProfile to this:
"storageProfile": {
"imageReference": {
"publisher": "[parameters('vmImagePublisher')]",
"offer": "[parameters('vmImageOffer')]",
"sku": "[parameters('vmImageSku')]",
"version": "[parameters('vmImageVersion')]"
},
"osDisk": {
"createOption": "FromImage"
"managedDisk": {
"storageAccountType": "Standard_LRS"
# defauls to Standard_LRS,
# you can choose to pick Premium_LRS if your VM size supports premium storage
# or you can omit this node completely if you need standard storage
}
}
}
Storage Accounts are redundant when using managed disks (you don't need them, Azure handles that for you).
I am trying to spinup Azure VM with no publick DNS using ARM template simple Linux VM
But I want dont want Publick DNS on this VM just private IP. I tried to remove following part related to public IP
"publicIPAddressName": "myPublicIP",
"publicIPAddressType": "Dynamic",
and
{
"apiVersion": "[variables('apiVersion')]",
"type": "Microsoft.Network/publicIPAddresses",
"name": "[variables('publicIPAddressName')]",
"location": "[resourceGroup().location]",
"properties": {
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
"dnsSettings": {
"domainNameLabel": "[parameters('dnsLabelPrefix')]"
}
}
},
but i ran into trouble when running the template.
So would appreciate if anyone know how to do this ?
Thanks
The networkInterface (NIC) resource depends on the publicIPAdress resource you deleted. So, when you deleted the publicIPAddress resource that broke the dependency chain.
To fix this, you need to remove the references to it in the networkInterface resource as highlighted in red here.
I've created an template-based deployment that over-provisions a number of Linux VMs. I'd like to autoscale them as per classic instances, where Azure will turn on/turn off instances according to CPU load.
Is this possible with ARM mode? And if not, is there a suggested alternative method? The only examples I can find are around using Application Insights and PaaS functionality. I've got a Python app running in Docker on Ubuntu hosts.
For IaaS, you must use virtual machine scale sets to use autoscale, else you need to stick with PaaS (web apps).
For this you would first need to create an availability group for the VMs. The resource decleration in the ARM template looks something like this:
{
"type": "Microsoft.Compute/availabilitySets",
"name": "[variables('availabilitySetName')]",
"apiVersion": "2015-05-01-preview",
"location": "[parameters('location')]",
"properties": {
"platformFaultDomainCount": "2"
}
}
Then for the virtual machine resource the decliration in the ARM Template would look something like this:
{
"apiVersion": "2015-05-01-preview",
"type": "Microsoft.Compute/virtualMachines",
"name": "[concat(variables('vmName'), '0')]",
"location": "[parameters('location')]",
"dependsOn": [
"[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]",
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), '0')]",
"[concat('Microsoft.Compute/availabilitySets/', variables('availabilitySetName'))]"
],
"properties": {
"availabilitySet": {
"id": "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]"
},
...},
The quckstart templates are a good ref: https://raw.githubusercontent.com/azure/azure-quickstart-templates/master/201-2-vms-2-FDs-no-resource-loops/azuredeploy.json
Once you have two or more VMs of the same size in an availability set, you would configure autoscale using microsoft.insights/autoscalesettings, which I beleive you referenced in the question. This is done at the cloud service so it will work similar to PaaS... like so:
{
"apiVersion": "2014-04-01",
"name": "[concat(variables('vmName'), '-', resourceGroup().name)]",
"type": "microsoft.insights/autoscalesettings",
"location": "East US",
...},
A pretty good example is here: https://raw.githubusercontent.com/Azure/azure-quickstart-templates/6abc9f320e39d9d75dffb60846e88ab80d3ff33a/201-web-app-sql-database/azuredeploy.json
I also setup autoscale using the portal first and reviewed ARMExplorer to get a better idea of how things should look in my code. ARMExplorer is here: Azure Resource Explorer