官术网_书友最值得收藏!

How to do it...

Perform the following steps to create a blank raw image of a specified size and to verify that the file was created on the host:

  1. Create a raw image named debian.img with size of 10 GB:
root@kvm:~# qemu-img create -f raw debian.img 10G    
Formatting 'debian.img', fmt=raw size=10737418240
root@kvm:~#
  1. Check that the file was created:
root@kvm:~# ls -lah debian.img    
-rw-r--r-- 1 root root 10G Feb 10 16:58 debian.img
root@kvm:~#
  1. Examine the file type:
root@kvm:~# file -s debian.img    
debian.img: data
root@kvm:~#
  1. Obtain more information about the image:
root@kvm:~# qemu-img info debian.img
image: debian.img
file format: raw
virtual size: 10G (10737418240 bytes)
disk size: 0
root@kvm:~#
主站蜘蛛池模板: 五华县| 海口市| 班玛县| 卫辉市| 通化县| 平塘县| 徐闻县| 镇赉县| 晴隆县| 三明市| 华宁县| 鄂伦春自治旗| 五台县| 淳化县| 高安市| 滦平县| 汉川市| 夹江县| 年辖:市辖区| 闵行区| 星子县| 临颍县| 米易县| 安仁县| 十堰市| 永新县| 英超| 沧州市| 和田县| 民勤县| 山阳县| 西和县| 渭南市| 合山市| 彝良县| 独山县| 天全县| 绥阳县| 邛崃市| 吴桥县| 武威市|