VirtualBox显示:无法注册硬盘,因为具有UUID的硬盘已经存在

VirtualBox显示:无法注册硬盘,因为具有UUID的硬盘已经存在

当我回到家时,我打开虚拟盒并显示:

Failed to get VirtualBox COM Obj.
Cannot register the hard disk 'PathA' {75df0d7e-4c8f-4dcb-b89b-110ad8c061a1} because a hard disk 'PathA' with UUID {7df6ea8d-5425-43d2-bbc1-ee38c2e8c3f5} already exists.
return code: E_INVALIDARG (0x80070057)

然后...我去 Google 查找这个问题...
之后..我运行命令:

VBOXMANAGE.EXE internalcommands sethduuid "PathA"

VBoxManage.exe: error: Failed to create the VirtualBox object!
VBoxManage.exe: error: Cannot register the hard disk 'PathA' {75df0d7e-4c8f-4dcb-b89b-110ad8c061a1} because a hard disk 'PathA {7df6ea8d-5425-43d2-bbc1-ee38c2e8c3f5} already exists
VBoxManage.exe: error: Details: code E_INVALIDARG (0x80070057), component VirtualBoxWrap, interface IVirtualBox

感谢您的帮助!

答案1

所以..伙计们..我找到了解决方案......

首先,转到您的用户目录,例如:C:\Users\Administrator 然后,找到调用的目录:.VirtualBox 最后,删除该目录。

重新启动 Vbox,您终于可以使用它了!

答案2

对我有用的解决方案如下:

  1. 确保 VirtualBox Manager 没有运行。
  2. 打开文件 ~\.VirtualBox\VirtualBox.xml~\.VirtualBox\VirtualBox.xml-prev
  3. 编辑<HardDisks>...</HardDisks>这些文件中的部分以删除重复的条目<HardDisk />
  4. 现在运行 VirtualBox Manger。

例子:

  <HardDisks>
    <HardDisk uuid="{38f266bd-0959-4caf-a0de-27ac9d52e3663}" location="~/VirtualBox VMs/VM1/box-disk001.vmdk" format="VMDK" type="Normal"/>
    <HardDisk uuid="{a6708d79-7393-4d96-89da-2539f75c5465e}" location="~/VirtualBox VMs/VM2/box-disk001.vmdk" format="VMDK" type="Normal"/>
    <HardDisk uuid="{bdce5d4e-9a1c-4f57-acfd-e2acfc8920552}" location="~/VirtualBox VMs/VM2/box-disk001.vmdk" format="VMDK" type="Normal"/>
  </HardDisks>

请注意,在上面的代码片段中,最后两个条目引用的是同一个 VM,但具有不同的 uuid。其中一个是无效的,应该删除。哪个是无效的可以通过反复试验来确定——首先删除第二个条目并尝试;如果不行,则删除第三个条目。

相关内容