在Hyper-V上导入虚拟机时,如果您 在加载虚拟机配置(Hyper-V encountered an error while loading the virtual machine configuration) 错误时遇到 Hyper-V 错误,您可以使用这些提示和技巧来修复它。此错误主要发生在您导入计算机上已有的同一虚拟机时。
整个错误消息是这样的:
Hyper-V encountered an error while loading the virtual machine configuration from [a-location]
Failed to create virtual machine.
The operating failed because a virtual machine with the same identifier already exists. Select a new identifier and try the operating again.
Hyper-V允许您在计算机上导出和导入虚拟机。在Hyper-V(Hyper-V)上导入虚拟机并不难。但是,当您尝试在您的计算机上导入相同的虚拟机时,问题就开始了,而您已经拥有原始虚拟机。换句话说,当您 在导入虚拟机时选择就地注册虚拟机 (Register the virtual machine in-place )或 还原虚拟机 选项时,会发生此错误。(Restore the virtual machine )
每当您创建虚拟机时,Hyper-V都会生成一个唯一 ID 来表示虚拟机,称为 标识符(identifier)。导出虚拟机时,它带有该标识符。同样,当您导入虚拟机时,标识符也会安装在您的计算机上。如果您的计算机在导入时检测到相同的标识符,则会显示如下错误消息。
Hyper-V在加载虚拟机配置时遇到错误
要修复Hyper-V在加载虚拟机配置错误时遇到错误,请执行以下步骤:
- 删除旧虚拟机
- 创建一个新的唯一 ID
要了解有关这些步骤的更多信息,请继续阅读。
1]删除旧虚拟机
如果您删除原始虚拟机,则唯一标识符也将从您的计算机中删除。换句话说,它将为要安装在您的计算机上的旧标识符创建一个空间。要删除 Hyper-V 虚拟机,请执行以下步骤:
- 在您的计算机上打开Hyper-V 管理器。(Hyper-V Manager)
- 右键单击虚拟机。
- 从上下文菜单中选择 删除 (Delete )选项。
- 单击 确认窗口上的删除 按钮。(Delete )
它会在瞬间删除您选择的虚拟机的所有文件。之后,您将能够导入虚拟机而不会出现任何错误。
2]创建一个新的唯一ID
有时,您可能不想删除虚拟机来导入另一台虚拟机。在这种情况下,您可以创建一个新的唯一 ID 或标识符。可以在导入虚拟机时执行此操作。
要为虚拟机创建新的唯一 ID,请执行以下步骤:
- 在您的计算机上打开Hyper-V 管理器。(Hyper-V Manager)
- 单击 导入虚拟机 (Import Virtual Machine )选项。
- 通过单击 浏览 (Browse )按钮选择虚拟机文件夹。
- 在 选择导入类型 (Choose Import Type )选项卡中选择 复制虚拟机(创建新的唯一 ID) (Copy the virtual machine (create a new unique ID) )选项。
- 单击 下一步 (Next )按钮并运行您的虚拟机。
通过选择此选项,您将为虚拟机创建一个新的唯一 ID。导入的虚拟机将携带除标识符之外的所有旧设置。
如何在Hyper-V中导入虚拟机?
要在Hyper-V中导入虚拟机,您需要使用 Import Virtual Machine 选项。之后,您可以选择虚拟机的导出文件夹,选择 复制虚拟机 (Copy the virtual machine )选项,然后开始安装。要了解有关在 Hyper-V 中导入虚拟机的(importing a virtual machine in Hyper-V)更多信息,您可以阅读此详细指南。
Hyper V虚拟机存储在哪里?
默认情况下,Windows将所有Hyper-V文件存储在 C:ProgramDataMicrosoft Windows Hyper-V文件夹中。但是,您可以在 C:UsersPublicDocuments Hyper-V中找到所有虚拟驱动器。无论您使用的是Windows 10还是Windows 11,位置都是一样的。
就这样!希望本文能帮助您解决Hyper-V导入问题。
阅读:(Read: )如何在 Windows 10 中使用 Hyper-V 安装 Windows 11。(How to Install Windows 11 using Hyper-V in Windows 10.)
Hyper-V encountered error while loading virtual machine configuration
Whilе importing a virtual maсhine on Hyper-V, іf yoυ are getting Hyper-V encountered an error while loading the virtual machine configuration error, here is how you can fix it using these tips and tricks. This error mainly occurs when you import the same virtual machine that you already have on your computer.
The entire error message says something like this:
Hyper-V encountered an error while loading the virtual machine configuration from [a-location]
Failed to create virtual machine.
The operating failed because a virtual machine with the same identifier already exists. Select a new identifier and try the operating again.
Hyper-V lets you export and import virtual machines on your computer. It is not that difficult to import a virtual machine on Hyper-V. However, the problem starts when you try to import the same virtual machine on your computer when you already have the original one. In other terms, this error occurs when you select Register the virtual machine in-place or Restore the virtual machine option while importing a virtual machine.
Whenever you create a virtual machine, Hyper-V generates a unique ID to represent the virtual machine, called an identifier. When you export a virtual machine, it carries that identifier. Similarly, when you import the virtual machine, the identifier also gets installed on your computer. If your computer detects the same identifier while importing, it displays an error message like this.
Hyper-V encountered an error while loading the virtual machine configuration
To fix Hyper-V encountered an error while loading the virtual machine configuration error, follow these steps:
- Delete old virtual machine
- Create a new unique ID
To learn more about these steps, continue reading.
1] Delete old virtual machine
If you delete the original virtual machine, the unique identifier will be removed from your computer too. In other words, it will create a space for the old identifier to be installed on your computer. To delete a Hyper-V virtual machine, follow these steps:
- Open Hyper-V Manager on your computer.
- Right-click on the virtual machine.
- Select the Delete option from the context menu.
- Click on the Delete button on the confirmation window.
It deleted all the files of your selected virtual machine within moments. Following that, you will be able to import the virtual machine without any error.
2] Create a new unique ID
At times, you might not want to delete a virtual machine to import another one. In such a situation, you can create a new unique ID or identifier. It is possible to do that while importing a virtual machine.
To create a new unique ID for the virtual machine, follow these steps:
- Open Hyper-V Manager on your computer.
- Click the Import Virtual Machine option.
- Choose the virtual machine folder by clicking the Browse button.
- Choose Copy the virtual machine (create a new unique ID) option in the Choose Import Type tab.
- Click the Next button and run your virtual machine.
By selecting this option, you are creating a new unique ID for your virtual machine. The imported virtual machine will carry all the old settings except the identifier.
How do I import a virtual machine in Hyper-V?
To import a virtual machine in Hyper-V, you need to use the Import Virtual Machine option. Following that, you can select the exported folder of your virtual machine, select the Copy the virtual machine option, and start the installation. To learn more about importing a virtual machine in Hyper-V, you can read this detailed guide.
Where are Hyper V virtual machines stored?
By default, Windows stores all the Hyper-V files in C:\ProgramData\Microsoft\Windows\Hyper-V folder. However, you can find all the virtual drives in C:\Users\Public\Documents\Hyper-V. Whether you are using Windows 10 or Windows 11, the location is the same.
That’s all! Hope this article helped you fix the Hyper-V import issue.
Read: How to Install Windows 11 using Hyper-V in Windows 10.