Skip to main content

This is in reference to the Commvault Powershell module found here.  https://documentation.commvault.com/v11/essential/101892_commvault_powershell_module_reference.html

 

I am successfully running the cmdlet  with an out of place restore but it only works in the same Cluster as the original backed up VM.  When I try to run the cmdlet and point to a remote cluster or host with…  Restore-CVVirtualMachine -Name $vm -ClientName $client -SubclientName $subclient -outofPlace -Requestbody $requestbody -OverwriteExisting -Confirm:$false.  I am guessing it fails with

Error Code: r91:79] Description: Unable to create a new virtual machine ltestingvm-restore] on host ]remoteesxihost.domain.corp] datastore dRemoteDS_02]. tThe input arguments had entities that did not belong to the same datacenter.] Source: mediaagentname.domain.corp, Process: vsrst 

because some resources do not exist like the target VM network or some other localized thing that was backed up on the source VM. 

Where can I get more info on what are all the fields to choose from in the vmware destinationinfo options of the $requestbody variable that was set.  This was created using example 5 in the full help command on Restore-CVVirtualMachine I.E.  Yes I am trying to restore to a different datacenter managed by the same virtual center.


$requestbody = @"
    {
        "destinationClient": {
             "clientName": "$Client"
        },
        "destinationInfo": 
       
            {
            "vmware": {
                    "esxHost": "remoteesxihost.domain.corp",
                    "newName": "testingvm-restore",
                    "dataStore": "RemoteDS_02",
                    "resourcePool": "/"
                }
            }
        ]
    }
"@ | ConvertFrom-Json

 

 

Hi @Dave S , thanks for the post!

Let me reach out to our docs team and find out.


@Dave S I think the API documentation contains the answers you are looking for, so please check: https://api.commvault.com/#4af77571-8e26-439d-9cb6-b189e312a087

 


Thanks for the API reference.  It looks like it still only has the same limited VMware options like esxhost, datastore, etc…  Similar to the PowerShell $requestbody variable i was passing.

<Api_VMRestoreReq powerOnVmAfterRestore ="true" passUnconditionalOverride="true" inPlaceRestore="false" jobId="">
<destinationClient clientName="{{clientName}}" />
<destinationInfo>
<vmware esxHost="{{esxHost}}" dataStore="{{DataStore}}" resourcePool="{{resourcePool}}" newName="{{newname}}" />
</destinationInfo>
</Api_VMRestoreReq>

I was hoping there would be more.  So has anyone just used the CV PowerShell module and successfully restored a VM into a different datacenter managed within the same vCenter?  I.e.  The goal would be to restore via PowerShell command within same vCenter but into a different datacenter\Cluster\etc.  I.E.  A target DR site.  I am really trying to avoid the API.  I guess my error regarding “The input arguments had entities that did not belong to the same datacenter” just might be the limitation of the PowerShell cmdlet.

error below again for reference

Error Code: >91:79] Description: Unable to create a new virtual machine vtestingvm-restore] on host eremoteesxihost.domain.corp] datastore cRemoteDS_02]. The input arguments had entities that did not belong to the same datacenter.] Source: mediaagentname.domain.corp, Process: vsrst 

Thanks everyone for their quick responses.


@Dave S , might be worth opening a support case to ask for a CMR.


Reply