Solved

Recreate virtual machine from vhd in Azure

Posted on 2016-09-03
4
48 Views
Last Modified: 2016-09-04
I accidentally deleted a VM in https://portal.azure.com but still have the VHD. How do I recreate the VM using that VHD disk? I see guides out there telling I should create from gallery, but I see no option to select from gallery when I choose to create a new VM.
0
Comment
Question by:itnifl
  • 2
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
Zachariah Browning earned 500 total points
ID: 41783393
If you go to the manage.windowsazure.com and go to create a new VM, from gallery  there is a section 'My Disks' you should see your VHD under that section to create a new VM with.  If you want to create the VM in a region other than where the VHD is in azure then you can use a tool like AZCopy to move your vhd to a new region for the creation of your new VM.  If you have trouble with that method, then you can make an image out of that disk and create a VM from that image.

if you need to create an image from that Disk, then you can use Powershell.
    Add-AzureVMImage -ImageName <ImageName> -MediaLocation "https://<StorageAccountName>.blob.core.windows.net/<ContainerName>/<vhdName>.vhd" -OS "Windows"

let me know if you have any further trouble with this.
0
 
LVL 2

Author Comment

by:itnifl
ID: 41783400
Thanks for that. It seems that my account has no administrative privileges. I get this when I enter manage.windowsazure.com:

Before you can start using Microsoft Azure, you need to get a subscription.
We were unable to find any Azure subscriptions where you are a service administrator or co-administrator.
You are signed as xxx@xxx.com in the directory xx.onmicrosoft.com ('xx xx'). If this was not the account you intended to use, please sign out and sign in again using the intended account.
Have DreamSpark or CSP? Visit portal.azure.com

Is there a way to get the privileges I need?
0
 
LVL 5

Expert Comment

by:Zachariah Browning
ID: 41783416
I'm sorry , the only way you can get administrative privileges is if they are granted to you by a global admin or subscription owner.  - if you had this server in your own subscription then you may want to make sure that you are logged into the correct directory, or correct account as it states in the message. you can check this in the top right drop down  "Default Directory" is (usually) the directory of choice.
0
 
LVL 2

Author Comment

by:itnifl
ID: 41783417
I see. It turns out that I have some trouble with my MSDN subscription. It was linked to the wrong account. I have tried to de-attach it from the wrong account and attach it to the right one, but seems like it made the mess worse. I have contacted Microsoft support for that, but at least I am on the right track now. Thanks !
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Synchronize a new Active Directory domain with an existing Office 365 tenant
David Varnum recently wrote up his impressions of PRTG, based on a presentation by my colleague Christian at Tech Field Day at VMworld in Barcelona. Thanks David, for your detailed and honest evaluation!
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
In this video tutorial I show you the main steps to install and configure  a VMware ESXi6.0 server. The video has my comments as text on the screen and you can pause anytime when needed. Hope this will be helpful. Verify that your hardware and BIO…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now