[ art / civ / cult / cyb / diy / drg / feels / layer / lit / λ / q / r / sci / sec / tech / w / zzz ] archive provided by lainchan.jp

lainchan archive - /tech/ - 36206



File: 1491439400455.png (125.08 KB, 300x300, virtualbox-vdi-512px.png)

No.36206

I'm not sure if I am posting in the right board, but it didn't feel quite right posting in /lam/, /sci/, or /tech/.

My objective is clear enough; I want to use a live Linux CD or flashdrive to boot a computer and visualize the computer's hard drive into a single .vdi file that Virtualbox can boot. How can this be done?

I have already seen this-
>http://askubuntu.com/questions/34802/convert-my-physical-operating-system-to-a-virtualbox-disk
-but this is not exactly what I want though. I do not want to take a raw image and then convert it to a bootable .vdi. I want to directly convert the hard drive straight to a .vdi in one step.

Granted, its easy enough to just image the hard drive, but again, I want to make a .vdi virtual hard drive from a physical hard drive. I'm not against paid software that does this (I think vmware does, not sure) but I want to use GNU and freeware first if any exist that does what I want.

  No.36207

I think the correct board for this question is the >>>/tech/.

  No.36208

>>36206
>but it didn't feel quite right posting in /lam/, /sci/, or /tech/.

At the time, it didn't feel right, but I do see now how this should have been in /tech/. Regardless, any ideas how to do this? VMware appears it has some kind of application that does it, but its not freeware or open source. Everything I see as of right now all say the same thing-
>create raw disk image
>convert raw disk image into .vdi
>may or may not work properly

Surely there must be a way to do this. It must only be a matter of finding the methodology.

  No.36209

Okay, so I found this-
https://superuser.com/questions/614400/how-can-i-clone-a-hard-drive-directly-to-a-vdi-image

I tried the highest voted answer and used the below code as it instructed with one of my drives.
>VBoxManage convertfromraw /dev/sda MyImage.vdi --format VDI

It didn't work for me, but I suspect it is because I am a Linux live flashdrive that is only 4GB and perhaps using a larger flash drive would help.

I'm still playing around, perhaps I can figure out how to create the .vdi in another hard drive.

  No.36213

>>36209
I would assume its just standard unix commands.
  mount /dev/other-disk /mnt/disk
VBoxManage convertfromraw /dev/sda /mnt/disk/MyImage.vdi --format VDI

  No.36248

>>36206
if you booted a live USB and installed virtualbox on it, passed through your linux installs block device with VirtIO, created and mounted a VDI. you should at that point be able to use gparted in a VM to just copy over your partitions.

a bit janky but it should work

  No.36249

>>36206
it almost sounds like you want a hypervisor but i could be completely wrong