copy/clone .vdi's

Discussions related to using VirtualBox on Windows hosts.
Post Reply
dmoore
Posts: 1
Joined: 25. Feb 2009, 00:55

copy/clone .vdi's

Post by dmoore »

I have a few questions in regards to copy/cloneing .vdi's... but first, a little background.

Right now, I am preparing to switch from Windows XP MCE as my host OS to Fedora 10 and am in the process of backing up all of the files that I would like to keep, including my Windows Server 2K3 vdi and my Windows 7 vdi.

At first, I just tried to drag/drop the vdi's to my USB HDD, but that didn't work. I got an error saying my destination did not have enough hard drive space, which was false.

So, I discovered that I could use the clonehd command in the command console, which I am doing now. The real question that I have, is how do I find out what the UUID of a vdi is, that way, when I get VirtualBox up and running on Fedora 10, I can just clone the vdi's back.

Thanks!

-Dallas
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Post by vbox4me2 »

The UUID is not important, just use "vboxmanage internalcommands setvdiuuid" to change them, then add the vdi's to your vm's.

Your USB HDD is probably fat32 formatted, make that ntfs and you can drop vdi's on there larger then 4gb.
cevherd
Posts: 9
Joined: 4. Feb 2009, 19:23

vdi cloning (host: windows, guest: red hat linux)

Post by cevherd »

My experience with either clonehd or internalcommands did not work?!

Host: Win XP Professional
Guest: Red Hat Linux Enterprise 4

Here are the two methods I have used:

1)

Code: Select all

D:\vbox\HardDisks>vboxmanage clonehd SDM_RHL4_TEST.vdi Cloned_403_SDM.vdi
VirtualBox Command Line Management Interface Version 2.1.0
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: 18518ef5-e98b-4de5-862d-cf428ff3ed8e
2)

Code: Select all

D:\vbox\HardDisks>copy Master.vdi Clone.vdi
D:\vbox\HardDisks>VBoxManage internalcommands setvdiuuid cloned.vdi
VirtualBox Command Line Management Interface Version 2.1.0
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

UUID changed to: 4a0ba616-b75a-4b86-a8a6-4f3c69721425
Starting guest either at GRUB: Or at Uncompressing Linux... Ok, booting the kernel.

Anybody knows how to solve this problem?

Thanks!
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Post by vbox4me2 »

Just copy the VDI file "copy /b ...." and then manually change the UUID.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: vdi cloning (host: windows, guest: red hat linux)

Post by Sasquatch »

cevherd wrote:My experience with either clonehd or internalcommands did not work?!

Host: Win XP Professional
Guest: Red Hat Linux Enterprise 4

Here are the two methods I have used:

1)
D:\vbox\HardDisks>vboxmanage clonehd SDM_RHL4_TEST.vdi Cloned_403_SDM.vdi
VirtualBox Command Line Management Interface Version 2.1.0
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: 18518ef5-e98b-4de5-862d-cf428ff3ed8e

2)
D:\vbox\HardDisks>copy Master.vdi Clone.vdi
D:\vbox\HardDisks>VBoxManage internalcommands setvdiuuid cloned.vdi
VirtualBox Command Line Management Interface Version 2.1.0
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

UUID changed to: 4a0ba616-b75a-4b86-a8a6-4f3c69721425

Starting guest either at GRUB: Or at Uncompressing Linux... Ok, booting the kernel.

Anybody knows how to solve this problem?

Thanks!
Your problem might be different. This can occur in a VM, but also on bare hardware. And somehow, Linux Guests can detect the UUID file change and it triggers a filesystem UUID change too.
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.
cevherd
Posts: 9
Joined: 4. Feb 2009, 19:23

vdi cloning (host: windows, guest: red hat linux)

Post by cevherd »

Sasquatch:
I don't know what you mean it might be different on Linux guests, all I can tell is that there is a problem in what is documented as "the procedure to clone VDI" and what could/might work...

I tried vbox4me2's recommendation with /b (on a VDI without a snapshot, my earlier trial/failure was on vdi WITH SNAPSHOTS which I now know that MIGHT not work at all?!!

after copy /b and manually generating the UUID:
J:\>"C:\Program Files\Sun\xVM VirtualBox\vboxmanage.exe" internalcommands setvdiuuid C:\.VirtualBox\HardDrives\aaa_clon
ed_2.vdi

This worked very well!!! Thanks vbox4me2! I should try this on a VDI with snapshot sometimes next week since this is the feature I am looking to use.
Post Reply