I have created a VM (Standard DS11 v2) on Azure about 2 - 3 weeks ago. It attached a premium disk which has extra price. (I did not know that when I created the VM.)
Now I want to change this disk to a standard disk. As I see, it is not possible to downgrade a premium disk to standard.
What I am trying to do is:
Attach a standard disk to my VM.
Copy premium disk to standard disk.
Make standard disk OS disk.
Detach premium disk.
Delete premium disk.,
How can I do that?
Also I am open to different solutions to my problem.
My OS is Centos 7.2.
You could not resize Ds series VM to D series VM.
Based on my knowledge, you could recreate your VM by using your VHD.
Please refer the following steps.
Stop and delete your VM but don't delete the VM's VHD.
Create a new standard storage account and blob container in the same resource group.
Copy VHD to the new storage account, you could use Azcopy.
AzCopy /Source:https://shuidisks446.blob.core.windows.net/vhds /Dest:https://shuidiag102.blob.core.windows.net/vhds /SourceKey:sGqtdFHQWQWYyf2tRWGF5jkeAEubTp13AVaeTM25QogxXE+K0Ezq1ulcs18qGVPhCEp6ULdLLbKVa7fMbUvYZg== /DestKey:iCjeS+eegjkSJXHjH2UqCkqXnUPiCGvxaOG0Ad2LoPgUnvBoWl9wQJtC1jc//lOj4CF7khpLQe791P4QeyTY6Q== /Pattern:shui20161222141315.vhd
More information about Azcopy please refer to this article.
Use the VHD to create a D series VM. It is easy for you to recreate with existing VHD by using this template
Delete your Premium Storage Account.
Related
I have deployed a Data Science Virtual Machine on Azure on an N-series instance, which comes with a Standard HDD as the Storage Account Type.
However I would like to include an SSD, but I have not been able to do so.
What I have tried: In the Virtual Machine menu, on Disks, I can attach an extra disk, and create a new one, but it only allows for standard storage disk (HDD) and the option for a premium (SSD) is blocked.
Creating a new storage account I can select a premium storage (SSD), however I cannot link this to my existing VM. This new storage account does not appear between the options when choosing to attach a new disk.
Any help?
Unfortunately the solution is that you may have to use NCv2 or NCv3 which supports premium storage (SSD) and more faster GPU processors (Nvidia P100, V100). Another alternative is to create a separate blob on premium storage and mount that on a Ubuntu DSVM using blobfuse that comes prebuilt into the Ubuntu DSVM. BTW - The NC6 also comes with locally attached temporary storage on SSD (340GB) so you can use it for staging. The data will not presist across reboots. So it is only suitable for work files and will need to be explictly copied to persistent storage. Hope one of these options work for your scenario.
I have an Azure VM with un-managed disk. I want to move it to another region.
Is there any other way than generalizing my current VM?
Is there any other way than generalizing my current VM?
Azure does not support changing a VM's location. You need copy the VM's VHD to another location and use that VHD to create a new VM.
If you don't use current VM's VHD to create multiple VMs in other location, you don't need generalize your VM. Please refer to following steps.
Stop your VM.
Create a new storage account and blob container in another location.
Copy VHD to the new storage account, you could use Azcopy. For more information about Azcopy please refer to this article.
AzCopy /Source:https://shuidisks446.blob.core.windows.net/vhds /Dest:https://shuidiag102.blob.core.windows.net/vhds /SourceKey:sGqtdFHQWQWYyf2tRWGF5jkeAEubTp13AVaeTM25QogxXE+K0Ezq1ulcs18qGVPhCEp6ULdLLbKVa7fMbUvYZg== /DestKey:iCjeS+eegjkSJXHjH2UqCkqXnUPiCGvxaOG0Ad2LoPgUnvBoWl9wQJtC1jc//lOj4CF7khpLQe791P4QeyTY6Q== /Pattern:shui20161222141315.vhd
Use the VHD to create a new VM. It is easy for you to recreate with existing VHD by using this template.
Important: Because you don't generalize your currently VM, please don't start two VM at the same time. The second would have the same network issue.
Yes, even though the VM is generalized if you restore from backup the working state will get restored
Plan your VM backup infrastructure in Azure
https://learn.microsoft.com/en-us/azure/backup/backup-azure-vms-introduction
Back up Azure virtual machines to a Recovery Services vault
https://learn.microsoft.com/en-us/azure/backup/backup-azure-arm-vms
Use Azure portal to restore virtual machines
https://learn.microsoft.com/en-us/azure/backup/backup-azure-arm-restore-vms
Azure Site Recovery now offers migration capability between some regions. See this link for details.
https://learn.microsoft.com/en-us/azure/site-recovery/azure-to-azure-tutorial-migrate
Notably, you can only move between supported regions as shown here - basically the same continent.
https://learn.microsoft.com/en-us/azure/site-recovery/azure-to-azure-support-matrix#region-support
I am tying to create a page blob using the storage API and add it as a disk to the Virtual Machine. Is there a way this can be done ?
Currently when I create a blob and add it as the disk , the VM fails with provisioning state failed.
It sounds like you want to create a data disk using Azure Storage SDK for Java to attach page blob as data disk for Linux VM. However, some concepts you understanded are note accurate.
Firstly, you need to create a VHD file on local environment. As references, you can try to follow the below documents to do it.
On Windows, please refer to the document Create and Use a Virtual Hard Disk on Windows 7 to create a VHD file.
On Linux or MacOS, you can install & configure QEMU/VirtualBox/KVM to create a disk image and convert it. For example, to convert a qemu image via command qemu-image convert.
For more information, please see About disks and VHDs for Azure virtual machines
Secondly, you upload the VHD file created to Azure Blob Storage as a page blob via AzCopy or follow the related section of the tutorial Creating and Uploading a Virtual Hard Disk that Contains the Linux Operating System.
Then, you can refer to the document Add a disk to a Linux VM to attach the data disk on Azure Storage.
Meanwhile, based on my understanding, I think you just want to extend the filesystem of your Linux VM. So the other solution may be suitable for your needs, which mount Azure File Storage on Linux VMs using SMB protocol. More details, please refer to How to use Azure File Storage with Linux.
Hope it helps. Any concern, please feel free to let me know.
I attached a new vhd file to my virtual machine but I could not find a way to boot that machine with this disk. How can I boot my virtual machine with newly attached data disk?
Edit: I found the way of creating of vm from captured vm image. It is preformed on VM Images section. Now my problem is that when I transfer the captured page blobs from one azure account to another account they appear on storage account section but not on VM Images section. Hence I am not able to create VM from transferred images. How can I make this blobs appear on VM Image or is there a way to transfer VM Image disk directly to the section of VM Images of another azure account by using azure-cli?
I would like to create OS Disk from a vhd file. In microsoft documents here as it mentioned there is a command azure vm image create in my azure-cli there is no such command. I could not find a way to make an OS Disk from my stored vhd files.
Solved: Using classic portal of Azure it is easy to create vm images or os disks and creating vms from these images.
Here is a link to get disk up and running, check the section 'Initialize the disk'.
Source : https://azure.microsoft.com/en-gb/documentation/articles/virtual-machines-windows-classic-attach-disk/
I have created a VM in hyperv using dynamically expanding VHD option.Now I have exported that VHD to azure cloud and created a VM in azure.My VM is not booting properly. Is it recommended to use dynamically expanding VHD to create VM in azure?
OS and Data disks (ephemeral storage is local to the hardware) are thin provisioned in Azure. That is they are dynamically expanding. This is a decision made by Azure (so they don't have to store hundreds of thousands of mostly empty 120gb C: drives, which also makes it cheaper for you. ) and there is no option to change that.
Disks that you upload need to be a fixed size. (so you will pay for the full size)
According to Azure Documentation - Upload a Windows VM image to Microsoft Azure for Resource Manager deployments
Microsoft Azure can only accept images for Generation 1 virtual machines saved in the VHD file format. The VHD size must be fixed and a whole number of MB. The maximum size allowed for the VHD is 1023GB.
If you are having problems with an uploaded disk, it is likely that the problem is that you have created a dynamically expanding one and it simply isn't booting.
Usually, you want to create the VM with a fixed size disk as the dynamically expanding disks have a performance cost.
More information here:
https://technet.microsoft.com/en-us/magazine/ff458359.aspx