Clone VirtualBox HDD to physical drive

i have arch linux on VirtualBox with *.vdi as the HDD of 50 GB.

how do i transfer/clone it to my 250 GB external drive.

cannot find command on VBox cli.

clonezilla didnt help. it did not find and external drives
 

thetechfreak

Legend Never Ends
This link should help :) -

brian's blog - probably the best blog on the web. - Clone Your Hard Drive in VirtualBox with: VBoxManage clonevdi

*srackham.wordpress.com/cloning-and-copying-virtualbox-virtual-machines/
 
^^ thats the thing i dont want.

its not VDI -> VDI
its VDI -> physical device

trying out 1st solution:

1. convert VDI to RAW
Code:
VBoxManage clonehd -format RAW <filename>.vdi <filename>.raw
2. use dd to copy raw to physical (unmounted) drive
Code:
$ dd if=/image.raw of=/dev/hda

3. force check disk on first startup
 
Last edited:

sygeek

Technomancer
Navigate to .vdi, Copy it, Navigate to external drive, Paste? I don't know much of how these things work..so I'm probably wrong.
 

krishnandu.sarkar

Simply a DIGITian
Staff member
^^Did you even read @OP's query, or just posting for the sake of post count.

At least read what he's asking for. He's not asking for copy pasting that .vdi thing, that's damn simple.

He has installed Arch on virtual PC, now he wants it to transfer it to his physical HDD(not the .vdi, but the Arch Setup)
 

sygeek

Technomancer
^I bothered reading it and that's all I understood from it. I had a feeling that I'm wrong with this and that's why I mentioned
I don't know much of how these things work..so I'm probably wrong.
Posting for the sake of post count is stupid and not my code of ethics ;)

Blame my stupidity cause I still don't understood what either of you guys mean.

Edit: Oh wait got it (after reading it the other way around)..I've encountered that problem and I finally gave up.
 

Vyom

The Power of x480
Staff member
Admin
Well, the way I understood the problem is, that the OP needs to copy files FROM the .vdi file (which is the virtual hard disk, on which Linux is installed), to a Real physical hard drive.

Now assuming that a Pen Drive works in the Virtual Linux that is installed, can't OP just copy the entire files present on the disk and copy it to the Pen drive.
Then paste the entire contents of the pen drive to the physical drive, from the host OS.

Havn't worked on Linux, so don't know if this could work. But I would have followed this procedure, if I had to clone the contents of a Virtual Windows.
 

Liverpool_fan

Sami Hyypiä, LFC legend
Well one thing can be done. Run Virtualbox, and add a new hard disk larger than the first. Then format the entire "hard disk" to ext4, mount it, and back up the entire image of first hard disk/partitions into the second hard disk in Virtualbox. (using dd)
Access the share in your host, and you should get the image.

However I doubt transferring your Virtualbox's installation will be that simple.

Well, the way I understood the problem is, that the OP needs to copy files FROM the .vdi file (which is the virtual hard disk, on which Linux is installed), to a Real physical hard drive.

Now assuming that a Pen Drive works in the Virtual Linux that is installed, can't OP just copy the entire files present on the disk and copy it to the Pen drive.
Then paste the entire contents of the pen drive to the physical drive, from the host OS.

Havn't worked on Linux, so don't know if this could work. But I would have followed this procedure, if I had to clone the contents of a Virtual Windows.

Nope. Will copying contents of C: from one PC to another transfer a Windows installation?
 
the "dd" image copy did not work.
the *.raw image did not boot. but contents are displayed when its mounted.
trying to install GRUB and boot it

looking for alternate solutions.

BTW copy paste a vdi file or installation contents.... its not what i wanted nor expected as a response......
 
Top Bottom