How to solve copy vbox has the same uuid

VBoxManage internalcommands sethduuid path_to_vhd
VBoxManage clonedhd source_vhd_file dest_vhd_file

有以上两种方法,第一种是先拷贝,然后修改,第二种使用tool拷贝,拷贝过程中,自动修改uuid,然后在virtualbox 中new来增加

这样就可以设置一台主机然后批量复制

VirtualBox can be a handy tool when playing with configurations and testing things out. You can create a base image, make several copies and start playing around and messing things up. Since you made copies you can always go back to your original and start from ground zero.

Creating a copy of an existing Virtual machine in VirtualBox is just about as simple as copying a file. However we will need to assign a new UUID to the copied virtual machine. This will require us to issue a few commands in the terminal.

 

 

How to solve copy vbox has the same uuid_第1张图片

 

 

 

Copying a Virtual Machine File:

Navigate to your home directory

Press “CTRL + H

(To Show Hidden Files)

Open folder .VirtualBox

Open folder HardDisks

Right click on the virtual machine you would like to copy and select copy

 

 

How to solve copy vbox has the same uuid_第2张图片

 

 

Right click in the folder and select paste

 

 

 

 

Right Click on the copied file and Rename it to what every you feel appropriate.

 

 

 

 

 

 

Changing the UUID of the copied Virtual machine file:

 

VirtualBox can not have more then one virtual machine with the same UUID. If you just make a copy and not assign a new UUID you will get an error message similar to below.

disk '/.VirtualBox/HardDisks/ubuntu.vdi' with UUID {77d55d86-800c-4667-9e60-678f81a50913} already exists

Lets assign a new UUID so we can start using are copied virtual machine.

Go to Applications > Accessories > Terminal

 

 

How to solve copy vbox has the same uuid_第3张图片

 

 

Type the following command

cd .VirtualBox/HardDisks

 

 

How to solve copy vbox has the same uuid_第4张图片

 

 

Then Issue the following command changing the end part (ubuntu 10 test.vdi ) to match the new virtual machine name. Note: If you have a space in the name you will need to add “” around the name of your new virtual machine.

vboxmanage internalcommands setvdiuuid "ubuntu 10 test.vdi"

 

 

How to solve copy vbox has the same uuid_第5张图片

 

 

 

 

 

 

Importing the copied virtual machine into VirtualBox:

 

launch VirtualBox

Select New

 

 

 

 

Select Next

 

 

How to solve copy vbox has the same uuid_第6张图片

 

 

Create a Name and select the operating system that best matches your guest OS.

 

 

How to solve copy vbox has the same uuid_第7张图片

 

 

Set the amount of Ram you would like the machine to use

 

 

How to solve copy vbox has the same uuid_第8张图片

 

 

Select use existing hard disk - Click on Folder Icon

 

 

 

 

Select Add

 

 

How to solve copy vbox has the same uuid_第9张图片

 

 

Browse to your new copy you created

 

 

How to solve copy vbox has the same uuid_第10张图片

 

 

Click on Select

 

 

 

 

Click Next

 

 

How to solve copy vbox has the same uuid_第11张图片

 

 

Click Finish

 

 

How to solve copy vbox has the same uuid_第12张图片

 

 

You should be should be all set. You can now make setting changes before launching your newly copied virtual machine. Once you have it configured the way you want it, fire it up and test it out.

 

 

 

 

Hope you found this helpful!

你可能感兴趣的:(How to solve copy vbox has the same uuid)