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.

 

 

Vitualbox UUID already exsist - Error Message

 

 

 

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

 

 

Right Click on Virtual Machine Hard Drive .VDI and select copy (VirtualBox)

 

 

Right click in the folder and select paste

 

 

Paste Copy of VirtualBox HardDrive .VDI

 

 

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

 

 

Rename your copy of your VirtualBox hard drive (.VDI)

 

 

 

 

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

 

 

Launch A Terminal by going to Applications > Accessories > Terminal

 

 

Type the following command

cd .VirtualBox/HardDisks

 

 

Change Directory to .VirtualBox/HardDisks  | cd ./VirtualBox/HardDisk

 

 

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"

 

 

vboxmanage internalcommands setvdiuud "vdiname.vdi"

 

UUID Changed to

 

 

 

 

 

Importing the copied virtual machine into VirtualBox:


 

launch VirtualBox

Select New

 

 

Launch VirtualBox and Click New

 

 

Select Next

 

 

Click Next

 

 

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

 

 

Create A Name for your copy VirtualBox Image

 

 

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

 

 

Set the Amount of Ram for your virtual machine

 

 

Select use existing hard disk - Click on Folder Icon

 

 

Select Use exsisting hard disk

 

 

Select Add

 

 

Add The New Disk

 

 

Browse to your new copy you created

 

 

Select Your Copied .vdi file

 

 

Click on Select

 

 

Click on Select

 

 

Click Next

 

 

Select Next

 

 

Click Finish

 

 

Click Finish

 

 

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.

 

 

New Copy of Virtual Machine Up and Running

 

 

Hope you found this helpful!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值