之前在VirtualBox里重装系统时,直接复制虚拟硬盘就行了,现在不行,因为VirtualBox识别虚拟磁盘文件VDI采用了uuid识别技术。

如果复制一个VDI文件,再以此为介质重新重新创建一个虚拟机,如提示:

打开 虚拟硬盘 E:\virtual\xp.vdi 失败.

Cannot register the hard disk 'E:\virtual\xp.vdi' {25b2c54d-3b49-49bb-b383-3e17da60023e} because a hard disk 'F:\virtual\xp.vdi' with UUID {25b2c54d-3b49-49bb-b383-3e17da60023e} already exists.

返回 代码:E_INVALIDARG (0x80070057)
组件:VirtualBox
界面:IVirtualBox {3b2f08eb-b810-4715-bee0-bb06b9880ad2}
被召者 RC:VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)

根据错误,原来UUID已存在。

按以下方法:

C:\Users\Administrator>cd c:/

c:\>cd d:/

c:\>cd D:\Program Files\Oracle\VirtualBox

c:\>d:

D:\Program Files\Oracle\VirtualBox>VBoxManage.exe internalcommands sethduuid E:\virtual\xp.vdi UUID changed to: 25b2c54d-3b49-49bb-b383-3e17da60023e
Oracle VM VirtualBox Command Line Management Interface Version 4.2.12
(C) 2005-2013 Oracle Corporation
All rights reserved.

Usage: VBoxManage internalcommands <command> [command arguments]

Commands:

  sethduuid <filepath> [<uuid>]
       Assigns a new UUID to the given image file. This way, multiple copies
       of a container can be registered.

WARNING: This is a development tool and shall only be used to analyse
         problems. It is completely unsupported and will change in
         incompatible ways without warning.

Syntax error: Not enough parameters

再重新导入,就ok了。

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注