- 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:~#
推薦閱讀
- Learn Programming in Python with Cody Jackson
- 教孩子學編程:C++入門圖解
- Android程序設計基礎
- Learning jQuery(Fourth Edition)
- 智能搜索和推薦系統:原理、算法與應用
- Elasticsearch Essentials
- QPanda量子計算編程
- Python預測分析與機器學習
- Python全棧開發:基礎入門
- JavaScript編程精解(原書第2版)
- 微信小程序開發邊做邊學(微課視頻版)
- Kotlin語言實例精解
- Design Patterns and Best Practices in Java
- 零基礎C語言學習筆記
- Mastering Unity Scripting