【VirtualBox】VirtualBox使用现有的虚拟盘文件(如VHD)创建虚拟机时,报错:打开虚拟硬盘失败,“UUID already exist”的解决方法

0、问题描述

使用现有的虚拟盘文件(如VHD)创建虚拟机时,报错:打开虚拟硬盘失败,“UUID already exists”的错误。

1、参考博客

https://www.cnblogs.com/xqzt/p/5053338.html
https://jingyan.baidu.com/article/454316ab781713f7a6c03a5a.html

2、修改UUID

进入CMD
cd C:\Program Files\Oracle\VirtualBox\
执行如下命令
VBoxManage internalcommands sethduuid “C:\Users\gwlbl\VirtualBox VMs\ubuntu14.04.5-64-pc\ubuntu14.04.5-64-pc.vhd”
执行成功打印如下
UUID changed to: 87ef24b5-860b-4cde-9400-e055ae1ed959
执行失败打印如下
Oracle VM VirtualBox Command Line Management Interface Version 5.2.6
(C) 2005-2018 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: Invalid UUID parameter

3、还有一种可能

以前的虚拟介质没删干净,比如更改或删除了原来的虚拟盘文件(VHD),但是没有在virtualBox中清理干净。
需要在“管理”-->“虚拟介质管理器”中将介质删除

猜你喜欢

转载自blog.csdn.net/u010168781/article/details/80896696