Copy/Clone physical partition into virtual hard disk

This is for discussing general topics about how to use VirtualBox.

Copy/Clone physical partition into virtual hard disk

Postby sboard » 31. Dec 2008, 23:53

Hi Guys,

I currently have Ubuntu installed on a physical hard disk partition, I have already set up my system to run a virtual machine using the partition as the hard disk. I now want to create a virtual disk that is an exact copy/clone of my physical hard disk partition, is this possible? If so how do I do it?

Cheers
Steve
sboard
 
Posts: 1
Joined: 31. Dec 2008, 23:48

Postby TerryE » 1. Jan 2009, 01:01

Yes, but there is a bug in the clonehd function in 2.1.0. The workaround is to stick with 2.0.6 until 2.1.2 is released or just copy the VDI then use the internalcommands setvdiuuid command to regenerate the UUIDs for the new copy. Once you've done this then you can register it with VB.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
TerryE
Site Moderator
 
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS

Alittle bit more detail on Cloing an HD

Postby scunning » 1. Jan 2009, 03:30

TerryE has it exactly right but I wanted to add a bit more for those of us who are not so good with the Windows CLI

I copied a working VDI and re-named it to Alberich.vdi then I had to reset the UUID. Here is the full command and the output:
Code: Select all   Expand viewCollapse view
C:\Program Files\Sun\xVM VirtualBox>vboxmanage internalcommands setvdiuuid "c:\Documents and Settings\steve\.VirtualBox\HardDisks\Alberich.vdi"

VirtualBox Command Line Management Interface Version 2.1.0
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

UUID changed to: b57673e3-cee4-4cf1-8605-157ad9cb80f4

Now go into the Virtual Disk Manager and register Alberich.vdi

Then create a new machine and use this disk and it boots right up in a jiffy

steve
scunning
 
Posts: 16
Joined: 23. Aug 2008, 18:28

Postby TerryE » 1. Jan 2009, 15:07

Sorry, I've just realised that I answered the wrong Q and not Steve's. What Steve wanted to do was to copy a HDD onto a VDI. As well as the standard VBoxManage convertfromraw (convertdd in 2.0.6 and earlier) you can also use the disk-to-disk techniques that I discuss in my tutorial All about VDIs.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
TerryE
Site Moderator
 
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS

Re: Copy/Clone physical partition into virtual hard disk

Postby Mohsen » 23. Apr 2009, 06:26

Steve/TerryE
Can you please help me how to do the clonehd. I have windows as Host and I can not find the uuid of my hard disk. I'd appreciate if you say how to use 'vboxmanage clonehd'.
Thanks
Mohsen
 
Posts: 1
Joined: 23. Apr 2009, 06:21
Primary OS: MS Windows 2008
VBox Version: PUEL
Guest OSses: Windows

Re: Copy/Clone physical partition into virtual hard disk

Postby TerryE » 23. Apr 2009, 09:46

You can use one of the following as a reference to your HD in the clonehd command:
  • A path absolute file reference
  • A path relative file reference. However remember that this is relative to the default HD location in your preferences, not the current working directory.
  • The UUID which you can obtain from a VBoxManage list hdds command if your HD is registered
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
TerryE
Site Moderator
 
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS

Re: Copy/Clone physical partition into virtual hard disk

Postby chemaercero » 25. Apr 2009, 11:18

Hi,

Can you guide me to create a VM from my current XP installation.

I have tried but had not success yet.

Regards,
chemaercero
 
Posts: 3
Joined: 25. Apr 2009, 11:11
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: WXP

Re:

Postby chemaercero » 25. Apr 2009, 11:21

TerryE wrote: you can also use the disk-to-disk techniques that I discuss in my tutorial All about VDIs.


I could not find the disk-to-disk techniques in the link you mention.

Can you guide me please?

Regards,
chemaercero
 
Posts: 3
Joined: 25. Apr 2009, 11:11
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: WXP

Re: Copy/Clone physical partition into virtual hard disk

Postby vbox4me2 » 25. Apr 2009, 12:57

See the quickclick items then.
vbox4me2
Volunteer
 
Posts: 5222
Joined: 21. Nov 2008, 20:27
Location: Rotterdam

Re: Copy/Clone physical partition into virtual hard disk

Postby chemaercero » 25. Apr 2009, 13:52

vbox4me2 wrote:See the quickclick items then.


Sorry, I do not get what you mean?

Regards, :(
chemaercero
 
Posts: 3
Joined: 25. Apr 2009, 11:11
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: WXP


Return to Using VirtualBox

Who is online

Users browsing this forum: Google [Bot] and 14 guests