qemu create disk image
Hi,
i cannot find out how to create a disk image of my Linux System hard disk, in order to use it with qemu! I found something, but it is Bochs specific. For qemu the only useful i found, was how to run an iso with Qemu. Can somebody point me to a link? Thanks |
dd if=/dev/hda1 of=disk.img
this will make an exact replica of /dev/hda1 (make sure thats the right partition). then boot up disk.img with qemu. also make sure you ahve anough disk space to same the image file.. |
Thanks fatrandy13. It works, but i have some questions:
-Is this a "growing" image- ie does it grow by adding data? Or do i have to use a special program, in order to resize it? -If i do: "dd if=/dev/hda (NOT HDA1) of=disk.img" and at the same time i use a backup partition (/dev/hda7 for example, mounted as /mnt/backup) to store the image, would that cause a problem and make the image grow recursively? Thanks |
dd if=/dev/hda of=disk.img doesnt really make sense. /dev/hda is you entire harddrive (including /dev/hda7 and all your other partitions) so say it is a 40 gig drive, that would mean you are trying to store a 40 gig image file on a 40 gig drive with all of your other files, so its impossible... stick to:
dd if=/dev/hdaX of=disk.img where X is the partition number you want. and by the way, No, it is not a growing disk...sorry |
All times are GMT -5. The time now is 02:21 AM. |