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
This article describes how to manually back up and restore a Trusted launch for Azure Local VM enabled by Azure Arc.
16
+
This article describes how to manually back up and restore guest state protection keys for Trusted launch Azure Local virtual machines (VMs) enabled by Azure Arc.
17
17
18
-
-**For Azure Local release 2505 and later**: Backup/restore VM guest state protection keys to/from a file system folder.
18
+
-**For Azure Local release 2505 and later**: Back up and restore Azure Local VM guest state protection keys to and from a file system folder.
19
19
20
-
-**For Azure Local releases prior to 2505**: Backup/restore VM guest state protection keys to/from a key vault in another Azure Local instance.
20
+
-**For Azure Local releases prior to 2505**: Back up and restore Azure Local VM guest state protection keys to and from a key vault in another Azure Local instance.
21
21
22
22
# [Azure Local release 2505 and later](#tab/azure-local-release-2505-and-later)
23
23
24
-
For back up, this method copies VM guest state protection keys from the on-premises 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
+
This section applies to Azure local release 2505 and later.
25
25
26
-
For restore, this method 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.
26
+
For back up, VM guest state protection keys are copied from the on-premises 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.
27
27
28
-
### Backup
28
+
For restore, VM guest state protection keys are restored from a folder containing the backup copy to the key vault of an Azure Local instance where the VMs need to be restored.
29
+
30
+
### Back up
29
31
30
32
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
33
@@ -85,16 +87,17 @@ The steps below involve restoring VM guest state protection keys from a folder c
85
87
Import-TvmWrappingKeyFromPem -KeyName <WrappingKeyName> -PublicKeyPath <path to public.pem> -PrivateKeyPath <path to private.pem> -KeySize 2048
86
88
```
87
89
88
-
1. Delete `AzureStackTvmAKRootKey` as follows:
90
+
1. Do this step only if you're restoring the VM to the same Azure Local instance where the VM resided before failure. Delete `AzureStackTvmAKRootKey` as follows:
89
91
90
-
> [!NOTE]
91
-
> 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>`
98
+
```powershell
99
+
Import-TVMKeys -WrappingKeyName <WrappingKeyName> -BackupPath <path to timestamped backup folder>
100
+
```
98
101
99
102
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.
100
103
@@ -103,54 +106,70 @@ The steps below involve restoring VM guest state protection keys from a folder c
103
106
1. Delete both `public.pem` and `private.pem` files from the Azure Local instance.
104
107
105
108
> [!IMPORTANT]
106
-
> Remove the wrapping key from the local key vault of the Azure Local instance using `Remove-MocKey`. This will help avoid collisions later.
109
+
> Remove the wrapping key from the key vault of the Azure Local instance using `Remove-MocKey`. This will help avoid collisions later.
107
110
108
-
1. Run `Remove-MocKey -name WrappingKeyName -group AzureStackHostAttestation -keyvaultName AzureStackTvmKeyVault`
# [Azure Local releases prior to 2505](#tab/azure-local-releases-prior-to-2505)
112
117
113
-
To back up, this method copies VM guest state protection keys from the local key vault of your Azure Local instance to the local key vault of another Azure Local instance that is used for key backup purposes.
118
+
This section applies to Azure Local releases prior to 2505.
119
+
120
+
For back up, the VM guest state protection keys are copied from the on-premises key vault of your Azure Local instance to the key vault of another Azure Local instance that is used for key back up purposes.
114
121
115
-
To restore, this method restores VM guest state protection keys from the local key vault (backup key vault) of the Azure Local instance that is used for key backup purposes to the local key vault of an Azure Local instance where the VMs need to be restored.
122
+
For restore, the VM guest state protection keys are restored from the local backup key vault of the Azure Local instance to the key vault of an Azure Local instance where the VMs need to be restored.
116
123
117
124
### Back up
118
125
119
126
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:
120
127
121
128
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:
122
129
123
-
1. Create a wrapping key in the backup key vault:
130
+
1. Create a wrapping key in the backup key vault. Make note of the name as you'll need it later:
1. On the Azure Local system with the backup key vault, run the following commands:
170
193
171
194
1. Copy the PEM file to the Azure Local system.
172
195
173
196
1. Get the `VM ID` from the VM files stored on disk. There will be a VM config file (.xml) that has the `VM ID` as its name. You can also use the following command to obtain the `VM ID` if you know the VM name. Perform this step on a Hyper-V host that has the VM files:
> 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 guest state protection key. Otherwise, the VM creation fails, and a new VM guest state protection key is created by the system. If this happens by mistake (human error), delete the VM guest state protection key and then repeat the steps to restore the VM guest state protection key key.
0 commit comments