domingo, 14 de julio de 2013

How to create a Virtualbox image from a physical partition by one command

Exytaido de:  http://karim-ouda.blogspot.com.ar/2011/11/how-to-create-virtualbox-image-from.html

I managed to create an image from a running Linux machine using the following command

Command:

sudo dd if=DRIVE | VBoxManage convertfromraw stdin FILENAME BYTES

Real Example

sudo dd if=/dev/sda | VBoxManage convertfromraw stdin MyLinuxImage.vdi 120034123776


Notes:

1- To get the number of bytes in partition, you can use the following command
sudo fdisk -l /dev/sda

2- You need to use /dev/xxx not /dev/xxx1 or xxx2 so that the image contains MBR records

For more information check the following link:
https://www.virtualbox.org/wiki/Migrate_Windows

No hay comentarios:

Publicar un comentario