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

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:~#
主站蜘蛛池模板: 石渠县| 甘肃省| 沅陵县| 百色市| 磴口县| 文昌市| 新源县| 集贤县| 新密市| 嘉黎县| 海口市| 伊通| 日照市| 黑水县| 洛扎县| 永吉县| 湘潭县| 龙陵县| 大化| 阿拉善右旗| 肃北| 房山区| 吐鲁番市| 唐海县| 大新县| 宽城| 锡林浩特市| 灌南县| 莲花县| 杭州市| 平乡县| 和平区| 潞西市| 南丰县| 老河口市| 泰和县| 馆陶县| 浦县| 镶黄旗| 三台县| 南部县|