You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this article, you learn how to download a Windows virtual hard disk (VHD) file from Azure using the Azure portal.
24
24
25
-
## Stop the VM
25
+
## Optional: Generalize the VM
26
+
27
+
If you want to use the VHD as an [image](tutorial-custom-images.md) to create other VMs, you should use [Sysprep](https://docs.microsoft.com/windows-hardware/manufacture/desktop/sysprep--generalize--a-windows-installation) to generalize the operating system.
26
28
27
-
A VHD can’t be downloaded from Azure if it's attached to a running VM. You need to stop the VM to download a VHD. If you want to use a VHD as an [image](tutorial-custom-images.md) to create other VMs with new disks, you use [Sysprep](https://docs.microsoft.com/windows-hardware/manufacture/desktop/sysprep--generalize--a-windows-installation) to generalize the operating system contained in the file and then stop the VM. To use the VHD as a disk for a new instance of an existing VM or data disk, you only need to stop and deallocate the VM.
29
+
To use the VHDas an image to create other VMs, generalize the VM.
28
30
29
-
To use the VHD as an image to create other VMs, complete these steps:
31
+
1. If you haven't already done so, sign in to the [Azure portal](https://portal.azure.com/).
32
+
2.[Connect to the VM](connect-logon.md?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
33
+
3. On the VM, open the Command Prompt window as an administrator.
34
+
4. Change the directory to *%windir%\system32\sysprep* and run sysprep.exe.
35
+
5. In the System Preparation Tool dialog box, select **Enter System Out-of-Box Experience (OOBE)**, and make sure that **Generalize** is selected.
36
+
6. In Shutdown Options, select **Shutdown**, and then click **OK**.
30
37
31
-
1. If you haven't already done so, sign in to the [Azure portal](https://portal.azure.com/).
32
-
2. [Connect to the VM](connect-logon.md?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
33
-
3. On the VM, open the Command Prompt window as an administrator.
34
-
4. Change the directory to *%windir%\system32\sysprep* and run sysprep.exe.
35
-
5. In the System Preparation Tool dialog box, select **Enter System Out-of-Box Experience (OOBE)**, and make sure that **Generalize** is selected.
36
-
6. In Shutdown Options, select **Shutdown**, and then click **OK**.
37
38
38
-
To use the VHD as a disk for a new instance of an existing VM or data disk, complete these steps:
39
+
## Stop the VM
39
40
40
-
1. On the Hub menu in the Azure portal, click **Virtual Machines**.
41
-
2. Select the VM from the list.
42
-
3. On the blade for the VM, click **Stop**.
41
+
A VHD can’t be downloaded from Azure if it's attached to a running VM. You need to stop the VM to download a VHD.
43
42
44
-

43
+
1. On the Hub menu in the Azure portal, click **Virtual Machines**.
44
+
1. Select the VM from the list.
45
+
1. On the blade for the VM, click **Stop**.
45
46
46
-
## Generate SAS URL
47
47
48
-
To download the VHD file, you need to generate a [shared access signature (SAS)](../../storage/common/storage-dotnet-shared-access-signature-part-1.md?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)URL. When the URL is generated, an expiration time is assigned to the URL.
48
+
## Generate download URL
49
49
50
-
1. On the menu of the blade for the VM, click **Disks**.
51
-
2. Select the operating system disk for the VM, and then click **Disk Export**.
52
-
3. Set the expiration time of the URL to *36000*.
53
-
4. Click **Generate URL**.
50
+
To download the VHD file, you need to generate a [shared access signature (SAS)](../../storage/common/storage-dotnet-shared-access-signature-part-1.md?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) URL. When the URL is generated, an expiration time is assigned to the URL.
1. On the page for the VM, click **Disks** in the left menu.
53
+
1. Select the operating system disk for the VM.
54
+
1. On the page for the disk, select **Disk Export** from the left menu.
55
+
1. The default expiration time of the URL is *3600* seconds. Increase this to **36000** for Windows OS disks.
56
+
1. Click **Generate URL**.
56
57
57
58
> [!NOTE]
58
59
> The expiration time is increased from the default to provide enough time to download the large VHD file for a Windows Server operating system. You can expect a VHD file that contains the Windows Server operating system to take several hours to download depending on your connection. If you are downloading a VHD for a data disk, the default time is sufficient.
@@ -61,13 +62,8 @@ To download the VHD file, you need to generate a [shared access signature (SAS)]
61
62
62
63
## Download VHD
63
64
64
-
1. Under the URL that was generated, click Download the VHD file.
0 commit comments