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: azure-local/manage/trusted-launch-vm-import-key.md
+21-24Lines changed: 21 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ ms.author: alkohli
6
6
ms.topic: how-to
7
7
ms.service: azure-local
8
8
ms.reviewer: alkohli
9
-
ms.date: 07/14/2025
9
+
ms.date: 07/15/2025
10
10
---
11
11
12
12
# Manual backup and recovery of VM guest state protection key
@@ -21,16 +21,13 @@ You can backup and restore the virtual machine (VM) guest state protection key o
21
21
22
22
## For Azure Local release 2505 and later
23
23
24
-
To backup, this approach copies VM guest state protection keys from the local key vault of your Azure Local instance to a folder that is backed up periodically. The VM guest state protection keys stored inside that folder are in an encrypted form.
24
+
To backup, this approach copies VM guest state protection keys from the local key vault of your Azure Local instance to a folder that is backed up periodically. The VM guest state protection keys stored inside that folder are in an encrypted form.
25
25
26
26
To restore, this approach restores VM guest state protection keys from a folder (containing the backup copy) to the local key vault of an Azure Local instance where the VMs need to be restored.
27
27
28
28
### Backup
29
29
30
-
The steps below involve copying VM guest state protection keys from the local key vault of your Azure Local instance to a folder that is backed up periodically.
31
-
32
-
> [!NOTE]
33
-
> You can only use this method for Azure Local 2505 release and later. If your Azure Local instance uses an earlier Azure Local release, use the other method.
30
+
The steps below involve copying VM guest state protection keys from the local key vault of your Azure Local instance to a folder that is backed up periodically.
34
31
35
32
1. On a secure computer using PowerShell 7, generate a wrapping key of size 2048:
36
33
@@ -50,30 +47,30 @@ The steps below involve copying VM guest state protection keys from the local ke
50
47
51
48
1. Copy VM guest state protection keys from the local key vault of your Azure Local instance to a folder that is backed up periodically:
52
49
53
-
1. Download the `TvmBackupUtils.psm1` script file located on GitHub (link to repo path) to your Azure Local instance.
50
+
1. Download `TvmBackupUtils.psm1` script at <add hyperlink> to your Azure Local instance.
54
51
55
52
1. Run `import-module .\TvmBackupUtils.psm1 -force`.
56
53
57
54
1. Run `Backup-TVMKeys -WrappingKeyPath <path to public.pem> -BackupRootPath <path to backup root folder where the timestamped backup folder is stored>`.
58
55
59
-
1. Make note of the timestamped backup folder created under the backup root folder. You will need this later during recovery. For examople, backup folder named "20250612205355" with the format "yyyyMMddHHmmss".
56
+
1. Make note of the timestamped backup folder created under the backup root folder. You will need this later during recovery. For example, backup folder named "20250612205355" with the format "yyyyMMddHHmmss".
60
57
61
58
1. Periodically backup the backup root folder.
62
59
63
60
### Restore
64
61
65
62
The steps below involve restoring VM guest state protection keys from a folder containing the backup copy to the local key vault of an Azure Local instance where the VMs need to be restored.
66
63
67
-
1. Copy both private and public key files for the wrapping key that you created during step 1 for Backup to the Azure Local instance.
64
+
1. Copy both private and public key files for the wrapping key that you created during step 1 to the Azure Local instance.
68
65
69
66
1. Copy the timestamped backup folder to the Azure Local instance. Pick the folder under the backup root folder with the latest timestamp as that folder will have the most recent copy.
70
67
71
68
> [!NOTE]
72
-
>Don't modify the backup folder.
69
+
>Don't modify the backup folder.
73
70
74
-
1. Import the wrapping key that you created during backup step 1 for Backup to the Azure Local instance:
71
+
1. Import the wrapping key that you created during backup step 1 to the Azure Local instance:
75
72
76
-
1. Download the `TvmBackupUtils.psm1` script file on Github at (link to file on GitHub repo Azure-Samples/AzureLocal: Contains scripts, code samples, for Azure Stack HCI) to your Azure Local instance.
73
+
1. Download `TvmBackupUtils.psm1` script at <add hyperlink> to your Azure Local instance.
77
74
78
75
1. Run `Import-Module .\TvmBackupUtils.psm1 -force`.
79
76
@@ -82,16 +79,16 @@ The steps below involve restoring VM guest state protection keys from a folder c
82
79
83
80
1. Run `Import-TvmWrappingKeyFromPem -KeyName <WrappingKeyName> -PublicKeyPath <path to public.pem> -PrivateKeyPath <path to private.pem> -KeySize 2048`
84
81
85
-
1. Delete `AzureStackTvmAKRootKey`:
82
+
1. Delete `AzureStackTvmAKRootKey` as follows:
86
83
87
84
> [!NOTE]
88
-
> Do this step only if you're restoring the VM to the same Azure Local instance (the Azure Local instance where the VM resided before failure).
85
+
> Do this step only if you're restoring the VM to the same Azure Local instance (the Azure Local instance where the VM resided before failure).
`Import-TVMKeys -WrappingKeyName <WrappingKeyName> -BackupPath <path to timestamped backup folder> `.
91
+
`Import-TVMKeys -WrappingKeyName <WrappingKeyName> -BackupPath <path to timestamped backup folder>`
95
92
96
93
> [NOTE!]
97
94
> If the local key vault of the Azure Local instance already has a VM guest state protection key with the same name or already has an `AzureStackTvmAKRootKey`, you will receive an `InvalidVersion` error for that key. You can ignore this, as the key is already in the key vault.
@@ -101,9 +98,9 @@ The steps below involve restoring VM guest state protection keys from a folder c
101
98
1. Delete both `public.pem` and `private.pem` files from the Azure Local instance.
102
99
103
100
> [!IMPORTANT]
104
-
> Remove the wrapping key from the local key vault of the Azure Local instance using `Remove-MocKey`. This will help avoid collisions later.
101
+
> Remove the wrapping key from the local key vault of the Azure Local instance using `Remove-MocKey`. This will help avoid collisions later.
105
102
106
-
1. Run `Remove-MocKey -name WrappingKeyName -group AzureStackHostAttestation -keyvaultName AzureStackTvmKeyVault`.
103
+
1. Run `Remove-MocKey -name WrappingKeyName -group AzureStackHostAttestation -keyvaultName AzureStackTvmKeyVault`
107
104
108
105
109
106
## For Azure Local releases prior to 2505
@@ -114,17 +111,17 @@ To restore, this method restores VM guest state protection keys from the local k
114
111
115
112
### Backup
116
113
117
-
Follow these steps to copy the VM guest state protection key from the local key vault of the Azure Local instance where the VM resides to a backup key vault on another Azure Local instance:
114
+
Follow these steps to copy the VM guest state protection key from the local key vault of the Azure Local instance where the VM resides to a backup key vault on another Azure Local instance:
118
115
119
116
1. On the Azure Local system with the backup key vault, run the following commands on the Azure Local system with the backup key vault:
> Restore the VM guest state key (complete the steps above) before you start the VM on the Azure Local instance where the VM needs to be restored. This ensures that the VM uses the restored VM GSP key. Otherwise, the VM creation fails, and a new VM GSP key is created by the system. If this happens by mistake (human error), delete the VM GSP key and then repeat the steps to restore the VM GSP key.
Copy file name to clipboardExpand all lines: azure-local/manage/trusted-launch-vm-overview.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ ms.topic: concept-article
5
5
author: alkohli
6
6
ms.author: alkohli
7
7
ms.service: azure-local
8
-
ms.date: 07/14/2025
8
+
ms.date: 07/15/2025
9
9
---
10
10
11
11
# Introduction to Trusted launch for Azure Local VMs enabled by Azure Arc
@@ -67,7 +67,7 @@ When working with Trusted launch Azure Local VMs, make sure to understand the fo
67
67
68
68
**Restoring to same Azure Local instance**
69
69
70
-
- In some situations, the VM may be restored to the same Azure Local instance, the same as the Azure Local instance where the VM resided before failure. For example, restoring an affected VM to the same Azure Local instance after recovery from a physical disk failure or partial data loss. When a Trusted launch VM is successfully restored to the same Azure Local instance, the VM can be managed via Azure Local control plane as it was before.
70
+
- In some situations, the VM may be restored to the same Azure Local instance, the same as the Azure Local instance where the VM resided before failure. When a Trusted launch VM is successfully restored to the same Azure Local instance, the VM can be managed via Azure Local control plane as it was before.
0 commit comments