Hi,
Exporting a VM from Hyper-V Core 2019 to a network share can sometimes result in an "Access Denied" error (0x80070005), even after following the recommended troubleshooting steps. This problem is often related to permissions or network settings. Let's go through a structured approach to troubleshoot and hopefully resolve the issue.
Verify Network Share and NTFS Permissions
Ensure that the account used by Hyper-V to perform the export has the necessary permissions. This account is typically the one under which the Hyper-V service runs, often SYSTEM
or a specific user account if configured differently.
- Share Permissions: On the network share, ensure that the
Everyone
group or the specific account Hyper-V runs under hasChange
andRead
permissions at a minimum. - NTFS Permissions: On the folder where the network share is located, the Hyper-V service account needs
Modify
permissions, which include read, write, execute, and delete capabilities.
Use a Hyper-V Administrator Account
If you're running the export command under your user account, ensure that your account is part of the Hyper-V Administrators group on the Hyper-V server. This provides sufficient privileges to perform exports.
Disable UAC (User Account Control) Remote Restrictions
Windows Server might block access to network shares from services running as SYSTEM
. To check if this is the issue, you can temporarily disable these restrictions:
- Open Registry Editor on the Hyper-V host.
- Navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
. - Create a new DWORD value named
LocalAccountTokenFilterPolicy
and set its value to1
. - Restart the server and try the export again.
Warning: This action decreases the security of the server by allowing full administrator tokens during remote connections. Use it as a temporary measure to diagnose the issue.
Explicitly Specify Credentials
Try specifying credentials explicitly when accessing the network share, to ensure that the correct permissions are used. You can do this by using the net use
command before exporting the VM:
shell
net use \\NetworkShare\Path /user:domain\username password
Replace \\NetworkShare\Path
with your network share path, and domain\username
and password
with the credentials that have access to the share.
Check Antivirus and Firewall Settings
Ensure that any antivirus or firewall running on the Hyper-V host or the network share server isn't blocking the export process. Temporarily disable these (if your policy allows) to rule out interference.
Verify Network Connectivity and Path
Ensure that the Hyper-V host has proper network connectivity to the share and that the share path is correctly specified. Typos or network issues can lead to access denied errors.
Log and Event Viewer
Check the Event Viewer on both the Hyper-V host and the server hosting the network share for any additional information that might point to the cause of the failure. Specifically, look under Windows Logs > System or Applications for related error entries.
Consider Using PowerShell
If you're not already, consider using PowerShell for the export operation. It might give you more control and better error output. Here's a basic command to export a VM:
powershell
Export-VM -Name "VMName" -Path "\\NetworkShare\Path"
If after following these steps you still encounter issues, it might be helpful to revisit the network share setup or consult with your network administrator to ensure there are no underlying network policies or configurations that might be causing the problem.