New-VBRHvVirtualDeviceMappingRule
Short Description
Defines mapping settings of a backed-up virtual disk.
Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
|
New-VBRHvVirtualDeviceMappingRule -SourceDevice <VBRViVirtualDevice> -Path <String> [<CommonParameters>] |
Detailed Description
This cmdlet creates the VBRHvVirtualDeviceMappingRule object that contains mapping settings of a VMware backed-up virtual disk to Hyper-V target host file path.
Parameters
|
Parameter |
Description |
Type |
Required |
Position |
Accept Pipeline Input |
|---|---|---|---|---|---|
|
Path |
Specifies a path on Hyper-V host for a backed-up virtual disk. |
|
True |
Named |
False |
|
SourceDevice |
Specifies a backed-up virtual disk. The cmdlet will map this disk to the Hyper-V file path.
Accepts the |
|
True |
Named |
False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.
Output Object
The cmdlet returns the VBRHvVirtualDeviceMappingRule object that contains backed-up virtual disk mapping settings.
Examples
Mapping Backed-Up Virtual Disks to Hyper-V Host File Path
This example shows how to map the backed-up virtual disk to the custom filepath on the Hyper-V host. The cmdlet will map the virtual disk of the VM that is backed up by the Winsrv4515 job.
|
$backup = Get-VBRBackup -Name "Winsrv4515" $restorepoint = Get-VBRRestorePoint -Backup $backup $disks = Get-VBRViVirtualDevice -RestorePoint $restorepoint[3] New-VBRHvVirtualDeviceMappingRule -SourceDevice $disks[0] -Path "D:\VMs\disks" |
Perform the following steps:
- Get the backed-up VM virtual disks:
- Run the
Get-VBRBackupReturns backups. cmdlet. Specify theNameparameter value. Save the result to the$backupvariable. - Run the
Get-VBRRestorePointReturns restore points. cmdlet. Set the$backupvariable as theBackupparameter value. Save the result to the$restorepointvariable.The
Get-VBRRestorePointcmdlet will return an array of restore points. Consider that the array numbering starts with 0. In our example, the fourth restore point will be used. - Run the
Get-VBRViVirtualDeviceReturns details on VMware VM virtual disks. cmdlet. Set the$restorepoint[3]as theRestorePointparameter value. Save the result to the$disksvariable.The
Get-VBRViVirtualDevicecmdlet will return an array of disks. Consider that the array numbering starts with 0. In our example, the first disk will be used.
- Run the
- Run the
New-VBRHvVirtualDeviceMappingRulecmdlet. Set the$disks[0]variable as theSourceVirtualDeviceparameter value. Specify thePathparameter value.
Related Commands
Get-VBRBackupReturns backups.Get-VBRRestorePointReturns restore points.Get-VBRViVirtualDeviceReturns details on VMware VM virtual disks.