コピーしたVM を追加しようとしたら、エラーがでる。
uuid ってのがVM のハードディスクみたいなやつの識別ID でこれが「おんなじやつがある!」ってエラーのようです。
仮想マシン"H:/WindowsServer2016 Windchll/WindowsServer2016 Windchll.vbox"を開けませんでした。
Trying to open a VM config 'H:/WindowsServer2016 Windchll/WindowsServer2016 Windchll.vbox' which has the same UUID as an existing virtual machine.
終了コード : E_FAIL (0x80004005)
コンポーネント: MachineWrap
インターフェース: IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}
呼び出し先: IVirtualBox {d0a0163f-e254-4e5b-a1f2-011cf991c38d}
which has the same UUID as an existing virtual machine
Contents
エラーの再現手順。
ツール> ようこそ>「追加」をクリック。
![](https://test.beccou.com/wp-content/uploads/2020/08/screenshot.1-10-1024x698.jpg)
「.vbox」ファイルを選択。
![](https://test.beccou.com/wp-content/uploads/2020/08/screenshot.2-12.jpg)
エラーが出る。
![](https://test.beccou.com/wp-content/uploads/2020/08/screenshot.3-11.jpg)
UUID を確認。
エディタで開いてヘッダーを見たいところですが、ファイルが大きくて、開かないので、一旦HDD メディアとして登録する。
ツール> メディア>「追加」
![](https://test.beccou.com/wp-content/uploads/2020/08/image-166.png)
![](https://test.beccou.com/wp-content/uploads/2020/08/image-169.png)
「.vdi」ファイルを選択。
![](https://test.beccou.com/wp-content/uploads/2020/08/screenshot.15-6.jpg)
エラーメッセージにUUDI が表示されている。
![](https://test.beccou.com/wp-content/uploads/2020/08/screenshot.16-4.jpg)
重複しているVM を特定する。
UUID が分かれば、重複しているVM も特定できる。
「検索」をクリックし。
「UUID で検索」に切り替えて、エラーのID を検索すると、重複しているマシンのHDD を特定できた。
![](https://test.beccou.com/wp-content/uploads/2020/08/image-163.png)
「プロパティ」をクリックして、「属性」、「情報」タブなどの情報から、UUID が使われているVM を特定します。
![](https://test.beccou.com/wp-content/uploads/2020/08/image-164.png)
解決策
解決策は、どちらかの「UUID」を変更して、重複を回避することです。
その一番簡単で安心な方法は、「片方のVM をクローン化してオリジナルを削除する。」だと思います。
重複しているVM を一旦除去。
重複先のVM が判明したので、一旦VM マネージャーのリストから除去します。
テーブルからVM 名を右クリック(メニュー)>「除去」をクリック。
![](https://test.beccou.com/wp-content/uploads/2020/08/image-170.png)
「除去のみ」を選択。
![](https://test.beccou.com/wp-content/uploads/2020/08/screenshot.18-10.jpg)
UUID を変更したいVM を登録。
除去が出来たら、
ツール> ようこそ>「追加」をクリック。
![](https://test.beccou.com/wp-content/uploads/2020/08/image-167.png)
![](https://test.beccou.com/wp-content/uploads/2020/08/image-165-1024x698.png)
エラーが出て登録できなかった「.vbox」ファイルを選択。
![](https://test.beccou.com/wp-content/uploads/2020/08/screenshot.20-6.jpg)
リストに追加できました。
![](https://test.beccou.com/wp-content/uploads/2020/08/screenshot.21-5-1024x698.jpg)
追加したVM をクローン化して、UUID を変更。
リストからVM 名を選択して右クリック(メニュー)>「クローン」を選択。
![](https://test.beccou.com/wp-content/uploads/2020/08/image-168.png)
- 名前:適当に(わかりやすいと良いと思いますが、好きな名前で。)
- パス:適当に(空き容量が十分にある場所を指定。)
※少なくともクローン元のVM フォルダのサイズより空き容量が多い場所。 - クローンのタイプ:すべてをクローン
- スナップショット:すべて
- 追加オプション:「ハードウェアUUID を保持」のチェックを外す。
![](https://test.beccou.com/wp-content/uploads/2020/08/screenshot.40-5.jpg)
ひたすら待ちます。(VM のサイズと、ハードウェアの性能次第。)
![](https://test.beccou.com/wp-content/uploads/2020/08/screenshot.41-3.jpg)
クエストでもやりながら待ちます。
![](https://test.beccou.com/wp-content/uploads/2020/08/2020-08-30-4-1024x576.png)
そろそろ終わりそうです。
![](https://test.beccou.com/wp-content/uploads/2020/08/screenshot.42-4-1024x708.jpg)
もう少し、クエストを進めます。
![](https://test.beccou.com/wp-content/uploads/2020/08/2020-08-30-6-1024x576.png)
クローンが完成しました。
![](https://test.beccou.com/wp-content/uploads/2020/08/screenshot.43-2-1024x698.jpg)
オリジナルと見比べて、スナップショットなど、想定通りになっているか確認します。
欲を言えば、起動確認なんかもしておいた方がいいかも。
![](https://test.beccou.com/wp-content/uploads/2020/08/screenshot.44-4-1024x698.jpg)
クローン元のオリジナルを除去。
クローンに問題がなければ、オリジナルを除去します。
![](https://test.beccou.com/wp-content/uploads/2020/08/screenshot.45-7.jpg)
「すべて削除」を選択すれば、リストから除去されるだけでなく、ハードディスク上からもデータが削除されます。
(どのオプションで除去するかは任意です。
クローン化に問題があっても、自己責任なので、大事なデータなのであれば、「除去のみ」にしておいてデータは残しておいた方がいいでしょうね。)
![](https://test.beccou.com/wp-content/uploads/2020/08/screenshot.46-4.jpg)
一旦除去したVM を再追加。
この時点で、UUID が重複しているVM がなくなりましたので、一旦除去したVM をもとに戻します。
ツール> ようこそ>「追加」 から、「.vbox」ファイルを選択。
![](https://test.beccou.com/wp-content/uploads/2020/08/screenshot.47-2.jpg)
再登録できました。
![](https://test.beccou.com/wp-content/uploads/2020/08/screenshot.48-3-1024x698.jpg)