Oracle VirtualBox 问题汇总
1.打开虚拟机时报硬盘UUID 已经存在:
错误信息:
Cannot register the hard disk 'F:\VirtualBox VMs\cl-11r2-rac2\cl-11r2-rac2.vdi' {cc59aac5-a2e6-4f39-b441-04d1ff29acd2} because a hard disk 'F:\VirtualBox VMs\cl-11r2-rac1\cl-11r2-rac1.vdi' with UUID {cc59aac5-a2e6-4f39-b441-04d1ff29acd2} already exists.
解决方法:
进入cmd cd 到 VirtualBox 安装目录:
cd C:\Program Files\Oracle\VirtualBox
然后指定物理文件(vbox虚拟磁盘文件),执行如下命令:
VBoxManage internalcommands sethduuid "F:\VirtualBox VMs\cl-11r2-rac2\cl-11r2-rac2.vdi"
UUID changed to: 7db19c60-8c71-456b-a81c-d263a4988230
更改成功后删除vbox虚拟磁盘文件目录下的*.vbox-prev 文件和C:\Users\Administrator\.VirtualBox 下的VirtualBox.xml和VirtualBox.xml-prev文件,用记事本打开虚拟机目录下的 *.vbox 文件,修改如下信息
<MediaRegistry> <HardDisks> <HardDisk uuid="{bfdcadf6-b88d-4224-a5ff-673f1ca3f413}" location="cl-11r2-rac2.vdi" format="VDI" type="Normal"/>
更改为:
<HardDisk uuid="{7db19c60-8c71-456b-a81c-d263a4988230}" location="cl-11r2-rac2.vdi" format="VDI" type="Normal"/>
</HardDisks><DVDImages/><FloppyImages/>
</MediaRegistry>
接往下找到 </StorageControllers> 节点
<AttachedDevice type="HardDisk" port="0" device="0">
<Image uuid="{bfdcadf6-b88d-4224-a5ff-673f1ca3f413}"/> 改为:<Image uuid="{7db19c60-8c71-456b-a81c-d263a4988230}"/>
</AttachedDevice>
有多个磁盘时注意磁盘顺序,虚拟机主磁盘通常port="0" ;
注意要删除C:\Users\Administrator\.VirtualBox 下的VirtualBox.xml和VirtualBox.xml-prev文件,因为默认情况下虚拟机打开时会读取这两个文件,更新和同步虚拟机目录下的*.vbox和*.vbox-prev文件,这样会导致修改的内容被覆盖,修改无效。
Hope is personal,hope is something that no one can give to you,you have to choose to believe in hope,you have to make it yourself..