一。确认虚拟机镜像文件格式
[[email protected] vps]# qemu-img info centos1.img image: centos1.img file format: raw virtual size: 200G (214748364800 bytes) disk size: 6.5G
[[email protected] vps]# qemu-img info centos1.imgimage: centos1.imgfile format: rawvirtual size: 200G (214748364800 bytes)disk size: 6.5G
RAW格式是最原始的镜像格式,好处是速度快。但不支持很多新的功能。现在qcow2格式效率有很大提升了,而且还支持一些新的功能
1 更小的存储空间,即使是不支持holes的文件系统也可以(这下du -h和ls -lh看到的就一样了)
2 Copy-on-write support, where the image only represents changes made to an underlying disk image(这个特性SUN ZFS表现的淋漓尽致)
3 支持多个snapshot,对历史snapshot进行管理
4 支持zlib的磁盘压缩
5 支持AES的加密