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
Copy file name to clipboardExpand all lines: articles/virtual-machines/windows/download-vhd.md
+22-20Lines changed: 22 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,36 +22,38 @@ ms.author: cynthn
22
22
23
23
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
26
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.
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.
28
28
29
29
To use the VHD as an image to create other VMs, generalize the VM.
30
30
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**.
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
+
39
+
## Stop the VM
37
40
38
-
Stop the VM.
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.
39
42
40
-
1.On the Hub menu in the Azure portal, click **Virtual Machines**.
41
-
1.Select the VM from the list.
42
-
1.On the blade for the VM, click **Stop**.
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**.
43
46
44
-

45
47
46
48
## Generate download URL
47
49
48
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.
49
51
50
-
1.On the page for the VM, click **Disks** in the left menu.
51
-
1.Select the operating system disk for the VM.
52
-
1.On the page for the disk, select **Disk Export** from the left menu.
53
-
1.The default expiration time of the URL is *3600* seconds. Increase this to **36000** for Windows OS disks.
54
-
1.Click **Generate URL**.
52
+
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**.
55
57
56
58
> [!NOTE]
57
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.
@@ -60,8 +62,8 @@ To download the VHD file, you need to generate a [shared access signature (SAS)]
60
62
61
63
## Download VHD
62
64
63
-
1.Under the URL that was generated, click Download the VHD file.
64
-
1.You may need to click **Save** in your browser to start the download. The default name for the VHD file is *abcd*.
65
+
1.Under the URL that was generated, click Download the VHD file.
66
+
1.You may need to click **Save** in your browser to start the download. The default name for the VHD file is *abcd*.
0 commit comments