Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to expand capacity of KVM image

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you "how to expand the capacity of KVM images". The content is simple and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to expand KVM images".

Enter the directory where data.img is located:

Append 4GB space to the virtual machine image file (.img):

1. Dd if=/dev/zero bs=1024M count=4 > > data.img

Scan to check the image file:

2. E2fsck-f data.img

At this time, the size of the image file (hard disk) is increased. This image file is not an ordinary file. It contains a mount/umount-capable loop file system, so you need to resize the file system. Otherwise, df will find that the hard disk size has not changed after entering the virtual machine:

3 、 resize2fs data.img

The above is all the content of the article "how to expand KVM Image". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 295

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report