- 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:~#
推薦閱讀
- Go Web編程
- C# 7 and .NET Core Cookbook
- GeoServer Cookbook
- Learning Python Design Patterns
- Node.js全程實(shí)例
- MySQL程序員面試筆試寶典
- OpenCV 3 Blueprints
- R的極客理想:量化投資篇
- MySQL核心技術(shù)與最佳實(shí)踐
- 美麗洞察力:從化妝品行業(yè)看顧客需求洞察
- Building Scalable Apps with Redis and Node.js
- Web前端開(kāi)發(fā)實(shí)戰(zhàn)教程(HTML5+CSS3+JavaScript)(微課版)
- C++程序設(shè)計(jì)習(xí)題與實(shí)驗(yàn)指導(dǎo)
- 零基礎(chǔ)學(xué)西門子PLC編程:入門、提高、應(yīng)用、實(shí)例
- Python快速編程入門