-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore-AzureRmRecoveryServicesBackupItem command failing for azureVM #7823
Comments
IssueThe region parameter in the restore request object is not able to get vault location when using the Set-AzureRmRecoveryServicesVaultContext cmdlet. WorkaroundThere’s a workaround to solve this issue using a vault object. $vault = Get-AzureRmRecoveryServicesVault -ResourceGroupName -Name |
[RecoveryServices.Backup] VM restore fix for #7823
Hi, is this fixed? I am still facing this issue. |
Hi, this has been fixed. |
I am still facing the same issue : $restorejob = Restore-AzureRmRecoveryServicesBackupItem -RecoveryPoint $rp[0] -StorageAccountName $StorageAccountName -StorageAccountResourceGroupName $StorageAccountResourceGroup -Verbose Restore-AzureRmRecoveryServicesBackupItem : Restore Azure Backup Item Operation failed. Error Code: CloudInvalidInputError. Error Message: The current operation failed due to an internal
Get-AzureRmRecoveryServicesBackupJob : Cannot validate argument on parameter 'Job'. The argument is null. Provide a valid value for the argument, and then try running the command again.
PS C:\WINDOWS\system32> Get-Module AzureRM.RecoveryServices.Backup ModuleType Version Name ExportedCommands Script 4.5.2 AzureRM.RecoveryServices.Backup {Backup-AzureRmRecoveryServicesBackupItem, Disable-AzureRmRecoveryServicesBackupProtection, Disable-AzureRmRecoveryServicesBackupRPMo... |
Mistake on my end. This fix went in the 2018-04-12 release and there were no AzureRM modules, only Az. You can either upgrade to Az module but you will have to update your existing scripts or you can keep using the same module and use work around by passing vault location and vault Id in the parameters as mentioned above. |
I tried your workaround steps. I am getting the following error Restore-AzureRmRecoveryServicesBackupItem : Cannot validate argument on parameter 'VaultId'. The argument is
Also upgrading the module didn't help. Any other suggestions ? |
@SidFallenAngel Looking at the error, it seems like you are passing an empty object in -VaultId parameter. You need to get the vault object using |
@siddharth7 Hi Sid. I tried the same. I did pass the parameter values. However when I just ran $vault to print its value, no value is getting printed. That's weird. |
@SidFallenAngel Since the $vault is empty, it points to the fact that you are passing wrong params to the get-vault cmdlet. Please run |
#customer-response-expected |
Since explanation was provided and the fix is provided, closing the issue. |
Description
Script/Steps for Reproduction
Module Version
6.12
Environment Data
$PSVersionTable
Name Value
PSVersion 5.1.17763.1
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.1
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Debug Output
The text was updated successfully, but these errors were encountered: