Skip to content

Commit 60329d6

Browse files
authored
Update hibernate-resume-windows.md
1 parent 0d8de8f commit 60329d6

File tree

1 file changed

+0
-110
lines changed

1 file changed

+0
-110
lines changed

articles/virtual-machines/windows/hibernate-resume-windows.md

Lines changed: 0 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -154,116 +154,6 @@ To learn more about REST, check out an [API example](/rest/api/compute/virtual-m
154154
Once you've created a VM with hibernation enabled, you need to configure the guest OS to successfully hibernate your VM.
155155

156156
## 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-
![Screenshot of the checkbox in the Azure portal to enable hibernation when creating a new Windows VM.](../media/hibernate-resume/hibernate-enable-during-vm-creation.png)
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
207-
```
208-
Your output should look something like this:
209-
210-
```
211-
{
212-
"location": "eastus",
213-
"properties": {
214-
"hardwareProfile": {
215-
"vmSize": "Standard_D2s_v5"
216-
},
217-
"additionalCapabilities": {
218-
"hibernationEnabled": true
219-
},
220-
"storageProfile": {
221-
"imageReference": {
222-
"publisher": "MicrosoftWindowsServer",
223-
"offer": "WindowsServer",
224-
"sku": "2019-Datacenter",
225-
"version": "latest"
226-
},
227-
"osDisk": {
228-
"caching": "ReadWrite",
229-
"managedDisk": {
230-
"storageAccountType": "Standard_LRS"
231-
},
232-
"name": "vmOSdisk",
233-
"createOption": "FromImage"
234-
}
235-
},
236-
"networkProfile": {
237-
"networkInterfaces": [
238-
{
239-
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
240-
"properties": {
241-
"primary": true
242-
}
243-
}
244-
]
245-
},
246-
"osProfile": {
247-
"adminUsername": "{your-username}",
248-
"computerName": "{vm-name}",
249-
"adminPassword": "{your-password}"
250-
},
251-
"diagnosticsProfile": {
252-
"bootDiagnostics": {
253-
"storageUri": "http://{existing-storage-account-name}.blob.core.windows.net",
254-
"enabled": true
255-
}
256-
}
257-
}
258-
}
259-
260-
```
261-
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-
267157
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.
268158

269159
>[!NOTE]

0 commit comments

Comments
 (0)