Skip to content

Commit d40625b

Browse files
committed
Merge pull request #120 from MabOneSdk/mkheranidev1
Blocking registration of already registered VM from powershell.
2 parents c79ca8e + fb1c782 commit d40625b

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/RegisterAzureRMBackupContainer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ private bool IsDiscoveryNeeded(string vmName, string rgName, out CSMContainerRes
159159
ContainerQueryParameters parameters = new ContainerQueryParameters()
160160
{
161161
ContainerType = ManagedContainerType.IaasVM.ToString(),
162-
FriendlyName = vmName,
162+
FriendlyName = vmName,
163+
Status = AzureBackupContainerRegistrationStatus.NotRegistered.ToString(),
163164
};
164165

165166
//First check if container is discovered or not

src/ResourceManager/AzureBackup/Commands.AzureBackup/Properties/Resources.Designer.cs

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ResourceManager/AzureBackup/Commands.AzureBackup/Properties/Resources.resx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@
140140
1. VM does not exist
141141
2. VM is Azure IaaS v2 VM
142142
3. The VM name or the Service name needs to be case sensitive
143-
143+
4. VM is already Registered with same or other Vault. Please Unregister VM first and then try to register it again.
144+
144145
Please contact Microsoft for further assistant.</value>
145146
</data>
146147
<data name="BackupItemCmdletCalled" xml:space="preserve">

0 commit comments

Comments
 (0)