[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Recreate virtual machine from vhd in Azure

Posted on 2016-09-03
4
Medium Priority
?
225 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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Microsoft Office 365 is a subscriptions based service which includes services like Exchange Online and Skype for business Online. These services integrate with Microsoft's online version of Active Directory called Azure Active Directory.
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Suggested Courses
Course of the Month20 days, 10 hours left to enroll

867 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