Restore Hyper-V VM to default location using WMI method fails and shows bpvmutil "Error code: 32779"
Problem
After a full backup for Hyper-V virtual machine by Hyper-V policy with WMI method enabled.
The the restore job for full Hyper-V virtual machine with enabled options:
"Restore to original Hyper-V Server"
and
"Overwrite virtual machine"
fails with status 2821 "Hyper-V policy restore error"
The restore of VM related files is successful but post-restore task is showing failed.
Error Message
In detail, importing VM failed with Error code: 32779.
On the restore host:
Unix: /usr/openv/netbackup/logs/bpVMutil
Windows: <installpath>\netbackup\logs\bpvmutil
"bpvmutil log"
====================================================
06:38:08.392 [4464.6696] <2> HV: NBWSMAN::WinRmClient::query:Query result: <w:XmlFragment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"; xmlns:m="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd";
xml:lang="en-US"><ErrorCode>32779</ErrorCode><ErrorDescription>Failed to import a virtual
machine.</ErrorDescription><JobState>10</JobState><PercentComplete>0</PercentComplete></w:XmlFragment>
06:38:08.392 [4464.6696] <2> HV: NBWSMAN::HypervWmiJobOperations::waitForJobCompletion:Job ID A0E6AE5E-89C1-47F2-84D1-C26F204974A5, progress: 0%
06:38:08.392 [4464.6696] <2> HV: NBWSMAN::HypervWmiJobOperations::waitForJobCompletion:Job ID A0E6AE5E-89C1-47F2-84D1-C26F204974A5 failed! Error code: 32779
Error msg: Failed to import a virtual machine.
====================================================
Cause
Restore using WMI method is not supported to the default location("C/ProgramData/Microsoft/Windows/Hyper-V/Virtual Machines/").
Solution
The workaround is to restore the HyperV virtual machine to an alternate location.
This is a Microsoft Hyper-V limitation from Windows 2016 release onwards and not a Netbackup limitation.
Version
Windows Server 2019
NetBackup 8.0/8.1.1/8.1.2/8.2./8.3