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/hibernate-resume-windows.md
-110Lines changed: 0 additions & 110 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -154,116 +154,6 @@ To learn more about REST, check out an [API example](/rest/api/compute/virtual-m
154
154
Once you've created a VM with hibernation enabled, you need to configure the guest OS to successfully hibernate your VM.
155
155
156
156
## Configuring hibernation in the guest OS
157
-
158
-
To hibernate a VM, you must first enable the feature while creating the VM. You can only enable hibernation for a VM on initial creation. You can't enable this feature after the VM is created.
159
-
160
-
After ensuring that your VM configuration is supported, you can use the Azure portal, CLI, PowerShell, ARM templates and API to enable hibernation during VM creation.
161
-
162
-
### [Portal](#tab/enableWithPortal)
163
-
164
-
To enable hibernation in the Azure portal, check the 'Enable hibernation' box during VM creation.
165
-
166
-

167
-
168
-
169
-
### [CLI](#tab/enableWithCLI)
170
-
171
-
To enable hibernation in the Azure CLI, create a VM by running the following [az vm create]() command with ` --enable-hibernation` set to `true`.
172
-
173
-
```azurecli
174
-
az vm create --resource-group myRG \
175
-
--name myVM \
176
-
--image Win2019Datacenter \
177
-
--public-ip-sku Standard \
178
-
--size Standard_D2s_v5 \
179
-
--enable-hibernation true
180
-
```
181
-
182
-
### [PowerShell](#tab/enableWithPS)
183
-
184
-
To enable hibernation when creating a VM with PowerShell, run the following command:
185
-
186
-
```powershell
187
-
New-AzVm `
188
-
-ResourceGroupName 'myRG' `
189
-
-Name 'myVM' `
190
-
-Location 'East US' `
191
-
-VirtualNetworkName 'myVnet' `
192
-
-SubnetName 'mySubnet' `
193
-
-SecurityGroupName 'myNetworkSecurityGroup' `
194
-
-PublicIpAddressName 'myPublicIpAddress' `
195
-
-Size Standard_D2s_v5 `
196
-
-Image Win2019Datacenter `
197
-
-HibernationEnabled `
198
-
-OpenPorts 80,3389
199
-
```
200
-
201
-
### [REST](#tab/enableWithREST)
202
-
203
-
First, [create a VM with hibernation enabled](/rest/api/compute/virtual-machines/create-or-update#create-a-vm-with-hibernationenabled).
204
-
205
-
```json
206
-
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/{vm-name}?api-version=2021-11-01
To learn more about REST, check out an [API example](/rest/api/compute/virtual-machines/create-or-update#create-a-vm-with-hibernationenabled).
262
-
263
-
---
264
-
265
-
Once you've created a VM with hibernation enabled, you need to configure the guest OS to successfully hibernate your VM.
266
-
267
157
Enabling hibernation while creating a Windows VM automatically installs the 'Microsoft.CPlat.Core.WindowsHibernateExtension' VM extension. This extension configures the guest OS for hibernation. This extension doesn't need to be manually installed or updated, as this extension is managed by the Azure platform.
0 commit comments