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

  • KVM Virtualization Cookbook
  • Konstantin Ivanov
  • 109字
  • 2021-07-02 22:07:04

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:~#
主站蜘蛛池模板: 玉田县| 栾城县| 温泉县| 余姚市| 辽阳市| 江油市| 隆林| 桐柏县| 澜沧| 临湘市| 准格尔旗| 云浮市| 宁河县| 曲阜市| 启东市| 上饶市| 偃师市| 葵青区| 峨边| 河北省| 团风县| 杂多县| 扎兰屯市| 普兰店市| 安陆市| 都昌县| 青田县| 北宁市| 南涧| 伊金霍洛旗| 长垣县| 大余县| 喀喇| 西林县| 海阳市| 丹凤县| 双牌县| 金门县| 台北县| 巍山| 上思县|