How to choose qcow2 and raw image format for Linux system

  

When virtualizing in Linux system virtual machine, you can choose two formats. Raw and qcow2 can be said to have their own advantages. So how do you choose the qcow2, raw image format in the Linux system? This article will analyze these two formats.

raw

(default) the raw format is a plain binary image of the disc image, and is very portable. On filesystems that support sparse files, images in this format only use The space actually used by the data recorded in them.

The old format, dd a file simulates a raw format image. For now, the default format for KVM and XEN seems to be this format. Because of its originality, there are many native features, such as direct mounting is also a simple matter. Support for conversion to virtual machine images in other formats. In terms of space usage, this is much like a disk. How much is used (du-h sees the size is the size), but if you want to take the whole disk away, Take all the disk (when copying the image), it will consume network bandwidth and I /O. If the hard drive is not enough for that day, buy another disk, you can add space on the original disk:

dd if=/dev/zero of=zeros.raw bs=1024k count=4096 (create 4G first) Space)

cat foresight.img zeros.raw 》 new-foresight.img (after appending to the original image)

does not support snapshot, when LVM is used as the mirror of the virtual machine, then Performance levers. Previous12Next page Total 2 pages

Copyright © Windows knowledge All Rights Reserved