How to clone vdi on windows Hosts?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
themoon17
Posts: 9
Joined: 27. Dec 2008, 12:19

How to clone vdi on windows Hosts?

Post by themoon17 »

Hi all,

i have windows Host Environment.

How can i clone My VDIs?

i have 1.Ubuntu guest which i want to clone. Is there any better way to clone other than copying?

Somebody help me pls

Thanks in advance
Hypnoz
Posts: 7
Joined: 4. Jan 2009, 07:21

Post by Hypnoz »

I clone systems like this.

1) Copy the VDI file you want to clone/backup.

2) This file won't boot because it has the same UUID as the first file you copied, so need to use VBoxManage utility to give it a new random UUID.

3) Open command prompt, and change to your Vbox directory with VBoxMange.exe in it. Probably located at C:\Program Files\Sun\xVM VirtualBox\

4) Run this command in command prompt
VBoxManage internalcommands setvdiuuid "D:\My Virtual Machines\VDI\HardDiskName.vdi"

Obviously you would change the above path to point to your NEW VDI file that you created (not the original).

Hope this helps! :)
themoon17
Posts: 9
Joined: 27. Dec 2008, 12:19

hi again

Post by themoon17 »

thanks Hypnoz.

But can you please what is the internal command in this below line

VBoxManage internalcommands setvdiuuid "D:\My Virtual Machines\VDI\HardDiskName.vdi"

Also, if am running a live server on VBox. will all my data running on the server will come when am copying the vbox to new location?

thanks again
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Hypnoz, a little hint if you don't mind. Instead of just repasting this type of answer, when you see duplicate topics like this one just refer the original poster to the other thread, so that we can then answer multiple posters in one topic.

Themoon17, welcome to our forum. You might want to take this opportunity to browse the Forum Posting Guide. This contains some useful tips on how to search for VBox knowledge and how to frame Qs. In this case it really is far easier for you to google the forum for setvdiuuid for answers rather than just asking the Q again.

If you are running a live server then you can't run a copy since the VDI will be open on the host. Copying a VDI is a bit like pulling a disk out of a PC and making an exact image copy. You can put this into another PC to clone your original, but you can't (safely) pull a disk out of a running PC can you?
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Post by vbox4me2 »

TerryE wrote:If you are running a live server then you can't run a copy since the VDI will be open on the host. Copying a VDI is a bit like pulling a disk out of a PC and making an exact image copy. You can put this into another PC to clone your original, but you can't (safely) pull a disk out of a running PC can you?
I can and have done so a few times, no problems.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

vbox4me2 wrote:I can and have done so a few times, no problems.
On a windows host?

Also you can't guarantee the integrity of copying an open VDI on the fly even if you could do the snap. OK if you are using Linux LVM or W2K3R2 snapshots, but otherwise ...
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
se_ha
Posts: 11
Joined: 7. Jan 2009, 11:08

cloning with clonehd

Post by se_ha »

I use "VBoxManage clonehd <infile> <outfile> -format VDI" to clone a virtual box hd image on XP SP3 host. The existing and running hd image has laos XP installed SP3. I created a new VM with the cloned HD as basis. When I start now the VM, the messge I get is "A disk read error occured" and nothing is working any more. I'm using VBox 2.1. What is wrong, any help.

In the description of clonehd there is a -remember option listed but not explained anywhere in the documentation.
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Post by vbox4me2 »

TerryE wrote:
vbox4me2 wrote:I can and have done so a few times, no problems.
On a windows host?

Also you can't guarantee the integrity of copying an open VDI on the fly even if you could do the snap. OK if you are using Linux LVM or W2K3R2 snapshots, but otherwise ...
Yep, vista host, yes sometimes the copy indicates some ntfs problems but thats easely fixed.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: cloning with clonehd

Post by Sasquatch »

se_ha wrote:I use "VBoxManage clonehd <infile> <outfile> -format VDI" to clone a virtual box hd image on XP SP3 host. The existing and running hd image has laos XP installed SP3. I created a new VM with the cloned HD as basis. When I start now the VM, the messge I get is "A disk read error occured" and nothing is working any more. I'm using VBox 2.1. What is wrong, any help.

In the description of clonehd there is a -remember option listed but not explained anywhere in the documentation.
The clone command is broken in 2.1.0. Please use the alternative setvdiuuid instead on a normal file copy.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply