Forum Discussion
How to locate storage account belongs to azure VM disk
- Oct 15, 2017
Hey Suhag,
What is the purpose to 'see' that vhd's? To list vhd's attached to VM you can simply use PS commands http://pipe2text.com/?page_id=2596. If you need to see the disks for backup, you can perform a backup in many ways:
- Create a snapshot (more about it https://docs.microsoft.com/en-us/azure/virtual-machines/windows/snapshot-copy-managed-disk)
- Use Azure Backup service
- Copy vhd to a local disk or another storage account (VM should be shut down and the target disk detached). Attaching disk back to VM is well described https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps.
You are right, it was managed disk. Thanks,
So there is no way we can see the managed VHD. the only way we can export is through restore...right?
Hey Suhag,
What is the purpose to 'see' that vhd's? To list vhd's attached to VM you can simply use PS commands http://pipe2text.com/?page_id=2596. If you need to see the disks for backup, you can perform a backup in many ways:
- Create a snapshot (more about it https://docs.microsoft.com/en-us/azure/virtual-machines/windows/snapshot-copy-managed-disk)
- Use Azure Backup service
- Copy vhd to a local disk or another storage account (VM should be shut down and the target disk detached). Attaching disk back to VM is well described https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps.
- Gary PaulishOct 15, 2017Copper Contributor
Alex, thanks for chiming in. I guess I had the same reaction, and to emphasize your point, it would be incredibly helpful if you could explain your underlying goal Suhag.
- LoudCloudDragonNov 28, 2020Copper Contributor
Gary Paulish My goal here is simple. I have VM's running and I can't track down what storage account they are in so I am like "how is this possible"?
I deleted some "stuff" and I guess I am just trying to confirm I did not screw up. My VM's don't have Data disk and I think that is a big reason why they don't need a storage account. But I am still a little unclear and "seeing is believing".
- Suhag DesaiOct 16, 2017Brass Contributor
Thank you Paulish and Alex,
i was wondering what if someone simply wants to copy the VHDs to make a local copy without backup/export...just like what we do at hypervisor level (Hyper-V and VMware).
- Alex KaziukaOct 16, 2017Brass Contributor
Hi Suhag,
I see no issues with that. You just go to a target VM (the one you want to copy and use locally via Hyper-V). You need to go to 'Disks' blade and select the VMs disk. In the panel you'll see the disk's properties, including an url. Copy that URL and download either via browser or download manager (more reliable). See the image attached for more info:
Do not forget the VM should be shut down when you copy VHD. I assume that downloading of 100-150Gb would take some time. The next step is to use Hyper-V to create a VM locally.
In Hyper-V management tool of choice to create a Generation 1 virtual machine without any virtual hard disks on your Hyper-V host or cluster. Try to match the CPU and memory configuration that the Azure virtual machine used. This process will recreate the metadata of the virtual machine for a Hyper-V host/cluster. Make sure you noted the storage location of the virtual machine. After that you would to specify a hard-drive to use (your downloaded VHD), once its done you have two choices, i.e. keep using standard VHD or attempt to convert it to VHDX (for better performance).
To use this VHD in Azure, you may need to perform a reverse process (i.e. convert VHDX->VHD). Once you're done with all that stuff, edit VM settings in Hyper-V... system disks should be attached/added to IDE controller and data disks (if any) to SCSI controller. That's it.