Solved

Recreate virtual machine from vhd in Azure

Posted on 2016-09-03
4
125 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Optimized for private cloud infrastructures and datacenters, Nano Server is minimalistic, yet super-efficient, OS for services such as Hyper-V and Hyper-V cluster. Learn how you can easily deploy Nano Server and unlock its power!
Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
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…

696 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