如何更改虚拟磁盘的 UUID? [英] How do I change the UUID of a virtual disk?
问题描述
我正在尝试使用现有的硬盘通过 Oracle VirtualBox 创建一个新的虚拟机.当我尝试选择现有的硬盘文件,一个 .vhd 文件时,它显示一个错误,说虚拟硬盘无法使用,因为 UUID 已经存在.
I am trying to create a new virtual machine with Oracle VirtualBox, using an already-existing hard disk. When I try to select the existing hard disk file, a .vhd file, it displays an error saying the virtual hard disk cannot be used because the UUID already exists.
所以我尝试了以下命令来更改其 UUID.
So I tried the following command to change its UUID.
VBoxManage internalcommands sethduuid /home/user/VirtualBox VMs/drupal/drupal.vhd
我收到此错误.
语法错误:无效的 UUID 参数
Syntax error: Invalid UUID parameter
我该如何解决这个问题?
How can I resolve this?
推荐答案
正确的命令如下.
VBoxManage internalcommands sethduuid "/home/user/VirtualBox VMs/drupal/drupal.vhd"
虚拟磁盘的路径包含空格,所以必须用双引号括起来,以免被解析为两个参数.
The path for the virtual disk contains a space, so it must be enclosed in double quotes to avoid it is parsed as two parameters.
这篇关于如何更改虚拟磁盘的 UUID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!