Skip to content

Failed to create a new instance from backup #11876

Closed

Description

@leolns

problem

Cloudstack 4.21.0.0 + VMware 8u3g + vSAN + Veeam 12 environment.

When trying to create a new instance from an existing backup, an error occurs because the datastore cannot be found. The datastore lookup is using the CloudStack UUID instead of the volume name.

$ds = Find-VBRViDatastore -Server:$server -Name "0f2b59684453331eb366a6d7036bae96"

Find-VBRViDatastore doesnt accept uuid, it needs vmware volume name

ERROR [c.c.u.s.SshHelper] (API-Job-Executor-120:[ctx-e94e8dfc, job-58501, ctx-8df14098]) (logid:d58f3113) SSH execution of command PowerShell Import-Module Veeam.Backup.PowerShell -WarningAction SilentlyContinue;$ProgressPreference='SilentlyContinue';$points = Get-VBRRestorePoint;foreach($point in $points) { if ($point.Id -eq '4bf0faea-53e5-4d3f-bf2c-8f83a2104e7d') { $restorePoint = $point; break; } };$server = Get-VBRServer -Name "10.10.10.103";$ds = Find-VBRViDatastore -Server:$server -Name "0f2b59684453331eb366a6d7036bae96";$job = Start-VBRRestoreVM -RestorePoint:$restorePoint -Server:$server -Datastore:$ds -VMName "i-8-662-TESTEDEMOBKPRESTORE" -RunAsync;while (-not (Get-VBRRestoreSession -Id $job.Id).IsCompleted) { Start-Sleep -Seconds 10 } has an error status code in return. Result output: Find-VBRViDatastore : Cannot convert 'System.Object[]' to the type 'Veeam.Backup.Core.Common.CHost' required by ^M
parameter 'Server'. Specified method is not supported.^M
At line:1 char:342^M
+ ... -Name 10.254.254.10;$ds = Find-VBRViDatastore -Server:$server -Name 0 ...^M
+                                                           ~~~~~~~^M
    + CategoryInfo          : InvalidArgument: (:) [Find-VBRViDatastore], ParameterBindingException^M
    + FullyQualifiedErrorId : CannotConvertArgument,Veeam.Backup.PowerShell.Cmdlets.FindVBRViDatastore^M
 ^M
Start-VBRRestoreVM : Cannot convert 'System.Object[]' to the type 'Veeam.Backup.Core.Common.CHost' required by ^M
parameter 'Server'. Specified method is not supported.^M
At line:1 char:451^M

versions

Cloudstack 4.21.0.0 + VMware 8u3g + vSAN + Veeam 12

The steps to reproduce the bug

Try to create a new instance from backup

What to do about it?

Find-VBRViDatastore doesnt accept uuid, it needs vmware volume name

Activity

  1. self-assigned this
    on Oct 21, 2025
  2. abh1sar commented on Oct 21, 2025

    @abh1sar
    Contributor

    @leolns the Volume (Primary Storage) name in vmware is created by removing the '-' hyphens from the Primary storage UUID in cloudstack. So the -Name parameter looks correct.

    The issue is with the -Server parameter.
    $server = Get-VBRServer -Name \"%s\"", hostIp

    The $server returned here is an Array object, which the command does not expect. Hence the error.

    Can you try running Get-VBRServer -Name directly on the Veeam server?
    Ideally it should return only one entry, but for you it seems to be returning multiple.

    Please check why are multiple servers present in Veeam for the same IP.

  3. leolns commented on Oct 21, 2025

    @leolns
    Author

    You were correct that the server object was returning an array. I fixed a duplicate configuration, and now it returns correctly. However, Find-VBRViDatastore still cannot find the database using the UUID, only by name, as shown below.

    PS C:\Users\Administrator> $server = Get-VBRServer -Name "172.22.254.10"
    PS C:\Users\Administrator> Find-VBRViDatastore -Server:$server -Name "0f2b59684453331eb366a6d7036bae96"
    PS C:\Users\Administrator> Find-VBRViDatastore -Server:$server -Name "vsanCS01"
    
    
    
    SystemVolumeType : Vsan
    IsVSAN           : True
    IsVVol           : False
    ConnHost         : 172.22.254.34(f3b8c7e2-91d4-4a6f-8c2b-7d1a5e4f9b3c)
    Type             : Datastore
    Reference        : datastore-172492
    Capacity         : 89615683813376
    FreeSpace        : 43780881521584
    Id               : f3b8c7e2-91d4-4a6f-8c2b-7d1a5e4f9b3c_datastore-172492
    Path             : vsanCS01
    Name             : vsanCS01
    

    Management log:

    ERROR [o.a.c.b.v.VeeamClient] (API-Job-Executor-70:[ctx-0aee04b2, job-58594, ctx-eb2fab33]) (logid:da32d532) Veeam PowerShell commands [PowerShell Import-Module Veeam.Backup.PowerShell -WarningAction SilentlyContinue;$ProgressPreference='SilentlyContinue';$points = Get-VBRRestorePoint;foreach($point in $points) { if ($point.Id -eq '6d748ad2-ec6d-44fe-842d-78cf7d57000f') { $restorePoint = $point; break; } };$server = Get-VBRServer -Name "172.22.254.10";$ds = Find-VBRViDatastore -Server:$server -Name "0f2b59684453331eb366a6d7036bae96";$job = Start-VBRRestoreVM -RestorePoint:$restorePoint -Server:$server -Datastore:$ds -VMName "i-8-667-DEMO-RESTORE-BKP" -RunAsync;while (-not (Get-VBRRestoreSession -Id $job.Id).IsCompleted) { Start-Sleep -Seconds 10 }] failed due to: [Start-VBRRestoreVM : Cannot validate argument on parameter 'Datastore'. The argument is null. Provide a valid value ^M for the argument, and then try running the command again.^M
    At line:1 char:470^M
    ... VM -RestorePoint:$restorePoint -Server:$server -Datastore:$ds -VMName ...^M
    ~~~^M
    CategoryInfo : InvalidData: (:) [Start-VBRRestoreVM], ParameterBindingValidationException^M
    FullyQualifiedErrorId : ParameterArgumentValidationError,Veeam.Backup.PowerShell.Cmdlets.StartVBRRestoreVM^M
    ^M
    Get-VBRRestoreSession : Cannot validate argument on parameter 'Id'. The argument is null or empty. Provide an argument ^M
    that is not null or empty, and then try the command again.^M
    At line:1 char:556^M
    ... -BKP -RunAsync;while (-not (Get-VBRRestoreSession -Id $job.Id).IsComp ...^M
    ~~~~~~~^M
    + CategoryInfo : InvalidData: (:) [Get-VBRRestoreSession], ParameterBindingValidationException^M
    FullyQualifiedErrorId : ParameterArgumentValidationError,Veeam.Backup.PowerShell.Cmdlets.GetVBRRestoreSession^M
    M
    ].

  4. locked and limited conversation to collaborators on Oct 22, 2025
  5. converted this issue into a discussion #11886 on Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions