- 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:
- 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:~#
- 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:~#
- Examine the file type:
root@kvm:~# file -s debian.img
debian.img: data
root@kvm:~#
- 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:~#
推薦閱讀
- Vue 3移動Web開發與性能調優實戰
- Python概率統計
- 深度實踐OpenStack:基于Python的OpenStack組件開發
- Mobile Web Performance Optimization
- Microsoft Dynamics 365 Extensions Cookbook
- Flink SQL與DataStream入門、進階與實戰
- 少年輕松趣編程:用Scratch創作自己的小游戲
- R語言編程指南
- C語言程序設計習題與實驗指導
- 零基礎輕松學C++:青少年趣味編程(全彩版)
- INSTANT PLC Programming with RSLogix 5000
- Learning GraphQL and Relay
- PHP從入門到精通(第7版)
- Natural Language Processing with Python Cookbook
- Python程序設計