Can you copy an Azure VM from one account to another account? - azure

We created a VM for a client and set it all up on our account. A bunch of work. Now I'd like to put a copy of it on his Azure account (which he does not have yet) and keep my copy for troubleshooting. Is there a method I can use to backup the VM and restore it to his Azure account? Or any other suggested way to copy it to another account's VM?

Sure you can. Since VHD for your Virtual Machine is stored as Page Blob in Azure Storage, you can simply copy the blob from one storage account to another. You can use AzCopy tool to do that. There's no need for you to download the blob from main storage account and reupload it in backup storage account.
When you need to create a VM again, simply create an image using that blob and then create a VM from that image.

You can create Image and upload to the new account, You can check link for more information Create and upload a Windows Server VHD to Azure

Related

Upload Azure VM snapshot to Azure Blob Storage directly without saving VHD to local computer

We are taking over a VM image from another subscription, which we cannot access via the portal, so the snapshot download link is all we have.
I don't have enough disk storage on my computer to download the VHD from the download link provided by Azure so I'm wondering if there is a way to upload a file from URL directly to an Azure container? The image is roughly 120 gb.
The SAS url looks something like this:
https://{something}.blob.storage.azure.net/{something}/{something}
Thanks in advance!
If you have a SAS URI for your VM's Snapshot, you can use Copy Blobs functionality to perform server-side copy operation which will copy blob from one storage account to another without the need to download it locally.
You can use azcopy tool to perform this operation.

Download Azure managed disk to local via powershell

With the ability now to export a managed disk and download it locally via the portal, is there a way to do this via powershell?
Or do you still need to first copy it to a storage account and then pull it down?
As per this post:
Download Azure VHD to local use powershell
The short answer is yes, the managed disk would not show the URL that you need to download from Azure through PowerShell, even if it is also just a VHD file. So you should first get the VHD file URL through copying it to a storage account blob. Then you can download it with the ways you want. I suggest the AzCopy that provide in your link.
Or you can just generate URL and then download it in the Azure Portal without copy it to a storage account first. Hope this will help.

Logic app file created

I am assigned to create an on-premise data gateway on a virtual machine in Azure. This way, I am able to watch new files created in a specific folder and trigger a logic app flow for every newly created file.
As the name says 'on-premise' I feel like there must be a better option.
Is there any trigger that is able to watch a certain folder on a VHD disk in a storage account?
Is there any trigger that is able to watch a certain folder on a VHD
disk in a storage account?
If my understanding is right, you want to watch files on a Azure storage account VHD. Currently, it is not possible. You need use the VHD to create a new VM or mount the VHD on a VM, then you could see the file in VHD.

How can I delete a leased blob in Microsoft Azure storage

I created a virtual machine in Azure and then deleted it.
However, the associated storage account still exists.
I can't delete the storage account because it contains a container with a blob in it that has an indefinite lease.
Nothing else is using this storage account.
How can I delete this blob?
You need to delete the disk objects that are associated with the abandoned vhd's. You can do this easily in either the classic or new portal. Once you dispose of these (along with associated leases), you should be able to get rid of your storage account
In the Classic portal (manage.windowsazure.com), you just visit Virtual Machines, then Disks. Select a disk to delete, and click the trash can at the bottom of the screen.
In the new portal (portal.azure.com) you'll find the disks under OS Disks (classic) :
From there, you can select and delete the disks from the VM's you deleted.
You can Use Azure Cloud Explorer tool on Codeplex Open the Storage Account Delete all files inside that container,
Then you Can Delete the Container and the Storage Account Easily
One solution is to delete the container, whether through a GUI like a cloud explorer, tooling like Azure Storage Powershell, or using the rest API with an Azure Storage Client Library.
You don't need the blob lease to delete the container, which would also delete any blobs present in the container.

How to move an Azure Virtual Machine to another storage account?

In Windows Azure, I have created a number of virtual machines over the same storage account. I want to move some of those virtual machines to a different storage account so that I can have Geo-Replication for only some of them instead of all.
Is there any way to change the storage account of a VM?
There is no such feature provided out of the box. What you can do is following:
Shut down the VM
Copy the system disk's VHD to the new storage account (use Copy Blob feature!)
Create a new VM based on the copied VHD
(Pray that the new VM will boot up successfully :) )
Most of the times this scenario is valid and works.
Yes you can. Please find the refrences below-
http://azure.microsoft.com/blog/2014/10/22/migrate-azure-virtual-machines-between-storage-accounts/
http://michaelwasham.com/windows-azure-powershell-reference-guide/copying-vhds-blobs-between-storage-accounts/

Resources