我的測試環境,想構建一套Standby RAC環境,不想再重複去安裝系統浪費時間,直接複製以前安裝RAC前的一套VirtualBox的虛擬環境,不過打開時報錯:測試
未能打開位於 Z:\Vbox\StandbyRAC_ENV\11.2.0.4RAC1\11.2.0.4RAC1.vdi 的虛擬電腦。 Trying to open a VM config 'Z:/Vbox/11.2.0.4RAC_ENV/installed/11.2.0.4RAC1/11.2.0.4RAC1.vbox' which has the same UUID as an existing virtual machine.
很明顯,從報錯能夠看到,virtual box不容許有相同的UUID。那麼是否能夠修改這個UUID呢?
答案是確定的,並且很是方便:ui
直接使用VBoxManage程序來修改UUID便可:code
C:\Users\Mcdull>VBoxManage internalcommands sethduuid "Z:\Vbox\StandbyRAC_ENV\11.2.0.4RAC1\11.2.0.4RAC1.vdi" 'VBoxManage' 不是內部或外部命令,也不是可運行的程序或批處理文件。 C:\Users\Mcdull>d: D:\>cd D:\Program Files\Oracle\VirtualBox D:\Program Files\Oracle\VirtualBox>VBoxManage internalcommands sethduuid "Z:\Vbox\StandbyRAC_ENV\11.2.0.4RAC1\11.2.0.4RAC1.vdi" UUID changed to: 6fd90da6-77f5-400e-9cd6-f0ae982562a5 D:\Program Files\Oracle\VirtualBox>
一樣,RAC環境用到的全部磁盤對應的vdi文件都須要從新修改:模板
--本地磁盤 VBoxManage internalcommands sethduuid "Z:\Vbox\StandbyRAC_ENV\11.2.0.4RAC1\11.2.0.4RAC1.vdi" VBoxManage internalcommands sethduuid "Z:\Vbox\StandbyRAC_ENV\11.2.0.4RAC2\11.2.0.4RAC2.vdi" --共享磁盤 VBoxManage internalcommands sethduuid "Z:\Vbox\StandbyRAC_ENV\11.2.0.4_storage\NewVirtualDisk1.vdi" VBoxManage internalcommands sethduuid "Z:\Vbox\StandbyRAC_ENV\11.2.0.4_storage\NewVirtualDisk2.vdi" VBoxManage internalcommands sethduuid "Z:\Vbox\StandbyRAC_ENV\11.2.0.4_storage\NewVirtualDisk3.vdi" VBoxManage internalcommands sethduuid "Z:\Vbox\StandbyRAC_ENV\11.2.0.4_storage\NewVirtualDisk4.vdi" VBoxManage internalcommands sethduuid "Z:\Vbox\StandbyRAC_ENV\11.2.0.4_storage\NewVirtualDisk5.vdi" VBoxManage internalcommands sethduuid "Z:\Vbox\StandbyRAC_ENV\11.2.0.4_storage\NewVirtualDisk6.vdi" VBoxManage internalcommands sethduuid "Z:\Vbox\StandbyRAC_ENV\11.2.0.4_storage\NewVirtualDisk7.vdi"
此外,爲了和以前的環境在「虛擬介質管理」容易區分,好比能夠考慮把這些盤的名字修改一下:程序
rename 11.2.0.4RAC1.vdi 11gStandbyRAC1.vdi rename 11.2.0.4RAC2.vdi 11gStandbyRAC2.vdi rename NewVirtualDisk1.vdi StandbyNewVirtualDisk1.vdi rename NewVirtualDisk2.vdi StandbyNewVirtualDisk2.vdi rename NewVirtualDisk3.vdi StandbyNewVirtualDisk3.vdi rename NewVirtualDisk4.vdi StandbyNewVirtualDisk4.vdi rename NewVirtualDisk5.vdi StandbyNewVirtualDisk5.vdi rename NewVirtualDisk6.vdi StandbyNewVirtualDisk6.vdi rename NewVirtualDisk7.vdi StandbyNewVirtualDisk7.vdi
最後,說明下,若是是一個虛擬環境克隆出來的,UUID自動會變化,也就不會有這個UUID的問題。我的仍是習慣於直接複製以前的模板環境~command